Changeset 3736 in ntrip for trunk/BNC/bncwindow.cpp


Ignore:
Timestamp:
Mar 27, 2012, 6:47:44 PM (12 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncwindow.cpp

    r3735 r3736  
    7878  _bncFigureLate = new bncFigureLate(this);
    7979  _bncFigurePPP = new bncFigurePPP(this);
    80   _postProcessingRunning = false;
     80  _postProcessingRunningPPP  = false;
     81  _postProcessingRunningTeqc = false;
    8182
    8283  int ww = QFontMetrics(this->font()).width('w');
     
    607608  _aogroup->addTab(uploadgroup,tr("Upload (clk)"));
    608609  _aogroup->addTab(uploadEphgroup,tr("Upload (eph)"));
     610
     611  connect(_aogroup, SIGNAL(currentChanged(int)),
     612          this, SLOT(slotEnablePostProcessing()));
    609613
    610614  // Log Tab
     
    21162120    enableWidget(enable9, _postCorrFileChooser);
    21172121    enableWidget(enable9, _postOutLineEdit);
    2118     _actPostProcessing->setEnabled(enable9);
    2119 
    21202122    enableWidget(!enable9, _pppMountLineEdit);
     2123
     2124    slotEnablePostProcessing();
    21212125  }
    21222126}
     
    23012305void bncWindow::slotStartPostProcessing() {
    23022306  if      (_aogroup->currentIndex() == _tabIndexPPP1 ||
    2303       _aogroup->currentIndex() == _tabIndexPPP2) {
     2307           _aogroup->currentIndex() == _tabIndexPPP2) {
    23042308    startPostProcessingPPP();
    23052309  }
     
    23132317void bncWindow::startPostProcessingPPP() {
    23142318#ifdef USE_POSTPROCESSING
    2315   _actPostProcessing->setEnabled(false);
     2319  _postProcessingRunningPPP = true;
     2320  slotEnablePostProcessing();
    23162321  _actPostProcessing->setText("0 Epochs");
    23172322
     
    23192324
    23202325  t_postProcessing* postProcessing = new t_postProcessing(this);
    2321   connect(postProcessing, SIGNAL(finished()), this, SLOT(slotFinishedPostProcessing()));
     2326  connect(postProcessing, SIGNAL(finished()), this, SLOT(slotFinishedPostProcessingPPP()));
    23222327  connect(postProcessing, SIGNAL(progress(int)), this, SLOT(slotPostProgress(int)));
    23232328
     
    23312336// Post-Processing PPP Finished
    23322337////////////////////////////////////////////////////////////////////////////
    2333 void bncWindow::slotFinishedPostProcessing() {
     2338void bncWindow::slotFinishedPostProcessingPPP() {
     2339  _postProcessingRunningPPP = false;
    23342340  QMessageBox::information(this, "Information",
    23352341                           "Post-Processing Thread Finished");
    2336   _actPostProcessing->setText("Start Post-Processing");
    2337   _actPostProcessing->setEnabled(true);
     2342  slotEnablePostProcessing();
    23382343}
    23392344
     
    23492354////////////////////////////////////////////////////////////////////////////
    23502355void bncWindow::startPostProcessingTeqc() {
     2356  _postProcessingRunningTeqc = false;  // TODO
    23512357  QMessageBox::information(this, "Information",
    23522358                           "Teqc-Processing Not Yet Implemented");
     2359  slotEnablePostProcessing();
    23532360}
    23542361
    23552362// Post-Processing Teqc Finished
    23562363////////////////////////////////////////////////////////////////////////////
    2357 void bncWindow::slotFinishedTeqcProcessing() {
     2364void bncWindow::slotFinishedPostProcessingTeqc() {
     2365  _postProcessingRunningTeqc = false;
    23582366  QMessageBox::information(this, "Information",
    23592367                           "Teqc-Processing Thread Finished");
    2360 }
     2368  slotEnablePostProcessing();
     2369}
     2370
     2371// Enable/Disable Post-Processing Action
     2372////////////////////////////////////////////////////////////////////////////
     2373void bncWindow::slotEnablePostProcessing() {
     2374  if (_actPostProcessing) {
     2375    if (_postProcessingRunningPPP || _postProcessingRunningTeqc) {
     2376      _actPostProcessing->setEnabled(false);
     2377    }
     2378    else {
     2379      _actPostProcessing->setText("Start PPP/Teqc");
     2380      if      (_aogroup->currentIndex() == _tabIndexPPP1 ||
     2381               _aogroup->currentIndex() == _tabIndexPPP2) {
     2382        bool enable = _pppSPPComboBox->currentText() == "RNX";
     2383        _actPostProcessing->setEnabled(enable);
     2384      }
     2385      else if (_aogroup->currentIndex() == _tabIndexTeqc) {
     2386        _actPostProcessing->setEnabled(true);
     2387      }
     2388      else {
     2389        _actPostProcessing->setEnabled(false);
     2390      }
     2391    }
     2392  }
     2393}
     2394
Note: See TracChangeset for help on using the changeset viewer.