- Timestamp:
- Mar 30, 2013, 11:31:00 AM (12 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 29 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/GPSS/gpssDecoder.cpp
r2711 r5066 51 51 gpssDecoder::gpssDecoder() : GPSDecoder() { 52 52 connect(this, SIGNAL(newGPSEph(gpsephemeris*)), 53 (bncApp*) qApp, SLOT(slotNewGPSEph(gpsephemeris*)));53 PGM_CORE, SLOT(slotNewGPSEph(gpsephemeris*))); 54 54 } 55 55 -
trunk/BNC/src/GPSS/hassDecoder.cpp
r3580 r5066 47 47 48 48 connect(this, SIGNAL(newCorrLine(QString, QString, long)), 49 (bncApp*) qApp, SLOT(slotNewCorrLine(QString, QString, long)));49 PGM_CORE, SLOT(slotNewCorrLine(QString, QString, long))); 50 50 } 51 51 -
trunk/BNC/src/RTCM3/RTCM3Decoder.cpp
r4389 r5066 75 75 76 76 connect(this, SIGNAL(newGPSEph(gpsephemeris*)), 77 (bncApp*) qApp, SLOT(slotNewGPSEph(gpsephemeris*)));77 PGM_CORE, SLOT(slotNewGPSEph(gpsephemeris*))); 78 78 connect(this, SIGNAL(newGlonassEph(glonassephemeris*)), 79 (bncApp*) qApp, SLOT(slotNewGlonassEph(glonassephemeris*)));79 PGM_CORE, SLOT(slotNewGlonassEph(glonassephemeris*))); 80 80 connect(this, SIGNAL(newGalileoEph(galileoephemeris*)), 81 (bncApp*) qApp, SLOT(slotNewGalileoEph(galileoephemeris*)));81 PGM_CORE, SLOT(slotNewGalileoEph(galileoephemeris*))); 82 82 83 83 // Mode can be either observations or corrections … … 149 149 // Get Glonass Slot Numbers from Global Array 150 150 // ------------------------------------------ 151 bncApp* app = (bncApp*) qApp; 152 app->getGlonassSlotNums(parser.GLOFreq); 151 PGM_CORE->getGlonassSlotNums(parser.GLOFreq); 153 152 154 153 // Remaining part decodes the Observations … … 378 377 379 378 if (decoded) { 380 app->storeGlonassSlotNums(parser.GLOFreq);379 PGM_CORE->storeGlonassSlotNums(parser.GLOFreq); 381 380 return success; 382 381 } -
trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp
r4900 r5066 73 73 74 74 connect(this, SIGNAL(newCorrLine(QString, QString, long)), 75 (bncApp*) qApp, SLOT(slotNewCorrLine(QString, QString, long)));75 PGM_CORE, SLOT(slotNewCorrLine(QString, QString, long))); 76 76 77 77 connect(this, SIGNAL(newMessage(QByteArray,bool)), 78 (bncApp*) qApp, SLOT(slotMessage(const QByteArray,bool)));78 PGM_CORE, SLOT(slotMessage(const QByteArray,bool))); 79 79 80 80 memset(&_co, 0, sizeof(_co)); -
trunk/BNC/src/RTCM3/ephemeris.cpp
r4904 r5066 416 416 } 417 417 418 if (timeChanged && ((bncApp*) qApp)->mode() == bncApp::batchPostProcessing) {418 if (timeChanged && PGM_CORE->mode() == t_pgmCore::batchPostProcessing) { 419 419 bncTime newHTime(ww, (double) tow); 420 420 cout << "GLONASS " << ee->almanac_number << " Time Changed at " -
trunk/BNC/src/RTRover/bncrtrover.cpp
r4800 r5066 93 93 // Connect to BNC Signals 94 94 // ---------------------- 95 connect( ((bncApp*)qApp), SIGNAL(newCorrections(QList<QString>)),95 connect(PGM_CORE, SIGNAL(newCorrections(QList<QString>)), 96 96 this, SLOT(slotNewCorrections(QList<QString>))); 97 97 98 connect( ((bncApp*)qApp), SIGNAL(newEphGPS(gpsephemeris)),98 connect(PGM_CORE, SIGNAL(newEphGPS(gpsephemeris)), 99 99 this, SLOT(slotNewEphGPS(gpsephemeris))); 100 100 101 connect( ((bncApp*)qApp), SIGNAL(newEphGlonass(glonassephemeris)),101 connect(PGM_CORE, SIGNAL(newEphGlonass(glonassephemeris)), 102 102 this, SLOT(slotNewEphGlonass(glonassephemeris))); 103 103 104 connect( ((bncApp*)qApp), SIGNAL(newEphGalileo(galileoephemeris)),104 connect(PGM_CORE, SIGNAL(newEphGalileo(galileoephemeris)), 105 105 this, SLOT(slotNewEphGalileo(galileoephemeris))); 106 106 -
trunk/BNC/src/bncapp.cpp
r4904 r5066 27 27 * ------------------------------------------------------------------------- 28 28 * 29 * Class: bncApp29 * Class: t_pgmCore 30 30 * 31 31 * Purpose: This class implements the main application … … 58 58 // Constructor 59 59 //////////////////////////////////////////////////////////////////////////// 60 bncApp::bncApp(int& argc, char* argv[], bool GUIenabled) : 61 QApplication(argc, argv, GUIenabled) { 62 60 t_pgmCore::t_pgmCore(int& argc, char* argv[], bool GUIenabled) { 63 61 _GUIenabled = GUIenabled; 64 62 _logFileFlag = 0; … … 127 125 // Destructor 128 126 //////////////////////////////////////////////////////////////////////////// 129 bncApp::~bncApp() {127 t_pgmCore::~t_pgmCore() { 130 128 delete _logStream; 131 129 delete _logFile; … … 163 161 // Write a Program Message 164 162 //////////////////////////////////////////////////////////////////////////// 165 void bncApp::slotMessage(QByteArray msg, bool showOnScreen) {163 void t_pgmCore::slotMessage(QByteArray msg, bool showOnScreen) { 166 164 167 165 QMutexLocker locker(&_mutexMessage); … … 173 171 // Write a Program Message (private, no lock) 174 172 //////////////////////////////////////////////////////////////////////////// 175 void bncApp::messagePrivate(const QByteArray& msg) {173 void t_pgmCore::messagePrivate(const QByteArray& msg) { 176 174 177 175 // First time resolve the log file name … … 215 213 // New GPS Ephemeris 216 214 //////////////////////////////////////////////////////////////////////////// 217 void bncApp::slotNewGPSEph(gpsephemeris* gpseph) {215 void t_pgmCore::slotNewGPSEph(gpsephemeris* gpseph) { 218 216 219 217 QMutexLocker locker(&_mutex); … … 246 244 // New Glonass Ephemeris 247 245 //////////////////////////////////////////////////////////////////////////// 248 void bncApp::slotNewGlonassEph(glonassephemeris* glonasseph) {246 void t_pgmCore::slotNewGlonassEph(glonassephemeris* glonasseph) { 249 247 250 248 QMutexLocker locker(&_mutex); … … 292 290 // New Galileo Ephemeris 293 291 //////////////////////////////////////////////////////////////////////////// 294 void bncApp::slotNewGalileoEph(galileoephemeris* galileoeph) {292 void t_pgmCore::slotNewGalileoEph(galileoephemeris* galileoeph) { 295 293 296 294 QMutexLocker locker(&_mutex); … … 327 325 // Print Header of the output File(s) 328 326 //////////////////////////////////////////////////////////////////////////// 329 void bncApp::printEphHeader() {327 void t_pgmCore::printEphHeader() { 330 328 331 329 bncSettings settings; … … 499 497 // Print One GPS Ephemeris 500 498 //////////////////////////////////////////////////////////////////////////// 501 void bncApp::printGPSEph(gpsephemeris* ep, bool printFile) {499 void t_pgmCore::printGPSEph(gpsephemeris* ep, bool printFile) { 502 500 503 501 t_ephGPS eph; … … 512 510 // Print One Glonass Ephemeris 513 511 //////////////////////////////////////////////////////////////////////////// 514 void bncApp::printGlonassEph(glonassephemeris* ep, bool printFile) {512 void t_pgmCore::printGlonassEph(glonassephemeris* ep, bool printFile) { 515 513 516 514 t_ephGlo eph; … … 526 524 // Print One Galileo Ephemeris 527 525 //////////////////////////////////////////////////////////////////////////// 528 void bncApp::printGalileoEph(galileoephemeris* ep, bool printFile) {526 void t_pgmCore::printGalileoEph(galileoephemeris* ep, bool printFile) { 529 527 530 528 t_ephGal eph; … … 539 537 // Output 540 538 //////////////////////////////////////////////////////////////////////////// 541 void bncApp::printOutput(bool printFile, QTextStream* stream,539 void t_pgmCore::printOutput(bool printFile, QTextStream* stream, 542 540 const QString& strV2, const QString& strV3) { 543 541 … … 576 574 // Set Port Number 577 575 //////////////////////////////////////////////////////////////////////////// 578 void bncApp::setPort(int port) {576 void t_pgmCore::setPort(int port) { 579 577 _port = port; 580 578 if (_port != 0) { … … 582 580 _server = new QTcpServer; 583 581 if ( !_server->listen(QHostAddress::Any, _port) ) { 584 slotMessage(" bncApp: Cannot listen on ephemeris port", true);582 slotMessage("t_pgmCore: Cannot listen on ephemeris port", true); 585 583 } 586 584 connect(_server, SIGNAL(newConnection()), this, SLOT(slotNewConnection())); … … 592 590 // Set Port Number 593 591 //////////////////////////////////////////////////////////////////////////// 594 void bncApp::setPortCorr(int port) {592 void t_pgmCore::setPortCorr(int port) { 595 593 _portCorr = port; 596 594 if (_portCorr != 0) { … … 598 596 _serverCorr = new QTcpServer; 599 597 if ( !_serverCorr->listen(QHostAddress::Any, _portCorr) ) { 600 slotMessage(" bncApp: Cannot listen on correction port", true);598 slotMessage("t_pgmCore: Cannot listen on correction port", true); 601 599 } 602 600 connect(_serverCorr, SIGNAL(newConnection()), this, SLOT(slotNewConnectionCorr())); … … 608 606 // New Connection 609 607 //////////////////////////////////////////////////////////////////////////// 610 void bncApp::slotNewConnection() {608 void t_pgmCore::slotNewConnection() { 611 609 _sockets->push_back( _server->nextPendingConnection() ); 612 610 } … … 614 612 // New Connection 615 613 //////////////////////////////////////////////////////////////////////////// 616 void bncApp::slotNewConnectionCorr() {614 void t_pgmCore::slotNewConnectionCorr() { 617 615 _socketsCorr->push_back( _serverCorr->nextPendingConnection() ); 618 616 } … … 620 618 // 621 619 //////////////////////////////////////////////////////////////////////////// 622 void bncApp::slotQuit() {623 cout << " bncApp::slotQuit" << endl;620 void t_pgmCore::slotQuit() { 621 cout << "t_pgmCore::slotQuit" << endl; 624 622 delete _caster; 625 q uit();623 qApp->quit(); 626 624 } 627 625 628 626 // 629 627 //////////////////////////////////////////////////////////////////////////// 630 void bncApp::slotNewCorrLine(QString line, QString staID, long coTime) {628 void t_pgmCore::slotNewCorrLine(QString line, QString staID, long coTime) { 631 629 632 630 QMutexLocker locker(&_mutex); … … 680 678 // Dump Complete Correction Epochs 681 679 //////////////////////////////////////////////////////////////////////////// 682 void bncApp::dumpCorrs(long minTime, long maxTime) {680 void t_pgmCore::dumpCorrs(long minTime, long maxTime) { 683 681 for (long sec = minTime; sec <= maxTime; sec++) { 684 682 QList<QString> allCorrs = _corrs->values(sec); … … 690 688 // Dump all corrections 691 689 //////////////////////////////////////////////////////////////////////////// 692 void bncApp::dumpCorrs() {690 void t_pgmCore::dumpCorrs() { 693 691 QList<QString> allCorrs; 694 692 QMutableMapIterator<long, QString> it(*_corrs); … … 702 700 // Dump List of Corrections 703 701 //////////////////////////////////////////////////////////////////////////// 704 void bncApp::dumpCorrs(const QList<QString>& allCorrs) {702 void t_pgmCore::dumpCorrs(const QList<QString>& allCorrs) { 705 703 emit newCorrections(allCorrs); 706 704 if (_socketsCorr) { … … 729 727 // 730 728 //////////////////////////////////////////////////////////////////////////// 731 void bncApp::setConfFileName(const QString& confFileName) {729 void t_pgmCore::setConfFileName(const QString& confFileName) { 732 730 if (confFileName.isEmpty()) { 733 731 _confFileName = QDir::homePath() + QDir::separator() 734 732 + ".config" + QDir::separator() 735 + organizationName() + QDir::separator()736 + applicationName() + ".bnc";733 + qApp->organizationName() + QDir::separator() 734 + qApp->applicationName() + ".bnc"; 737 735 } 738 736 else { … … 743 741 // Raw Output 744 742 //////////////////////////////////////////////////////////////////////////// 745 void bncApp::writeRawData(const QByteArray& data, const QByteArray& staID,743 void t_pgmCore::writeRawData(const QByteArray& data, const QByteArray& staID, 746 744 const QByteArray& format) { 747 745 … … 763 761 // Get Glonass Slot Numbers from Global Array 764 762 //////////////////////////////////////////////////////////////////////////// 765 void bncApp::getGlonassSlotNums(int GLOFreq[]) {763 void t_pgmCore::getGlonassSlotNums(int GLOFreq[]) { 766 764 767 765 QMutexLocker locker(&_mutex); … … 776 774 // Store Glonass Slot Numbers to Global Array 777 775 //////////////////////////////////////////////////////////////////////////// 778 void bncApp::storeGlonassSlotNums(const int GLOFreq[]) {776 void t_pgmCore::storeGlonassSlotNums(const int GLOFreq[]) { 779 777 780 778 QMutexLocker locker(&_mutex); … … 789 787 // 790 788 //////////////////////////////////////////////////////////////////////////// 791 void bncApp::initCombination() {789 void t_pgmCore::initCombination() { 792 790 #ifdef USE_COMBINATION 793 791 _bncComb = new bncComb(); … … 801 799 // 802 800 //////////////////////////////////////////////////////////////////////////// 803 void bncApp::stopCombination() {801 void t_pgmCore::stopCombination() { 804 802 #ifdef USE_COMBINATION 805 803 delete _bncComb; … … 808 806 } 809 807 810 // Handling Events (virtual)811 ////////////////////////////////////////////////////////////////////////////812 bool bncApp::event(QEvent* ev) {813 814 if (ev->type() == QEvent::FileOpen) { // currently happens on Mac only815 QString fileName = static_cast<QFileOpenEvent*>(ev)->file();816 setConfFileName(fileName);817 return true;818 }819 820 return QApplication::event(ev);821 }822 823 808 // Check Ephemeris Consistency 824 809 //////////////////////////////////////////////////////////////////////////// 825 void bncApp::checkEphemeris(gpsephemeris* oldEph, gpsephemeris* newEph) {810 void t_pgmCore::checkEphemeris(gpsephemeris* oldEph, gpsephemeris* newEph) { 826 811 if (oldEph->clock_bias != newEph->clock_bias || 827 812 oldEph->clock_drift != newEph->clock_drift || -
trunk/BNC/src/bncapp.h
r4447 r5066 36 36 class bncTableItem; 37 37 38 class bncApp : public QApplication{38 class t_pgmCore : public QObject { 39 39 Q_OBJECT 40 40 … … 44 44 public: 45 45 enum e_mode {interactive, nonInteractive, batchPostProcessing}; 46 bncApp(int& argc, char* argv[], bool GUIenabled);47 virtual ~ bncApp();46 t_pgmCore(int& argc, char* argv[], bool GUIenabled); 47 virtual ~t_pgmCore(); 48 48 e_mode mode() const {return _mode;} 49 49 void setMode(e_mode mode) {_mode = mode;} … … 65 65 void setMainWindow(QWidget* mainWindow){_mainWindow = mainWindow;} 66 66 bool GUIenabled() const {return _GUIenabled;} 67 protected:68 virtual bool event(QEvent* ev);69 67 70 68 public slots: … … 143 141 QMap<int, bncTableItem*> _uploadTableItems; 144 142 }; 143 144 extern t_pgmCore* PGM_CORE; 145 145 146 #endif -
trunk/BNC/src/bnccaster.cpp
r4990 r5066 65 65 66 66 connect(this, SIGNAL(newMessage(QByteArray,bool)), 67 (bncApp*) qApp, SLOT(slotMessage(const QByteArray,bool)));67 PGM_CORE, SLOT(slotMessage(const QByteArray,bool))); 68 68 69 69 if ( !outFileName.isEmpty() ) { … … 483 483 emit mountPointsRead(_threads); 484 484 emit( newMessage(QString("Configuration read: " 485 + ((bncApp*) qApp)->confFileName()485 + PGM_CORE->confFileName() 486 486 + ", %1 stream(s)") 487 487 .arg(_threads.count()).toAscii(), true) ); -
trunk/BNC/src/bncephuser.cpp
r4904 r5066 51 51 52 52 if (connectSlots) { 53 connect( ((bncApp*)qApp), SIGNAL(newEphGPS(gpsephemeris)),53 connect(PGM_CORE, SIGNAL(newEphGPS(gpsephemeris)), 54 54 this, SLOT(slotNewEphGPS(gpsephemeris)), Qt::DirectConnection); 55 55 56 connect( ((bncApp*)qApp), SIGNAL(newEphGlonass(glonassephemeris)),56 connect(PGM_CORE, SIGNAL(newEphGlonass(glonassephemeris)), 57 57 this, SLOT(slotNewEphGlonass(glonassephemeris)), Qt::DirectConnection); 58 58 59 connect( ((bncApp*)qApp), SIGNAL(newEphGalileo(galileoephemeris)),59 connect(PGM_CORE, SIGNAL(newEphGalileo(galileoephemeris)), 60 60 this, SLOT(slotNewEphGalileo(galileoephemeris)), Qt::DirectConnection); 61 61 } -
trunk/BNC/src/bncgetthread.cpp
r4792 r5066 121 121 setTerminationEnabled(true); 122 122 123 bncApp* app = (bncApp*) qApp;124 125 123 connect(this, SIGNAL(newMessage(QByteArray,bool)), 126 app, SLOT(slotMessage(const QByteArray,bool)));124 PGM_CORE, SLOT(slotMessage(const QByteArray,bool))); 127 125 128 126 _isToBeDeleted = false; … … 333 331 settings.value("pppMount").toString() == _staID) { 334 332 _PPPclient = new bncPPPclient(_staID); 335 bncApp* app = (bncApp*) qApp; 336 app->_bncPPPclient = _PPPclient; 333 PGM_CORE->_bncPPPclient = _PPPclient; 337 334 qRegisterMetaType<bncTime>("bncTime"); 338 335 connect(_PPPclient, SIGNAL(newPosition(bncTime, double, double, double)), … … 443 440 if (data.isEmpty()) { 444 441 cout << "no more data" << endl; 445 ((bncApp*) qApp)->stopCombination();442 PGM_CORE->stopCombination(); 446 443 QThread::exit(0); 447 444 delete this; … … 468 465 // ----------- 469 466 if (_rawOutput) { 470 bncApp* app = (bncApp*) qApp; 471 app->writeRawData(data, _staID, _format); 467 PGM_CORE->writeRawData(data, _staID, _format); 472 468 } 473 469 -
trunk/BNC/src/bncmain.cpp
r4716 r5066 45 45 #include <iostream> 46 46 47 #include "app.h" 47 48 #include "bncapp.h" 48 49 #include "bncwindow.h" … … 116 117 117 118 bool GUIenabled = interactive || displaySet; 118 bncApp app(argc, argv, GUIenabled);119 t_app app(argc, argv, GUIenabled); 119 120 120 121 app.setApplicationName("BNC"); 121 122 app.setOrganizationName("BKG"); 122 123 app.setOrganizationDomain("www.bkg.bund.de"); 123 app.setConfFileName( confFileName );124 PGM_CORE->setConfFileName( confFileName ); 124 125 125 126 bncSettings settings; … … 137 138 if (interactive) { 138 139 139 app.setMode(bncApp::interactive);140 PGM_CORE->setMode(t_pgmCore::interactive); 140 141 141 142 QString fontString = settings.value("font").toString(); … … 150 151 151 152 bncWindow* bncWin = new bncWindow(); 152 app.setMainWindow(bncWin);153 PGM_CORE->setMainWindow(bncWin); 153 154 bncWin->show(); 154 155 } … … 159 160 // ------------------- 160 161 else if (settings.value("pppSPP").toString() == "Post-Processing") { 161 app.setMode(bncApp::batchPostProcessing);162 PGM_CORE->setMode(t_pgmCore::batchPostProcessing); 162 163 t_postProcessing* postProcessing = new t_postProcessing(0); 163 164 postProcessing->start(); … … 167 168 // ------------------------- 168 169 else if (settings.value("reqcAction").toString() == "Edit/Concatenate") { 169 app.setMode(bncApp::batchPostProcessing);170 PGM_CORE->setMode(t_pgmCore::batchPostProcessing); 170 171 t_reqcEdit* reqcEdit = new t_reqcEdit(0); 171 172 reqcEdit->start(); … … 175 176 // ---------------------------- 176 177 else if (settings.value("reqcAction").toString() == "Analyze") { 177 app.setMode(bncApp::batchPostProcessing);178 PGM_CORE->setMode(t_pgmCore::batchPostProcessing); 178 179 t_reqcAnalyze* reqcAnalyze = new t_reqcAnalyze(0); 179 180 reqcAnalyze->start(); … … 193 194 settings.value("outPort").toInt()); 194 195 195 app.setCaster(caster);196 app.setPort(settings.value("outEphPort").toInt());197 app.setPortCorr(settings.value("corrPort").toInt());198 app.initCombination();199 200 app.connect(caster, SIGNAL(getThreadsFinished()), &app, SLOT(quit()));201 202 ((bncApp*)qApp)->slotMessage("========== Start BNC v" BNCVERSION " =========", true);196 PGM_CORE->setCaster(caster); 197 PGM_CORE->setPort(settings.value("outEphPort").toInt()); 198 PGM_CORE->setPortCorr(settings.value("corrPort").toInt()); 199 PGM_CORE->initCombination(); 200 201 PGM_CORE->connect(caster, SIGNAL(getThreadsFinished()), &app, SLOT(quit())); 202 203 PGM_CORE->slotMessage("========== Start BNC v" BNCVERSION " =========", true); 203 204 204 205 // Normal case - data from Internet 205 206 // -------------------------------- 206 207 if ( rawFileName.isEmpty() ) { 207 app.setMode(bncApp::nonInteractive);208 PGM_CORE->setMode(t_pgmCore::nonInteractive); 208 209 caster->readMountPoints(); 209 210 if (caster->numStations() == 0) { … … 215 216 // ----------------------------- 216 217 else { 217 app.setMode(bncApp::batchPostProcessing);218 PGM_CORE->setMode(t_pgmCore::batchPostProcessing); 218 219 bncRawFile* rawFile = new bncRawFile(rawFileName, "", 219 220 bncRawFile::input); -
trunk/BNC/src/bncnetquery.h
r4278 r5066 13 13 14 14 bncNetQuery() { 15 connect(this, 16 (bncApp*) qApp, SLOT(slotMessage(const QByteArray,bool)));15 connect(this, SIGNAL(newMessage(QByteArray,bool)), 16 PGM_CORE, SLOT(slotMessage(const QByteArray,bool))); 17 17 } 18 18 virtual ~bncNetQuery() {} -
trunk/BNC/src/bncnetqueryv2.cpp
r4278 r5066 42 42 43 43 if (_secure && !QSslSocket::supportsSsl()) { 44 ((bncApp*)qApp)->slotMessage("No SSL support, install OpenSSL run-time libraries", true);44 PGM_CORE->slotMessage("No SSL support, install OpenSSL run-time libraries", true); 45 45 stop(); 46 46 } … … 219 219 } 220 220 221 ((bncApp*)qApp)->slotMessage(msg.toAscii(), true);221 PGM_CORE->slotMessage(msg.toAscii(), true); 222 222 223 223 if (_ignoreSslErrors) { -
trunk/BNC/src/bncpppclient.cpp
r4979 r5066 72 72 if (connectSlots) { 73 73 connect(this, SIGNAL(newMessage(QByteArray,bool)), 74 ((bncApp*)qApp), SLOT(slotMessage(const QByteArray,bool)));75 76 connect( ((bncApp*)qApp), SIGNAL(newCorrections(QList<QString>)),74 PGM_CORE, SLOT(slotMessage(const QByteArray,bool))); 75 76 connect(PGM_CORE, SIGNAL(newCorrections(QList<QString>)), 77 77 this, SLOT(slotNewCorrections(QList<QString>))); 78 78 } -
trunk/BNC/src/bncrawfile.cpp
r4278 r5066 136 136 QStringList lst = line.split(' '); 137 137 138 bncApp* app = (bncApp*) qApp; 139 delete app->_currentDateAndTimeGPS; 140 app->_currentDateAndTimeGPS = 138 delete PGM_CORE->_currentDateAndTimeGPS; 139 PGM_CORE->_currentDateAndTimeGPS = 141 140 new QDateTime(QDateTime::fromString(lst.value(0), Qt::ISODate)); 142 141 -
trunk/BNC/src/bncsettings.cpp
r5064 r5066 27 27 QMutexLocker locker(&_mutex); 28 28 29 #ifdef GNSSCENTER_PLUGIN30 _bncApp = 0;31 return;32 #else33 _bncApp = static_cast<bncApp*>(qApp);34 #endif35 36 29 // First fill the options 37 30 // ---------------------- 38 if ( _bncApp->_settings.size() == 0) {31 if (PGM_CORE->_settings.size() == 0) { 39 32 reRead(); 40 33 } … … 50 43 void bncSettings::reRead() { 51 44 52 _bncApp->_settings.clear();53 54 QSettings settings( _bncApp->confFileName(), QSettings::IniFormat);45 PGM_CORE->_settings.clear(); 46 47 QSettings settings(PGM_CORE->confFileName(), QSettings::IniFormat); 55 48 56 49 // Read from File … … 60 53 while (it.hasNext()) { 61 54 QString key = it.next(); 62 _bncApp->_settings[key] = settings.value(key);55 PGM_CORE->_settings[key] = settings.value(key); 63 56 } 64 57 } … … 225 218 QMutexLocker locker(&_mutex); 226 219 227 if ( _bncApp && _bncApp->_settings.contains(key)) {228 return _bncApp->_settings[key];220 if (PGM_CORE->_settings.contains(key)) { 221 return PGM_CORE->_settings[key]; 229 222 } 230 223 else { … … 243 236 //////////////////////////////////////////////////////////////////////////// 244 237 void bncSettings::setValue_p(const QString &key, const QVariant& value) { 245 _bncApp->_settings[key] = value;238 PGM_CORE->_settings[key] = value; 246 239 } 247 240 … … 250 243 void bncSettings::remove(const QString& key ) { 251 244 QMutexLocker locker(&_mutex); 252 _bncApp->_settings.remove(key);245 PGM_CORE->_settings.remove(key); 253 246 } 254 247 … … 257 250 void bncSettings::sync() { 258 251 QMutexLocker locker(&_mutex); 259 QSettings settings( _bncApp->confFileName(), QSettings::IniFormat);252 QSettings settings(PGM_CORE->confFileName(), QSettings::IniFormat); 260 253 settings.clear(); 261 QMapIterator<QString, QVariant> it( _bncApp->_settings);254 QMapIterator<QString, QVariant> it(PGM_CORE->_settings); 262 255 while (it.hasNext()) { 263 256 it.next(); -
trunk/BNC/src/bncsettings.h
r4278 r5066 3 3 4 4 #include <QMutex> 5 6 class bncApp;7 5 8 6 class bncSettings { … … 18 16 private: 19 17 void setValue_p(const QString &key, const QVariant& value); 20 bncApp* _bncApp;21 18 static QMutex _mutex; 22 19 }; -
trunk/BNC/src/bncutils.cpp
r4338 r5066 91 91 QDateTime currDateTimeGPS; 92 92 93 if ( ((bncApp*) qApp)->_currentDateAndTimeGPS ) {94 currDateTimeGPS = *( ((bncApp*) qApp)->_currentDateAndTimeGPS);93 if ( PGM_CORE->_currentDateAndTimeGPS ) { 94 currDateTimeGPS = *(PGM_CORE->_currentDateAndTimeGPS); 95 95 } 96 96 else { … … 116 116 //////////////////////////////////////////////////////////////////////////// 117 117 QDateTime currentDateAndTimeGPS() { 118 if ( ((bncApp*) qApp)->_currentDateAndTimeGPS ) {119 return *( ((bncApp*) qApp)->_currentDateAndTimeGPS);118 if ( PGM_CORE->_currentDateAndTimeGPS ) { 119 return *(PGM_CORE->_currentDateAndTimeGPS); 120 120 } 121 121 else { -
trunk/BNC/src/bncwindow.cpp
r5063 r5066 101 101 setWindowTitle(tr("BKG Ntrip Client (BNC) Version " BNCVERSION)); 102 102 103 connect( (bncApp*)qApp, SIGNAL(newMessage(QByteArray,bool)),104 103 connect(PGM_CORE, SIGNAL(newMessage(QByteArray,bool)), 104 this, SLOT(slotWindowMessage(QByteArray,bool))); 105 105 106 106 // Create Actions … … 1921 1921 //////////////////////////////////////////////////////////////////////////// 1922 1922 void bncWindow::slotGetThreadsFinished() { 1923 ((bncApp*)qApp)->slotMessage("All Get Threads Terminated", true);1923 PGM_CORE->slotMessage("All Get Threads Terminated", true); 1924 1924 delete _caster; _caster = 0; 1925 1925 delete _casterEph; _casterEph = 0; … … 1957 1957 _outPortLineEdit->text().toInt()); 1958 1958 1959 ((bncApp*)qApp)->setPort(_outEphPortLineEdit->text().toInt());1960 ((bncApp*)qApp)->setPortCorr(_corrPortLineEdit->text().toInt());1961 ((bncApp*)qApp)->initCombination();1959 PGM_CORE->setPort(_outEphPortLineEdit->text().toInt()); 1960 PGM_CORE->setPortCorr(_corrPortLineEdit->text().toInt()); 1961 PGM_CORE->initCombination(); 1962 1962 1963 1963 connect(_caster, SIGNAL(getThreadsFinished()), … … 1967 1967 this, SLOT(slotMountPointsRead(QList<bncGetThread*>))); 1968 1968 1969 ((bncApp*)qApp)->slotMessage("========== Start BNC v" BNCVERSION " =========", true);1969 PGM_CORE->slotMessage("========== Start BNC v" BNCVERSION " =========", true); 1970 1970 1971 1971 bncSettings settings; 1972 1972 1973 1973 QDir rnxdir(settings.value("rnxPath").toString()); 1974 if (!rnxdir.exists()) ((bncApp*)qApp)->slotMessage("Cannot find RINEX Observations directory", true);1974 if (!rnxdir.exists()) PGM_CORE->slotMessage("Cannot find RINEX Observations directory", true); 1975 1975 1976 1976 QString rnx_file = settings.value("rnxScript").toString(); 1977 1977 if ( !rnx_file.isEmpty() ) { 1978 1978 QFile rnxfile(settings.value("rnxScript").toString()); 1979 if (!rnxfile.exists()) ((bncApp*)qApp)->slotMessage("Cannot find RINEX Observations script", true);1979 if (!rnxfile.exists()) PGM_CORE->slotMessage("Cannot find RINEX Observations script", true); 1980 1980 } 1981 1981 1982 1982 QDir ephdir(settings.value("ephPath").toString()); 1983 if (!ephdir.exists()) ((bncApp*)qApp)->slotMessage("Cannot find RINEX Ephemeris directory", true);1983 if (!ephdir.exists()) PGM_CORE->slotMessage("Cannot find RINEX Ephemeris directory", true); 1984 1984 1985 1985 QDir corrdir(settings.value("corrPath").toString()); 1986 if (!corrdir.exists()) ((bncApp*)qApp)->slotMessage("Cannot find Broadcast Corrections directory", true);1986 if (!corrdir.exists()) PGM_CORE->slotMessage("Cannot find Broadcast Corrections directory", true); 1987 1987 1988 1988 QString advise_file = settings.value("adviseScript").toString(); 1989 1989 if ( !advise_file.isEmpty() ) { 1990 1990 QFile advisefile(settings.value("adviseScript").toString()); 1991 if (!advisefile.exists()) ((bncApp*)qApp)->slotMessage("Cannot find Outages script", true);1991 if (!advisefile.exists()) PGM_CORE->slotMessage("Cannot find Outages script", true); 1992 1992 } 1993 1993 … … 1995 1995 if ( !ant_file.isEmpty() ) { 1996 1996 QFile anxfile(settings.value("pppAntex").toString()); 1997 if (!anxfile.exists()) ((bncApp*)qApp)->slotMessage("Cannot find IGS ANTEX file", true);1997 if (!anxfile.exists()) PGM_CORE->slotMessage("Cannot find IGS ANTEX file", true); 1998 1998 } 1999 1999 … … 2012 2012 QMessageBox::NoButton); 2013 2013 if (iRet == QMessageBox::Yes) { 2014 ((bncApp*)qApp)->stopCombination();2014 PGM_CORE->stopCombination(); 2015 2015 delete _caster; _caster = 0; 2016 2016 delete _casterEph; _casterEph = 0; … … 2584 2584 bncIt->setFlags(bncIt->flags() & ~Qt::ItemIsEditable); 2585 2585 _uploadTable->setItem(iRow, iCol, bncIt); 2586 ((bncApp*)qApp)->_uploadTableItems[iRow] = bncIt;2586 PGM_CORE->_uploadTableItems[iRow] = bncIt; 2587 2587 } 2588 2588 else { … … 2595 2595 //////////////////////////////////////////////////////////////////////////// 2596 2596 void bncWindow::slotDelUploadRow() { 2597 ((bncApp*)qApp)->_uploadTableItems.clear();2597 PGM_CORE->_uploadTableItems.clear(); 2598 2598 int nRows = _uploadTable->rowCount(); 2599 2599 bool flg[nRows]; … … 2612 2612 } 2613 2613 for (int iRow = 0; iRow < _uploadTable->rowCount(); iRow++) { 2614 ((bncApp*)qApp)->_uploadTableItems[iRow] =2614 PGM_CORE->_uploadTableItems[iRow] = 2615 2615 (bncTableItem*) _uploadTable->item(iRow, 11); 2616 2616 } … … 2668 2668 bncIt->setFlags(bncIt->flags() & ~Qt::ItemIsEditable); 2669 2669 _uploadTable->setItem(iRow, iCol, bncIt); 2670 ((bncApp*)qApp)->_uploadTableItems[iRow] = bncIt;2670 PGM_CORE->_uploadTableItems[iRow] = bncIt; 2671 2671 } 2672 2672 else { -
trunk/BNC/src/combination/bnccomb.cpp
r4992 r5066 163 163 164 164 connect(this, SIGNAL(newMessage(QByteArray,bool)), 165 ((bncApp*)qApp), SLOT(slotMessage(const QByteArray,bool)));165 PGM_CORE, SLOT(slotMessage(const QByteArray,bool))); 166 166 167 167 // Combination Method … … 750 750 // Optionally send new Corrections to PPP 751 751 // -------------------------------------- 752 bncApp* app = (bncApp*) qApp; 753 if (app->_bncPPPclient) { 754 app->_bncPPPclient->slotNewCorrections(corrLines); 752 if (PGM_CORE->_bncPPPclient) { 753 PGM_CORE->_bncPPPclient->slotNewCorrections(corrLines); 755 754 } 756 755 } -
trunk/BNC/src/latencychecker.cpp
r4278 r5066 60 60 _staID = staID; 61 61 62 bncApp* app = (bncApp*) qApp;63 62 connect(this, SIGNAL(newMessage(QByteArray,bool)), 64 app, SLOT(slotMessage(const QByteArray,bool)));63 PGM_CORE, SLOT(slotMessage(const QByteArray,bool))); 65 64 66 65 bncSettings settings; -
trunk/BNC/src/rinex/bncpostprocess.cpp
r4619 r5066 98 98 } 99 99 else { 100 ((bncApp*) qApp)->slotMessage(msg, false);100 PGM_CORE->slotMessage(msg, false); 101 101 } 102 102 } … … 222 222 } 223 223 224 bncApp* app = (bncApp*) qApp; 225 if ( app->mode() != bncApp::interactive) { 226 app->exit(0); 224 if (PGM_CORE->mode() != t_pgmCore::interactive) { 225 qApp->exit(0); 227 226 } 228 227 else { -
trunk/BNC/src/rinex/reqcanalyze.cpp
r4718 r5066 101 101 delete _log; _log = 0; 102 102 delete _logFile; _logFile = 0; 103 bncApp* app = (bncApp*) qApp; 104 if ( app->mode() != bncApp::interactive) { 105 app->exit(0); 103 if (PGM_CORE->mode() != t_pgmCore::interactive) { 104 qApp->exit(0); 106 105 } 107 106 } … … 117 116 double maxValue) { 118 117 119 bncApp* app = dynamic_cast<bncApp*>(qApp); 120 if (app->GUIenabled()) { 118 if (PGM_CORE->GUIenabled()) { 121 119 122 120 if (maxValue == 0.0) { … … 144 142 if (data1) { 145 143 t_polarPlot* plot1 = new t_polarPlot(QwtText(title1), scaleInterval, 146 app->mainWindow());144 PGM_CORE->mainWindow()); 147 145 plot1->addCurve(data1); 148 146 plots << plot1; … … 150 148 if (data2) { 151 149 t_polarPlot* plot2 = new t_polarPlot(QwtText(title2), scaleInterval, 152 app->mainWindow());150 PGM_CORE->mainWindow()); 153 151 plot2->addCurve(data2); 154 152 plots << plot2; … … 298 296 // Show the plots 299 297 // -------------- 300 if ( dynamic_cast<bncApp*>(qApp)->GUIenabled()) {298 if (PGM_CORE->GUIenabled()) { 301 299 QFileInfo fileInfo(obsFile->fileName()); 302 300 QByteArray title = fileInfo.fileName().toAscii(); … … 653 651 const QByteArray& title) { 654 652 655 if ( dynamic_cast<bncApp*>(qApp)->GUIenabled()) {653 if (PGM_CORE->GUIenabled()) { 656 654 t_availPlot* plotA = new t_availPlot(0, &_availDataMap); 657 655 plotA->setTitle(title); -
trunk/BNC/src/rinex/reqcedit.cpp
r4541 r5066 103 103 // --------------- 104 104 if (_log) { 105 bncApp* app = (bncApp*) qApp;106 107 105 *_log << QByteArray(78, '-') << endl; 108 106 *_log << "Concatenation of RINEX Observation and/or Navigation Files\n"; … … 110 108 111 109 *_log << QByteArray("Program").leftJustified(15) << ": " 112 << app->pgmName() << endl;110 << PGM_CORE->pgmName() << endl; 113 111 *_log << QByteArray("Run by").leftJustified(15) << ": " 114 << app->userName() << endl;112 << PGM_CORE->userName() << endl; 115 113 *_log << QByteArray("Date").leftJustified(15) << ": " 116 114 << QDateTime::currentDateTime().toUTC().toString("yyyy-MM-dd hh:mm:ss") << endl; … … 148 146 // Exit (thread) 149 147 // ------------- 150 bncApp* app = (bncApp*) qApp; 151 if ( app->mode() != bncApp::interactive) { 152 app->exit(0); 148 if (PGM_CORE->mode() != t_pgmCore::interactive) { 149 qApp->exit(0); 153 150 } 154 151 else { -
trunk/BNC/src/rinex/rnxnavfile.cpp
r4232 r5066 241 241 void t_rnxNavFile::writeHeader(const QMap<QString, QString>* txtMap) { 242 242 243 bncApp* app = (bncApp*) qApp; 244 245 QString runBy = app->userName(); 243 QString runBy = PGM_CORE->userName(); 246 244 QStringList comments; 247 245 … … 277 275 : "yyyyMMdd hhmmss UTC"; 278 276 *_stream << QString("%1%2%3") 279 .arg( app->pgmName(), -20)277 .arg(PGM_CORE->pgmName(), -20) 280 278 .arg(runBy.trimmed().left(20), -20) 281 279 .arg(QDateTime::currentDateTime().toUTC().toString(fmtDate), -20) -
trunk/BNC/src/rinex/rnxobsfile.cpp
r4748 r5066 212 212 const QMap<QString, QString>* txtMap) const { 213 213 214 bncApp* app = (bncApp*) qApp;215 216 214 QStringList newComments; 217 QString runBy = app->userName();215 QString runBy = PGM_CORE->userName(); 218 216 219 217 if (txtMap) { … … 238 236 : "yyyyMMdd hhmmss UTC"; 239 237 *stream << QString("%1%2%3") 240 .arg( app->pgmName(), -20)238 .arg(PGM_CORE->pgmName(), -20) 241 239 .arg(runBy.trimmed().left(20), -20) 242 240 .arg(QDateTime::currentDateTime().toUTC().toString(fmtDate), -20) -
trunk/BNC/src/src.pro
r4807 r5066 57 57 bncephuser.h bncoutf.h bncclockrinex.h bncsp3.h \ 58 58 bncbytescounter.h bncsslconfig.h reqcdlg.h \ 59 app.h \ 59 60 upload/bncrtnetdecoder.h upload/bncuploadcaster.h \ 60 61 upload/bncrtnetuploadcaster.h upload/bnccustomtrafo.h \ … … 86 87 bncephuser.cpp bncoutf.cpp bncclockrinex.cpp bncsp3.cpp \ 87 88 bncbytescounter.cpp bncsslconfig.cpp reqcdlg.cpp \ 89 app.cpp \ 88 90 upload/bncrtnetdecoder.cpp upload/bncuploadcaster.cpp \ 89 91 upload/bncrtnetuploadcaster.cpp upload/bnccustomtrafo.cpp \ -
trunk/BNC/src/upload/bncuploadcaster.cpp
r4985 r5066 45 45 _isToBeDeleted = false; 46 46 47 bncApp* app = (bncApp*) qApp;48 47 connect(this, SIGNAL(newMessage(QByteArray,bool)), 49 app, SLOT(slotMessage(const QByteArray,bool)));48 PGM_CORE, SLOT(slotMessage(const QByteArray,bool))); 50 49 51 if ( app->_uploadTableItems.find(_iRow) != app->_uploadTableItems.end()){50 if (PGM_CORE->_uploadTableItems.find(_iRow) != PGM_CORE->_uploadTableItems.end()){ 52 51 connect(this, SIGNAL(newBytes(QByteArray,double)), 53 app->_uploadTableItems.value(iRow),52 PGM_CORE->_uploadTableItems.value(iRow), 54 53 SLOT(slotNewBytes(const QByteArray,double))); 55 54 }
Note:
See TracChangeset
for help on using the changeset viewer.