Changeset 3685 in ntrip


Ignore:
Timestamp:
Feb 12, 2012, 1:07:29 PM (12 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncpostprocess.cpp

    r3684 r3685  
    102102  }
    103103
    104   // Read Observations
    105   // -----------------
     104  // Read/Process Observations
     105  // -------------------------
     106  int   nEpo = 0;
    106107  const t_rnxObsFile::t_epo* epo = 0;
    107108  while ( (epo = _rnxObsFile->nextEpoch()) != 0 ) {
     109    ++nEpo;
    108110    for (int iObs = 0; iObs < epo->satObs.size(); iObs++) {
    109111      const t_rnxObsFile::t_satObs& satObs = epo->satObs[iObs];
     
    138140      _pppClient->putNewObs(obs);
    139141    }
     142    if (nEpo % 10 == 0) {
     143      emit progress(nEpo);
     144    }
    140145  }
    141 
    142 //  ///// beg test
    143 //  int MAXI = 5;
    144 //  for (int ii = 1; ii < MAXI; ii++) {
    145 //    cout << "ii = " << ii << endl;
    146 //    emit progress(float(ii)/float(MAXI));
    147 //    sleep(1);
    148 //  }
    149 //  //// end test
    150146
    151147  emit finished();
  • trunk/BNC/bncpostprocess.h

    r3646 r3685  
    4747
    4848 signals:
    49   void progress(float);
     49  void progress(int);
    5050  void finished();
    5151  void newEphGPS(gpsephemeris gpseph);
  • trunk/BNC/bncwindow.cpp

    r3641 r3685  
    120120  _actPostProcessing = new QAction(tr("Start PP"),this);
    121121  connect(_actPostProcessing, SIGNAL(triggered()), SLOT(slotStartPostProcessing()));
    122 
    123   _postProgressBar = new QProgressBar;
    124   _postProgressBar->setMinimum(0);
    125   _postProgressBar->setMaximum(100);
    126   _postProgressBar->setMinimumWidth(15*ww);
    127   _postProgressBar->setMaximumWidth(15*ww);
    128122
    129123  _actStop = new QAction(tr("Sto&p"),this);
     
    18161810////////////////////////////////////////////////////////////////////////////
    18171811void bncWindow::AddToolbar() {
    1818   // Tool (Command) Bar
    1819   // ------------------
    18201812  QToolBar* toolBar = new QToolBar;
    18211813  addToolBar(Qt::BottomToolBarArea, toolBar);
     
    18261818  toolBar->addAction(_actStop);
    18271819  toolBar->addAction(_actPostProcessing);
    1828   _postProgressLabel = new QLabel("  Progress");
     1820  _postProgressLabel = new QLabel("0 Epochs");
    18291821  toolBar->addWidget(_postProgressLabel);
    1830   toolBar->addWidget(_postProgressBar);
    18311822  enableWidget(false, _postProgressLabel);
    18321823  toolBar->addWidget(new QLabel("                                           "));
     
    22492240  slotSaveOptions();
    22502241
    2251   _postProgressBar->reset();
     2242  _postProgressLabel->setText("0 Epochs");
    22522243  enableWidget(true, _postProgressLabel);
    22532244
    22542245  t_postProcessing* postProcessing = new t_postProcessing(this);
    22552246  connect(postProcessing, SIGNAL(finished()), this, SLOT(slotFinishedPostProcessing()));
    2256   connect(postProcessing, SIGNAL(progress(float)), this, SLOT(slotPostProgress(float)));
     2247  connect(postProcessing, SIGNAL(progress(int)), this, SLOT(slotPostProgress(int)));
    22572248
    22582249  postProcessing->start();
     
    22652256                           "Post-Processing Thread Finished");
    22662257  enableWidget(false, _postProgressLabel);
    2267   _postProgressBar->reset();
    22682258  _actPostProcessing->setEnabled(true);
    22692259}
     
    22712261// Progress Bar Change
    22722262////////////////////////////////////////////////////////////////////////////
    2273 void bncWindow::slotPostProgress(float progress) {
    2274   if (_postProgressBar) {
    2275     _postProgressBar->setValue(int(progress*100.0));
    2276   }
    2277 }
     2263void bncWindow::slotPostProgress(int nEpo) {
     2264  if (_postProgressLabel) {
     2265    _postProgressLabel->setText(QString("%1 Epochs").arg(nEpo));
     2266  }
     2267}
  • trunk/BNC/bncwindow.h

    r3629 r3685  
    6666    void slotMountPointsRead(QList<bncGetThread*>);
    6767    void slotBncTextChanged();
    68     void slotPostProgress(float);
     68    void slotPostProgress(int);
    6969
    7070  private slots:
     
    162162    qtFileChooser* _postNavFileChooser;
    163163    qtFileChooser* _postCorrFileChooser;
    164     QProgressBar*  _postProgressBar;
    165164    QLabel*        _postProgressLabel;
    166165    QLineEdit*     _postOutLineEdit;
Note: See TracChangeset for help on using the changeset viewer.