Changeset 5971 in ntrip for trunk/BNC/src/bncwindow.cpp


Ignore:
Timestamp:
Aug 17, 2014, 12:50:34 PM (10 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bncwindow.cpp

    r5968 r5971  
    9494          _bncFigurePPP, SLOT(slotNewPosition(QByteArray, bncTime, QVector<double>)));
    9595
    96   connect(BNC_CORE, SIGNAL(progressRnxPPP(int)), this, SLOT(slotPostProgress(int)));
    97   connect(BNC_CORE, SIGNAL(finishedRnxPPP()), this, SLOT(slotFinishedRnxPPP()));
    98 
    99   _runningRealTime           = false;
    100   _runningPostProcessingReqc = false;
    101   _reqcActionComboBox        = 0; // necessary for enableStartStop()
     96  connect(BNC_CORE, SIGNAL(progressRnxPPP(int)), this, SLOT(slotPostProcessingProgress(int)));
     97  connect(BNC_CORE, SIGNAL(finishedRnxPPP()),    this, SLOT(slotPostProcessingFinished()));
     98
     99  _runningRealTime    = false;
     100  _runningPPP         = false;
     101  _runningEdit        = false;
     102  _runningQC          = false;
     103  _reqcActionComboBox = 0; // necessary for enableStartStop()
    102104
    103105  _mapWin = 0;
     
    16721674  saveOptions();
    16731675  if      ( _pppWidgets._dataSource->currentText() == "RINEX Files") {
     1676    _runningPPP = true;
     1677    enableStartStop();
    16741678    BNC_CORE->startPPP();
    16751679  }
    16761680  else if ( !_reqcActionComboBox->currentText().isEmpty() ) {
    1677     startPostProcessingReqc();
     1681    if (_reqcActionComboBox->currentText() == "Analyze") {
     1682      _runningQC = true;
     1683      t_reqcAnalyze* reqcAnalyze = new t_reqcAnalyze(this);
     1684      connect(reqcAnalyze, SIGNAL(finished()), this, SLOT(slotPostProcessingFinished()));
     1685      reqcAnalyze->start();
     1686    }
     1687    else {
     1688      _runningEdit = true;
     1689      t_reqcEdit* reqcEdit = new t_reqcEdit(this);
     1690      connect(reqcEdit, SIGNAL(finished()), this, SLOT(slotPostProcessingFinished()));
     1691      reqcEdit->start();
     1692    }
     1693    enableStartStop();
    16781694  }
    16791695  else {
     
    17491765////////////////////////////////////////////////////////////////////////////
    17501766void bncWindow::slotStop() {
    1751   int iRet = QMessageBox::question(this, "Stop", "Stop retrieving data?",
     1767  int iRet = QMessageBox::question(this, "Stop", "Stop retrieving/processing data?",
    17521768                                   QMessageBox::Yes, QMessageBox::No,
    17531769                                   QMessageBox::NoButton);
     
    17581774    delete _casterEph; _casterEph = 0;
    17591775    _runningRealTime = false;
     1776    _runningPPP      = false;
    17601777    enableStartStop();
    17611778  }
     
    23362353// Progress Bar Change
    23372354////////////////////////////////////////////////////////////////////////////
    2338 void bncWindow::slotPostProgress(int nEpo) {
    2339   if (_actStart) {
    2340     _actStart->setText(QString("%1 Epochs").arg(nEpo));
    2341   }
    2342 }
    2343 
    2344 // Start Post-Processing Reqc
    2345 ////////////////////////////////////////////////////////////////////////////
    2346 void bncWindow::startPostProcessingReqc() {
    2347   _runningPostProcessingReqc = true;
     2355void bncWindow::slotPostProcessingProgress(int nEpo) {
     2356  _actStart->setText(QString("%1 Epochs").arg(nEpo));
     2357}
     2358
     2359// Post-Processing Reqc Finished
     2360////////////////////////////////////////////////////////////////////////////
     2361void bncWindow::slotPostProcessingFinished() {
     2362  _runningPPP  = false;
     2363  _runningEdit = false;
     2364  _runningQC   = false;
    23482365  enableStartStop();
    2349   if (_reqcActionComboBox->currentText() == "Analyze") {
    2350     t_reqcAnalyze* reqcAnalyze = new t_reqcAnalyze(this);
    2351     connect(reqcAnalyze, SIGNAL(finished()),
    2352             this, SLOT(slotFinishedPostProcessingReqc()));
    2353     reqcAnalyze->start();
    2354   }
    2355   else {
    2356     t_reqcEdit* reqcEdit = new t_reqcEdit(this);
    2357     connect(reqcEdit, SIGNAL(finished()),
    2358             this, SLOT(slotFinishedPostProcessingReqc()));
    2359     reqcEdit->start();
    2360   }
    2361 }
    2362 
    2363 // Post-Processing Reqc Finished
    2364 ////////////////////////////////////////////////////////////////////////////
    2365 void bncWindow::slotFinishedPostProcessingReqc() {
    2366   _runningPostProcessingReqc = false;
    2367   if (_reqcActionComboBox->currentText() != "Analyze") {
    2368     QMessageBox::information(this, "Information",
    2369                              "RINEX Processing Thread Finished");
    2370   }
    2371   enableStartStop();
    2372 }
    2373 
    2374 //
    2375 ////////////////////////////////////////////////////////////////////////////
    2376 void bncWindow::slotFinishedRnxPPP() {
    2377   if (_actStart) {
    2378     _actStart->setText(tr("Sta&rt"));
    2379   }
    23802366}
    23812367
     
    23922378////////////////////////////////////////////////////////////////////////////
    23932379void bncWindow::enableStartStop() {
    2394 
    2395   if ( _reqcActionComboBox && !_reqcActionComboBox->currentText().isEmpty() ) {
    2396     if (_runningPostProcessingReqc) {
    2397       _actStart->setEnabled(false);
    2398     }
    2399     else {
    2400       _actStart->setEnabled(true);
    2401     }
     2380  if ( running() ) {
     2381    _actStart->setEnabled(false);
     2382    if (_runningPPP) {
     2383      _actStop->setEnabled(true);
     2384    }
     2385  }
     2386  else {
     2387    _actStart->setEnabled(true);
    24022388    _actStop->setEnabled(false);
    2403   }
    2404   else {
    2405     if (_runningRealTime) {
    2406       _actStart->setEnabled(false);
    2407       _actStop->setEnabled(true);
    2408     }
    2409     else {
    2410       _actStop->setEnabled(false);
    2411       if (_mountPointsTable->rowCount() == 0) {
    2412         _actStart->setEnabled(false);
    2413       }
    2414       else {
    2415         _actStart->setEnabled(true);
    2416       }
    2417     }
    24182389  }
    24192390}
Note: See TracChangeset for help on using the changeset viewer.