Changeset 463 in ntrip
- Timestamp:
- May 26, 2007, 1:11:59 PM (18 years ago)
- Location:
- trunk/BNC
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncapp.h
r280 r463 57 57 #include "bnccaster.h" 58 58 59 extern bncCaster* _global_caster;60 61 59 class bncApp : public QApplication { 62 60 Q_OBJECT -
trunk/BNC/bnccaster.cpp
r462 r463 114 114 // New Observations 115 115 //////////////////////////////////////////////////////////////////////////// 116 void bncCaster::newObs(const QByteArray &staID, bool firstObs,116 void bncCaster::newObs(const QByteArray staID, bool firstObs, 117 117 Observation* obs) { 118 118 … … 169 169 //////////////////////////////////////////////////////////////////////////// 170 170 void bncCaster::addGetThread(bncGetThread* getThread) { 171 connect(getThread, SIGNAL(newObs(const QByteArray, bool, Observation*)), 172 this, SLOT(newObs(const QByteArray, bool, Observation*))); 173 171 174 connect(getThread, SIGNAL(error(const QByteArray)), 172 175 this, SLOT(slotGetThreadError(const QByteArray))); -
trunk/BNC/bnccaster.h
r462 r463 43 43 void addGetThread(bncGetThread* getThread); 44 44 int numStations() const {return _staIDs.size();} 45 void newObs(const QByteArray& staID, bool firstObs, Observation* obs); 45 46 public slots: 47 void newObs(const QByteArray staID, bool firstObs, Observation* obs); 46 48 47 49 signals: -
trunk/BNC/bncgetthread.cpp
r459 r463 404 404 emit newBytes(_staID, sizeof(**it)); 405 405 bool firstObs = (it == _decoder->_obsList.begin()); 406 _global_caster->newObs(_staID, firstObs, *it);406 emit newObs(_staID, firstObs, *it); 407 407 } 408 408 _decoder->_obsList.clear(); -
trunk/BNC/bncgetthread.h
r459 r463 53 53 signals: 54 54 void newBytes(const QByteArray staID, double nbyte); 55 void newObs(const QByteArray staID, bool firstObs, Observation* obs); 55 56 void error(const QByteArray staID); 56 57 void newMessage(const QByteArray msg); -
trunk/BNC/bncmain.cpp
r366 r463 50 50 using namespace std; 51 51 52 bncCaster* _global_caster = 0;53 54 52 // Main Program 55 53 ///////////////////////////////////////////////////////////////////////////// … … 102 100 // ---------------------------- 103 101 else { 104 _global_caster = new bncCaster(settings.value("outFile").toString(),105 settings.value("outPort").toInt()); 102 bncCaster* caster = new bncCaster(settings.value("outFile").toString(), 103 settings.value("outPort").toInt()); 106 104 107 app.connect( _global_caster, SIGNAL(getThreadErrors()), &app, SLOT(quit()));108 app.connect( _global_caster, SIGNAL(newMessage(const QByteArray&)),105 app.connect(caster, SIGNAL(getThreadErrors()), &app, SLOT(quit())); 106 app.connect(caster, SIGNAL(newMessage(const QByteArray&)), 109 107 &app, SLOT(slotMessage(const QByteArray&))); 110 108 … … 126 124 &app, SLOT(slotMessage(const QByteArray&))); 127 125 128 _global_caster->addGetThread(getThread);126 caster->addGetThread(getThread); 129 127 130 128 getThread->start(); 131 129 } 132 if ( _global_caster->numStations() == 0) {130 if (caster->numStations() == 0) { 133 131 return 0; 134 132 } -
trunk/BNC/bncwindow.cpp
r460 r463 474 474 _actStop->setEnabled(true); 475 475 476 _ global_caster = new bncCaster(_outFileLineEdit->text(),476 _caster = new bncCaster(_outFileLineEdit->text(), 477 477 _outPortLineEdit->text().toInt()); 478 478 479 connect(_ global_caster, SIGNAL(getThreadErrors()),479 connect(_caster, SIGNAL(getThreadErrors()), 480 480 this, SLOT(slotGetThreadErrors())); 481 481 482 connect(_ global_caster, SIGNAL(newMessage(const QByteArray&)),482 connect(_caster, SIGNAL(newMessage(const QByteArray&)), 483 483 this, SLOT(slotMessage(const QByteArray&))); 484 connect(_ global_caster, SIGNAL(newMessage(const QByteArray&)),484 connect(_caster, SIGNAL(newMessage(const QByteArray&)), 485 485 (bncApp*)qApp, SLOT(slotMessage(const QByteArray&))); 486 486 … … 509 509 SLOT(slotNewBytes(const QByteArray, double))); 510 510 511 _ global_caster->addGetThread(getThread);511 _caster->addGetThread(getThread); 512 512 513 513 getThread->start(); … … 522 522 QMessageBox::NoButton); 523 523 if (iRet == QMessageBox::Yes) { 524 delete _ global_caster; _global_caster = 0;524 delete _caster; _caster = 0; 525 525 _actGetData->setEnabled(true); 526 526 _actStop->setEnabled(false); -
trunk/BNC/bncwindow.h
r458 r463 31 31 32 32 #include "bncgetthread.h" 33 #include "bnccaster.h" 33 34 34 35 class bncWindow : public QMainWindow { … … 95 96 96 97 QWidget* _canvas; 98 99 bncCaster* _caster; 97 100 }; 98 101 #endif
Note:
See TracChangeset
for help on using the changeset viewer.