Changeset 463 in ntrip


Ignore:
Timestamp:
May 26, 2007, 1:11:59 PM (15 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNC
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncapp.h

    r280 r463  
    5757#include "bnccaster.h"
    5858
    59 extern bncCaster* _global_caster;
    60 
    6159class bncApp : public QApplication {
    6260  Q_OBJECT
  • trunk/BNC/bnccaster.cpp

    r462 r463  
    114114// New Observations
    115115////////////////////////////////////////////////////////////////////////////
    116 void bncCaster::newObs(const QByteArray& staID, bool firstObs,
     116void bncCaster::newObs(const QByteArray staID, bool firstObs,
    117117                       Observation* obs) {
    118118
     
    169169////////////////////////////////////////////////////////////////////////////
    170170void bncCaster::addGetThread(bncGetThread* getThread) {
     171  connect(getThread, SIGNAL(newObs(const QByteArray, bool, Observation*)),
     172          this,      SLOT(newObs(const QByteArray, bool, Observation*)));
     173
    171174  connect(getThread, SIGNAL(error(const QByteArray)),
    172175          this, SLOT(slotGetThreadError(const QByteArray)));
  • trunk/BNC/bnccaster.h

    r462 r463  
    4343   void addGetThread(bncGetThread* getThread);
    4444   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);
    4648
    4749 signals:
  • trunk/BNC/bncgetthread.cpp

    r459 r463  
    404404          emit newBytes(_staID, sizeof(**it));
    405405          bool firstObs = (it == _decoder->_obsList.begin());
    406           _global_caster->newObs(_staID, firstObs, *it);
     406          emit newObs(_staID, firstObs, *it);
    407407        }
    408408        _decoder->_obsList.clear();
  • trunk/BNC/bncgetthread.h

    r459 r463  
    5353 signals:
    5454   void newBytes(const QByteArray staID, double nbyte);
     55   void newObs(const QByteArray staID, bool firstObs, Observation* obs);
    5556   void error(const QByteArray staID);
    5657   void newMessage(const QByteArray msg);
  • trunk/BNC/bncmain.cpp

    r366 r463  
    5050using namespace std;
    5151
    52 bncCaster* _global_caster = 0;
    53 
    5452// Main Program
    5553/////////////////////////////////////////////////////////////////////////////
     
    102100  // ----------------------------
    103101  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());
    106104
    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&)),
    109107                &app, SLOT(slotMessage(const QByteArray&)));
    110108 
     
    126124                  &app, SLOT(slotMessage(const QByteArray&)));
    127125
    128       _global_caster->addGetThread(getThread);
     126      caster->addGetThread(getThread);
    129127
    130128      getThread->start();
    131129    }
    132     if (_global_caster->numStations() == 0) {
     130    if (caster->numStations() == 0) {
    133131      return 0;
    134132    }
  • trunk/BNC/bncwindow.cpp

    r460 r463  
    474474  _actStop->setEnabled(true);
    475475
    476   _global_caster = new bncCaster(_outFileLineEdit->text(),
     476  _caster = new bncCaster(_outFileLineEdit->text(),
    477477                             _outPortLineEdit->text().toInt());
    478478
    479   connect(_global_caster, SIGNAL(getThreadErrors()),
     479  connect(_caster, SIGNAL(getThreadErrors()),
    480480          this, SLOT(slotGetThreadErrors()));
    481481
    482   connect(_global_caster, SIGNAL(newMessage(const QByteArray&)),
     482  connect(_caster, SIGNAL(newMessage(const QByteArray&)),
    483483          this, SLOT(slotMessage(const QByteArray&)));
    484   connect(_global_caster, SIGNAL(newMessage(const QByteArray&)),
     484  connect(_caster, SIGNAL(newMessage(const QByteArray&)),
    485485          (bncApp*)qApp, SLOT(slotMessage(const QByteArray&)));
    486486
     
    509509            SLOT(slotNewBytes(const QByteArray, double)));
    510510
    511     _global_caster->addGetThread(getThread);
     511    _caster->addGetThread(getThread);
    512512
    513513    getThread->start();
     
    522522                                   QMessageBox::NoButton);
    523523  if (iRet == QMessageBox::Yes) {
    524     delete _global_caster; _global_caster = 0;
     524    delete _caster; _caster = 0;
    525525    _actGetData->setEnabled(true);
    526526    _actStop->setEnabled(false);
  • trunk/BNC/bncwindow.h

    r458 r463  
    3131
    3232#include "bncgetthread.h"
     33#include "bnccaster.h"
    3334
    3435class bncWindow : public QMainWindow {
     
    9596
    9697    QWidget*   _canvas;
     98
     99    bncCaster* _caster;
    97100};
    98101#endif
Note: See TracChangeset for help on using the changeset viewer.