Changeset 3787 in ntrip
- Timestamp:
- Apr 5, 2012, 12:26:47 PM (13 years ago)
- Location:
- trunk/BNC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncwindow.cpp
r3786 r3787 126 126 _actStop = new QAction(tr("Sto&p"),this); 127 127 connect(_actStop, SIGNAL(triggered()), SLOT(slotStop())); 128 _actStop->setEnabled(false);128 enableStartStop(); 129 129 130 130 _actwhatsthis= new QAction(tr("Help ?=Shift+F1"),this); … … 1230 1230 1231 1231 QListIterator<QString> it(settings.value("mountPoints").toStringList()); 1232 if (!it.hasNext()) {1233 _actStart->setEnabled(false);1234 }1235 1232 int iRow = 0; 1236 1233 while (it.hasNext()) { … … 1294 1291 1295 1292 _mountPointsTable->sortItems(1); 1293 1294 enableStartStop(); 1296 1295 } 1297 1296 … … 1361 1360 // Cancel 1362 1361 } 1362 1363 enableStartStop(); 1363 1364 } 1364 1365 … … 1384 1385 _actDeleteMountPoints->setEnabled(false); 1385 1386 1386 if (_mountPointsTable->rowCount() == 0) { 1387 _actStart->setEnabled(false); 1388 } 1387 enableStartStop(); 1389 1388 } 1390 1389 … … 1451 1450 _mountPointsTable->hideColumn(0); 1452 1451 _mountPointsTable->sortItems(1); 1453 if (mountPoints->count() > 0 && !_actStop->isEnabled()) {1454 _actStart->setEnabled(true);1455 }1456 1452 delete mountPoints; 1453 1454 enableStartStop(); 1457 1455 } 1458 1456 … … 1652 1650 delete _caster; _caster = 0; 1653 1651 delete _casterEph; _casterEph = 0; 1654 _actStart->setEnabled(true); 1655 _actStop->setEnabled(false); 1652 _runningRealTime = false; 1656 1653 } 1657 1654 … … 1675 1672 void bncWindow::startRealTime() { 1676 1673 1674 _runningRealTime = true; 1675 1677 1676 _bncFigurePPP->reset(); 1678 1677 1679 1678 _actDeleteMountPoints->setEnabled(false); 1680 _actStart->setEnabled(false); 1681 _actStop->setEnabled(true);1679 1680 enableStartStop(); 1682 1681 1683 1682 _caster = new bncCaster(_outFileLineEdit->text(), … … 1742 1741 delete _caster; _caster = 0; 1743 1742 delete _casterEph; _casterEph = 0; 1744 _actStart->setEnabled(true); 1745 _actStop->setEnabled(false); 1743 _runningRealTime = false; 1746 1744 } 1747 1745 } … … 2353 2351 "Post-Processing Thread Finished"); 2354 2352 _actStart->setText("Start"); 2355 _actStart->setEnabled(true);2353 enableStartStop(); 2356 2354 } 2357 2355 … … 2388 2386 delete dlg; 2389 2387 } 2388 2389 // Enable/Disable Start and Stop Buttons 2390 //////////////////////////////////////////////////////////////////////////// 2391 void bncWindow::enableStartStop() { 2392 2393 if ( _pppSPPComboBox->currentText() == "Post-Processing" ) { 2394 _actStart->setEnabled(true); 2395 _actStop->setEnabled(false); 2396 } 2397 else if ( !_teqcActionComboBox->currentText().isEmpty() ) { 2398 _actStart->setEnabled(true); 2399 _actStop->setEnabled(false); 2400 } 2401 else { 2402 if (_runningRealTime) { 2403 _actStart->setEnabled(false); 2404 _actStop->setEnabled(true); 2405 } 2406 else { 2407 _actStop->setEnabled(false); 2408 if (_mountPointsTable->rowCount() == 0) { 2409 _actStart->setEnabled(false); 2410 } 2411 else { 2412 _actStart->setEnabled(true); 2413 } 2414 } 2415 } 2416 } -
trunk/BNC/bncwindow.h
r3782 r3787 103 103 void startPostProcessingPPP(); 104 104 void startPostProcessingTeqc(); 105 void enableStartStop(); 105 106 106 107 QMenu* _menuHlp;
Note:
See TracChangeset
for help on using the changeset viewer.