Changeset 8897 in ntrip
- Timestamp:
- Mar 13, 2020, 9:52:09 AM (5 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/app.cpp
r8252 r8897 11 11 * Created: 05-Jan-2013 12 12 * 13 * Changes: 13 * Changes: 14 14 * 15 15 * -----------------------------------------------------------------------*/ 16 16 17 #include <QFileOpenEvent> 18 19 #include "app.h" 17 #include "app.h" 20 18 #include "bnccore.h" 21 19 22 20 using namespace std; 23 21 22 QCoreApplication* createApplication(int& argc, char* argv[], bool GUIenabled) { 23 24 if (GUIenabled) { 25 return new t_app(argc, argv); 26 } 27 28 qDebug() << "bin hier"; 29 return new QCoreApplication(argc, argv); 30 } 31 32 24 33 // Constructor 25 34 //////////////////////////////////////////////////////////////////////////// 26 t_app::t_app(int& argc, char* argv[], bool GUIenabled) : QApplication(argc, argv, GUIenabled) { 35 t_app::t_app(int& argc, char* argv[]) : QApplication(argc, argv) { 36 setWindowIcon(QPixmap(":ntrip-logo.png")); 27 37 } 28 38 … … 41 51 return true; 42 52 } 43 53 44 54 return QApplication::event(ev); 45 55 } 46 56 57 -
trunk/BNC/src/app.h
r8252 r8897 3 3 4 4 #include <QApplication> 5 #include <QEvent> 5 #include <QFileOpenEvent> 6 #include <QtGui> 7 8 9 QCoreApplication* createApplication(int& argc, char* argv[], bool GUIenabled); 6 10 7 11 class t_app : public QApplication { 8 12 Q_OBJECT 9 13 public: 10 t_app(int& argc, char* argv[] , bool GUIenabled);14 t_app(int& argc, char* argv[]); 11 15 virtual ~t_app(); 12 16 protected: … … 15 19 }; 16 20 21 17 22 #endif 18 -
trunk/BNC/src/bncmain.cpp
r8896 r8897 367 367 368 368 bool GUIenabled = interactive || displaySet; 369 t_app app(argc, argv, GUIenabled); 370 371 app.setApplicationName("BNC"); 372 app.setOrganizationName("BKG"); 373 app.setOrganizationDomain("www.bkg.bund.de"); 374 375 BNC_CORE->setGUIenabled(GUIenabled); 369 QScopedPointer<QCoreApplication> app(createApplication(argc, argv, GUIenabled)); 370 371 if (qobject_cast<QApplication *>(app.data())) { // start GUI version 372 app->setApplicationName("BNC"); 373 app->setOrganizationName("BKG"); 374 app->setOrganizationDomain("www.bkg.bund.de"); 375 376 BNC_CORE->setGUIenabled(GUIenabled); 377 } 378 else { // start non-gui Version 379 380 } 381 376 382 BNC_CORE->setConfFileName( confFileName ); 377 383 … … 418 424 } 419 425 420 app.setWindowIcon(QPixmap(":ntrip-logo.png"));421 422 426 bncWin = new bncWindow(); 423 427 BNC_CORE->setMainWindow(bncWin); … … 475 479 BNC_CORE->initCombination(); 476 480 477 BNC_CORE->connect(caster, SIGNAL(getThreadsFinished()), &app, SLOT(quit()));478 481 //BNC_CORE->connect(caster, SIGNAL(getThreadsFinished()), &app, SLOT(quit())); 482 BNC_CORE->connect(caster, SIGNAL(getThreadsFinished()), app->instance(), SLOT(quit())); 479 483 BNC_CORE->slotMessage("========== Start BNC v" BNCVERSION " (" BNC_OS ") ==========", true); 480 484 … … 506 510 // Start the application 507 511 // --------------------- 508 app .exec();512 app->exec(); 509 513 if (interactive) { 510 514 delete bncWin; … … 523 527 delete rawFile; 524 528 } 529 525 530 return 0; 526 531 }
Note:
See TracChangeset
for help on using the changeset viewer.