- Timestamp:
- Jun 23, 2006, 5:08:04 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/gui/qt/Makefile.am
r8145 r8749 25 25 gui_general_moc.cc \ 26 26 gui_control.cc \ 27 gui_control_moc.cc 27 gui_control_moc.cc \ 28 \ 29 qt_gui_datadir_fallback.cc \ 30 qt_gui_datadir_fallback_moc.cc 31 28 32 29 33 … … 36 40 gui_audio.h \ 37 41 gui_general.h \ 38 gui_control.h 42 gui_control.h \ 43 \ 44 qt_gui_datadir_fallback.cc 39 45 40 46 -
trunk/src/lib/gui/qt/qt_gui_datadir_fallback.cc
r8746 r8749 16 16 //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_ 17 17 18 #include "qt_gui .h"18 #include "qt_gui_datadir_fallback.h" 19 19 20 20 #include <QtGui/QApplication> … … 34 34 namespace OrxGui 35 35 { 36 QtGui ::QtGui(int argc, char** argv)36 QtGuiDataDirFallback::QtGuiDataDirFallback(int argc, char** argv) 37 37 : QApplication(argc, argv) 38 38 { … … 50 50 mainLayout->addWidget(bannerWidget, 0,0, 3, 1); 51 51 52 53 QToolBox* toolBox = new QToolBox(groupBox); 54 { 55 toolBox->addItem(new GuiGeneral(this), "General"); 56 toolBox->addItem(new GuiVideo(this), "Video"); 57 toolBox->addItem(new GuiAudio(this), "Audio"); 58 toolBox->addItem(new GuiControl(this), "Control"); 59 } 60 mainLayout->addWidget(toolBox,1,1, 1, 3); 61 52 mainLayout->addWidget(new GuiGeneral(this), 1, 1, 1, 3); 62 53 63 54 QPushButton* start = new QPushButton("start"); … … 81 72 } 82 73 83 QtGui ::~QtGui()74 QtGuiDataDirFallback::~QtGuiDataDirFallback() 84 75 { 85 76 delete this->mainWindow; 86 77 } 87 78 88 void QtGui ::startGui()79 void QtGuiDataDirFallback::startGui() 89 80 { 90 81 } 91 82 92 void QtGui ::stopGui()83 void QtGuiDataDirFallback::stopGui() 93 84 {} 94 85 95 void QtGui ::suspend()86 void QtGuiDataDirFallback::suspend() 96 87 {} 97 88 98 89 //! Update the Gui. 99 void QtGui ::update()90 void QtGuiDataDirFallback::update() 100 91 { 101 92 this->processEvents(); … … 103 94 104 95 105 void QtGui ::quitApp()96 void QtGuiDataDirFallback::quitApp() 106 97 { 107 98 Gui::quitEvent(); … … 109 100 } 110 101 111 void QtGui ::startApp()102 void QtGuiDataDirFallback::startApp() 112 103 { 113 104 Gui::startEvent(); -
trunk/src/lib/gui/qt/qt_gui_datadir_fallback.h
r8746 r8749 1 1 /*! 2 * @file qt_gui .h2 * @file qt_gui_datadir_fallback.h 3 3 * @brief Definition of ... 4 4 */ 5 5 6 #ifndef __QT_GUI_ H7 #define __QT_GUI_ H6 #ifndef __QT_GUI_DATADIR_FALLBACK_H 7 #define __QT_GUI_DATADIR_FALLBACK_H 8 8 9 9 #include "../gui.h" … … 14 14 namespace OrxGui 15 15 { 16 class QtGui : public QApplication, public OrxGui::Gui16 class QtGuiDataDirFallback : public QApplication, public OrxGui::Gui 17 17 { 18 18 Q_OBJECT 19 19 public: 20 QtGui (int argc, char** argv);21 virtual ~QtGui ();20 QtGuiDataDirFallback(int argc, char** argv); 21 virtual ~QtGuiDataDirFallback(); 22 22 23 23 //! Start the Gui … … 40 40 } 41 41 42 #endif /* __QT_GUI_ H */42 #endif /* __QT_GUI_DATADIR_FALLBACK_H */ -
trunk/src/orxonox.cc
r8623 r8749 31 31 32 32 #include "gui/qt/qt_gui.h" 33 #include "gui/qt/qt_gui_datadir_fallback.h" 33 34 34 35 #include "parser/ini_parser/ini_parser.h" … … 227 228 // initialize everything 228 229 SDL_Init(0); 230 if( initVideo() == -1) 231 return -1; 229 232 if( initResources () == -1) 230 return -1;231 if( initVideo() == -1)232 233 return -1; 233 234 if( initSound() == -1) … … 286 287 PRINT(3)("> Initializing input\n"); 287 288 288 EventHandler::getInstance()->289 289 EventHandler::getInstance()->init(); 290 290 EventHandler::getInstance()->subscribe(GraphicsEngine::getInstance(), ES_ALL, EV_VIDEO_RESIZE); … … 336 336 } 337 337 338 if (!ResourceManager::getInstance()->verifyDataDir(DEFAULT_DATA_DIR_CHECKFILE)) 339 { 338 339 while (!ResourceManager::getInstance()->verifyDataDir(DEFAULT_DATA_DIR_CHECKFILE)) 340 { 341 340 342 PRINTF(1)("The DataDirectory %s could not be verified\n\nh" \ 341 343 "!!! Please Change in File %s Section %s Entry %s to a suitable value !!!\n", … … 344 346 CONFIG_SECTION_GENERAL, 345 347 CONFIG_NAME_DATADIR ); 346 OrxGui::Gui* gui = new OrxGui::QtGui (argc, argv);348 OrxGui::Gui* gui = new OrxGui::QtGuiDataDirFallback(argc, argv); 347 349 gui->startGui(); 348 350 delete gui; 349 exit(-1); 350 } 351 ResourceManager::getInstance()->setDataDir(Preferences::getInstance()->getString(CONFIG_SECTION_GENERAL, CONFIG_NAME_DATADIR, "")); 352 353 } 354 355 351 356 //! @todo this is a hack and should be loadable 352 357 std::string imageDir = ResourceManager::getInstance()->getFullName("maps"); … … 356 361 357 362 // DynamicLoader::loadDyLib("libtest.so"); 363 return 0; 364 } 365 366 /** 367 * initializes miscelaneous features 368 * @return -1 on failure 369 */ 370 int Orxonox::initMisc() 371 { 372 OrxShell::ShellBuffer::getInstance(); 358 373 359 374 // start the collision detection engine 360 375 CDEngine::getInstance(); 361 return 0; 362 } 363 364 /** 365 * initializes miscelaneous features 366 * @return -1 on failure 367 */ 368 int Orxonox::initMisc() 369 { 370 OrxShell::ShellBuffer::getInstance(); 376 371 377 return 0; 372 378 }
Note: See TracChangeset
for help on using the changeset viewer.