Changeset 2128 in ntrip
- Timestamp:
- Dec 28, 2009, 11:06:52 AM (15 years ago)
- Location:
- trunk/BNC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncwindow.cpp
r2127 r2128 126 126 _proxyPortLineEdit = new QLineEdit(settings.value("proxyPort").toString()); 127 127 128 connect(_proxyHostLineEdit, SIGNAL(textChanged(const QString &)), 129 this, SLOT(slotBncTextChanged())); 130 128 131 // General Options 129 132 // --------------- … … 165 168 _rnxV3CheckBox->setCheckState(Qt::CheckState(settings.value("rnxV3").toInt())); 166 169 170 connect(_rnxPathLineEdit, SIGNAL(textChanged(const QString &)), 171 this, SLOT(slotBncTextChanged())); 172 167 173 // RINEX Ephemeris Options 168 174 // ----------------------- … … 179 185 _ephV3CheckBox->setCheckState(Qt::CheckState(settings.value("ephV3").toInt())); 180 186 187 connect(_outEphPortLineEdit, SIGNAL(textChanged(const QString &)), 188 this, SLOT(slotBncTextChanged())); 189 190 connect(_ephPathLineEdit, SIGNAL(textChanged(const QString &)), 191 this, SLOT(slotBncTextChanged())); 192 181 193 // Broadcast Corrections Options 182 194 // ----------------------------- … … 196 208 _corrTimeSpinBox->setSuffix(" sec"); 197 209 _corrTimeSpinBox->setValue(settings.value("corrTime").toInt()); 210 211 connect(_corrPathLineEdit, SIGNAL(textChanged(const QString &)), 212 this, SLOT(slotBncTextChanged())); 213 214 connect(_corrPortLineEdit, SIGNAL(textChanged(const QString &)), 215 this, SLOT(slotBncTextChanged())); 198 216 199 217 // Feed Engine Options … … 215 233 _outUPortLineEdit = new QLineEdit(settings.value("outUPort").toString()); 216 234 235 connect(_outPortLineEdit, SIGNAL(textChanged(const QString &)), 236 this, SLOT(slotBncTextChanged())); 237 238 connect(_outFileLineEdit, SIGNAL(textChanged(const QString &)), 239 this, SLOT(slotBncTextChanged())); 240 217 241 // Serial Output Options 218 242 // --------------------- … … 258 282 _serialFileNMEALineEdit = new QLineEdit(settings.value("serialFileNMEA").toString()); 259 283 _serialHeightNMEALineEdit = new QLineEdit(settings.value("serialHeightNMEA").toString()); 284 285 connect(_serialMountPointLineEdit, SIGNAL(textChanged(const QString &)), 286 this, SLOT(slotBncTextChanged())); 287 288 connect(_serialAutoNMEAComboBox, SIGNAL(currentIndexChanged(const QString &)), 289 this, SLOT(slotBncTextChanged())); 260 290 261 291 // Outages Options … … 282 312 _adviseScriptLineEdit = new QLineEdit(settings.value("adviseScript").toString()); 283 313 314 connect(_obsRateComboBox, SIGNAL(currentIndexChanged(const QString &)), 315 this, SLOT(slotBncTextChanged())); 316 284 317 // Miscellaneous Options 285 318 // --------------------- … … 295 328 _scanRTCMCheckBox->setCheckState(Qt::CheckState( 296 329 settings.value("scanRTCM").toInt())); 330 331 connect(_miscMountLineEdit, SIGNAL(textChanged(const QString &)), 332 this, SLOT(slotBncTextChanged())); 297 333 298 334 // PPP Options … … 309 345 _pppEstTropoCheckBox->setCheckState(Qt::CheckState( 310 346 settings.value("pppEstTropo").toInt())); 347 348 connect(_pppMountLineEdit, SIGNAL(textChanged(const QString &)), 349 this, SLOT(slotBncTextChanged())); 311 350 312 351 // Streams … … 438 477 pgroup->setLayout(pLayout); 439 478 440 441 connect(_proxyHostLineEdit, SIGNAL(textChanged(const QString &)),442 this, SLOT(bncText(const QString &)));443 if (_proxyHostLineEdit->text().isEmpty()) {444 _proxyPortLineEdit->setStyleSheet("background-color: lightGray");445 _proxyPortLineEdit->setEnabled(false);446 }447 448 479 // General Tab 449 480 // ----------- … … 486 517 ogroup->setLayout(oLayout); 487 518 488 connect(_rnxPathLineEdit, SIGNAL(textChanged(const QString &)),489 this, SLOT(bncText(const QString &)));490 491 519 // RINEX Ephemeris 492 520 // --------------- … … 508 536 egroup->setLayout(eLayout); 509 537 510 connect(_ephPathLineEdit, SIGNAL(textChanged(const QString &)),511 this, SLOT(bncText(const QString &)));512 connect(_outEphPortLineEdit, SIGNAL(textChanged(const QString &)),513 this, SLOT(bncText(const QString &)));514 538 515 539 // Broadcast Corrections … … 533 557 cLayout->addWidget(new QLabel(" "),5,0); 534 558 cgroup->setLayout(cLayout); 535 536 connect(_corrPathLineEdit, SIGNAL(textChanged(const QString &)),537 this, SLOT(bncText(const QString &)));538 connect(_corrPortLineEdit, SIGNAL(textChanged(const QString &)),539 this, SLOT(bncText(const QString &)));540 if (_corrPathLineEdit->text().isEmpty()) {541 _corrIntrComboBox->setStyleSheet("background-color: lightGray");542 _corrIntrComboBox->setEnabled(false);543 }544 559 545 560 // Feed Engine … … 565 580 sLayout->addWidget(new QLabel(" "),5,0); 566 581 sgroup->setLayout(sLayout); 567 568 connect(_outPortLineEdit, SIGNAL(textChanged(const QString &)),569 this, SLOT(bncText(const QString &)));570 connect(_outFileLineEdit, SIGNAL(textChanged(const QString &)),571 this, SLOT(bncText(const QString &)));572 if (_outPortLineEdit->text().isEmpty() && _outFileLineEdit->text().isEmpty()) {573 _waitTimeSpinBox->setStyleSheet("background-color: lightGray");574 _binSamplSpinBox->setStyleSheet("background-color: lightGray");575 _waitTimeSpinBox->setEnabled(false);576 _binSamplSpinBox->setEnabled(false);577 }578 582 579 583 // Serial Output … … 611 615 serLayout->addWidget(new QLabel("Port settings to feed a serial connected receiver."),5,0,1,30); 612 616 613 connect(_serialMountPointLineEdit, SIGNAL(textChanged(const QString &)),614 this, SLOT(bncText(const QString &)));615 connect(_serialAutoNMEAComboBox, SIGNAL(currentIndexChanged(const QString &)),616 this, SLOT(bncText(const QString)));617 if (_serialMountPointLineEdit->text().isEmpty()) {618 _serialPortNameLineEdit->setStyleSheet("background-color: lightGray");619 _serialBaudRateComboBox->setStyleSheet("background-color: lightGray");620 _serialParityComboBox->setStyleSheet("background-color: lightGray");621 _serialDataBitsComboBox->setStyleSheet("background-color: lightGray");622 _serialStopBitsComboBox->setStyleSheet("background-color: lightGray");623 _serialFlowControlComboBox->setStyleSheet("background-color: lightGray");624 _serialAutoNMEAComboBox->setStyleSheet("background-color: lightGray");625 _serialFileNMEALineEdit->setStyleSheet("background-color: lightGray");626 _serialHeightNMEALineEdit->setStyleSheet("background-color: lightGray");627 _serialPortNameLineEdit->setEnabled(false);628 _serialBaudRateComboBox->setEnabled(false);629 _serialParityComboBox->setEnabled(false);630 _serialDataBitsComboBox->setEnabled(false);631 _serialStopBitsComboBox->setEnabled(false);632 _serialFlowControlComboBox->setEnabled(false);633 _serialAutoNMEAComboBox->setEnabled(false);634 _serialFileNMEALineEdit->setEnabled(false);635 _serialHeightNMEALineEdit->setEnabled(false);636 } else {637 if (_serialAutoNMEAComboBox->currentText() == "Auto" ) {638 _serialHeightNMEALineEdit->setStyleSheet("background-color: lightGray");639 _serialHeightNMEALineEdit->setEnabled(false);640 }641 if (_serialAutoNMEAComboBox->currentText() != "Auto" ) {642 _serialFileNMEALineEdit->setStyleSheet("background-color: lightGray");643 _serialFileNMEALineEdit->setEnabled(false);644 }645 }646 647 617 sergroup->setLayout(serLayout); 648 618 … … 666 636 agroup->setLayout(aLayout); 667 637 668 connect(_obsRateComboBox, SIGNAL(currentIndexChanged(const QString &)),669 this, SLOT(bncText(const QString)));670 if (_obsRateComboBox->currentText().isEmpty()) {671 _adviseFailSpinBox->setStyleSheet("background-color: lightGray");672 _adviseRecoSpinBox->setStyleSheet("background-color: lightGray");673 _adviseScriptLineEdit->setStyleSheet("background-color: lightGray");674 _adviseFailSpinBox->setEnabled(false);675 _adviseRecoSpinBox->setEnabled(false);676 _adviseScriptLineEdit->setEnabled(false);677 }678 679 638 // Miscellaneous 680 639 // ------------- … … 693 652 rLayout->addWidget(new QLabel(" "), 5, 0); 694 653 rgroup->setLayout(rLayout); 695 696 connect(_miscMountLineEdit, SIGNAL(textChanged(const QString &)),697 this, SLOT(bncText(const QString &)));698 654 699 655 // PPP Client … … 716 672 pppLayout->addWidget(new QLabel(" "), 5, 0); 717 673 pppgroup->setLayout(pppLayout); 718 719 connect(_pppMountLineEdit, SIGNAL(textChanged(const QString &)),720 this, SLOT(bncText(const QString &)));721 674 722 675 // Main Layout … … 1356 1309 // Bnc Text 1357 1310 //////////////////////////////////////////////////////////////////////////// 1358 void bncWindow::bncText(const QString &text){ 1359 1360 bool isEmpty = text.isEmpty(); 1311 void bncWindow::slotBncTextChanged(){ 1361 1312 1362 1313 QPalette palette_white(QColor(255, 255, 255)); … … 1365 1316 // Proxy 1366 1317 //------ 1367 if ( _aogroup->currentIndex() == 0) {1368 if (! isEmpty) {1318 if (sender() == _proxyHostLineEdit) { 1319 if (!_proxyHostLineEdit->text().isEmpty()) { 1369 1320 _proxyPortLineEdit->setStyleSheet("background-color: white"); 1370 1321 _proxyPortLineEdit->setEnabled(true); 1371 } else { 1322 } 1323 else { 1372 1324 _proxyPortLineEdit->setStyleSheet("background-color: lightGray"); 1373 1325 _proxyPortLineEdit->setEnabled(false); … … 1377 1329 // RINEX Observations 1378 1330 // ------------------ 1379 if ( _aogroup->currentIndex() == 2) {1380 if (! isEmpty) {1331 if (sender() == _rnxPathLineEdit) { 1332 if (!_rnxPathLineEdit->text().isEmpty()) { 1381 1333 _rnxSamplSpinBox->setStyleSheet("background-color: white"); 1382 1334 _rnxSkelLineEdit->setStyleSheet("background-color: white"); … … 1389 1341 _rnxV3CheckBox->setEnabled(true); 1390 1342 _rnxIntrComboBox->setEnabled(true); 1391 } else { 1343 } 1344 else { 1392 1345 _rnxSamplSpinBox->setStyleSheet("background-color: lightGray"); 1393 1346 _rnxSkelLineEdit->setStyleSheet("background-color: lightGray"); … … 1405 1358 // RINEX Ephemeris 1406 1359 // --------------- 1407 if (_aogroup->currentIndex() == 3) { 1408 if (!_ephPathLineEdit->text().isEmpty() && !_outEphPortLineEdit->text().isEmpty()) { 1360 if (sender() == _ephPathLineEdit || sender() == _outEphPortLineEdit) { 1361 if (!_ephPathLineEdit->text().isEmpty() || 1362 !_outEphPortLineEdit->text().isEmpty()) { 1409 1363 _ephIntrComboBox->setStyleSheet("background-color: white"); 1410 1364 _ephV3CheckBox->setPalette(palette_white); … … 1412 1366 _ephV3CheckBox->setEnabled(true); 1413 1367 } 1414 if (_ephPathLineEdit->text().isEmpty() && !_outEphPortLineEdit->text().isEmpty()) { 1415 _ephIntrComboBox->setStyleSheet("background-color: lightGray"); 1416 _ephV3CheckBox->setPalette(palette_gray); 1417 _ephIntrComboBox->setEnabled(false); 1418 _ephV3CheckBox->setEnabled(true); 1419 } 1420 if (!_ephPathLineEdit->text().isEmpty() && _outEphPortLineEdit->text().isEmpty()) { 1421 _ephIntrComboBox->setStyleSheet("background-color: white"); 1422 _ephV3CheckBox->setPalette(palette_white); 1423 _ephIntrComboBox->setEnabled(true); 1424 _ephV3CheckBox->setEnabled(true); 1425 } 1426 if (_ephPathLineEdit->text().isEmpty() && _outEphPortLineEdit->text().isEmpty()) { 1368 else { 1427 1369 _ephIntrComboBox->setStyleSheet("background-color: lightGray"); 1428 1370 _ephV3CheckBox->setPalette(palette_gray); … … 1434 1376 // Broadcast Corrections 1435 1377 // --------------------- 1436 if ( _aogroup->currentIndex() == 4) {1437 if (! isEmpty) {1438 if (!_corrPathLineEdit->text().isEmpty()) {1378 if (sender() == _corrPathLineEdit || sender() == _corrPortLineEdit) { 1379 if (!_corrPathLineEdit->text().isEmpty() || 1380 !_corrPortLineEdit->text().isEmpty()) { 1439 1381 _corrIntrComboBox->setStyleSheet("background-color: white"); 1440 _corrPortLineEdit->setStyleSheet("background-color: white");1441 1382 _corrIntrComboBox->setEnabled(true); 1442 _corrPortLineEdit->setEnabled(true); 1443 } 1444 } else { 1445 if (_corrPathLineEdit->text().isEmpty()) { 1383 } 1384 else { 1446 1385 _corrIntrComboBox->setStyleSheet("background-color: lightGray"); 1447 1386 _corrIntrComboBox->setEnabled(false); 1448 }1449 1387 } 1450 1388 } … … 1452 1390 // Feed Engine 1453 1391 // ----------- 1454 if (_aogroup->currentIndex() == 5) { 1455 if ( !_outPortLineEdit->text().isEmpty() || !_outFileLineEdit->text().isEmpty()) { 1392 if (sender() == _outPortLineEdit || sender() == _outFileLineEdit) { 1393 if ( !_outPortLineEdit->text().isEmpty() || 1394 !_outFileLineEdit->text().isEmpty()) { 1456 1395 _waitTimeSpinBox->setStyleSheet("background-color: white"); 1457 1396 _binSamplSpinBox->setStyleSheet("background-color: white"); 1458 1397 _waitTimeSpinBox->setEnabled(true); 1459 1398 _binSamplSpinBox->setEnabled(true); 1460 } else { 1399 } 1400 else { 1461 1401 _waitTimeSpinBox->setStyleSheet("background-color: lightGray"); 1462 1402 _binSamplSpinBox->setStyleSheet("background-color: lightGray"); … … 1468 1408 // Serial Output 1469 1409 // ------------- 1470 if (_aogroup->currentIndex() == 6) { 1471 if (!isEmpty) { 1410 if (sender() == _serialMountPointLineEdit || 1411 sender() == _serialAutoNMEAComboBox) { 1412 if (!_serialMountPointLineEdit->text().isEmpty()) { 1472 1413 _serialPortNameLineEdit->setStyleSheet("background-color: white"); 1473 1414 _serialBaudRateComboBox->setStyleSheet("background-color: white"); … … 1489 1430 _serialFileNMEALineEdit->setStyleSheet("background-color: lightGray"); 1490 1431 _serialFileNMEALineEdit->setEnabled(false); 1491 } else { 1432 } 1433 else { 1492 1434 _serialHeightNMEALineEdit->setStyleSheet("background-color: lightGray"); 1493 1435 _serialHeightNMEALineEdit->setEnabled(false); … … 1495 1437 _serialFileNMEALineEdit->setEnabled(true); 1496 1438 } 1497 } else { 1439 } 1440 else { 1498 1441 _serialPortNameLineEdit->setStyleSheet("background-color: lightGray"); 1499 1442 _serialBaudRateComboBox->setStyleSheet("background-color: lightGray"); … … 1519 1462 // Outages 1520 1463 // ------- 1521 if ( _aogroup->currentIndex() == 7) {1522 if (! isEmpty) {1464 if (sender() == _obsRateComboBox) { 1465 if (!_obsRateComboBox->currentText().isEmpty()) { 1523 1466 _adviseScriptLineEdit->setStyleSheet("background-color: white"); 1524 1467 _adviseFailSpinBox->setStyleSheet("background-color: white"); … … 1539 1482 // Miscellaneous 1540 1483 // ------------- 1541 if ( _aogroup->currentIndex() == 8) {1542 if (! isEmpty) {1484 if (sender() == _miscMountLineEdit) { 1485 if (!_miscMountLineEdit->text().isEmpty()) { 1543 1486 _perfIntrComboBox->setStyleSheet("background-color: white"); 1544 1487 _scanRTCMCheckBox->setPalette(palette_white); … … 1555 1498 // PPP Client 1556 1499 // ---------- 1557 if ( _aogroup->currentIndex() == 9) {1558 if (! isEmpty) {1500 if (sender() == _pppMountLineEdit) { 1501 if (!_pppMountLineEdit->text().isEmpty()) { 1559 1502 _pppNMEALineEdit->setPalette(palette_white); 1560 1503 _pppStaticCheckBox->setPalette(palette_white); -
trunk/BNC/bncwindow.h
r2126 r2128 61 61 public slots: 62 62 void slotMountPointsRead(QList<bncGetThread*>); 63 void bncText(const QString &text);63 void slotBncTextChanged(); 64 64 65 65 private slots:
Note:
See TracChangeset
for help on using the changeset viewer.