Changeset 2128 in ntrip


Ignore:
Timestamp:
Dec 28, 2009, 11:06:52 AM (14 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncwindow.cpp

    r2127 r2128  
    126126  _proxyPortLineEdit  = new QLineEdit(settings.value("proxyPort").toString());
    127127
     128  connect(_proxyHostLineEdit, SIGNAL(textChanged(const QString &)),
     129          this, SLOT(slotBncTextChanged()));
     130
    128131  // General Options
    129132  // ---------------
     
    165168  _rnxV3CheckBox->setCheckState(Qt::CheckState(settings.value("rnxV3").toInt()));
    166169
     170  connect(_rnxPathLineEdit, SIGNAL(textChanged(const QString &)),
     171          this, SLOT(slotBncTextChanged()));
     172
    167173  // RINEX Ephemeris Options
    168174  // -----------------------
     
    179185  _ephV3CheckBox->setCheckState(Qt::CheckState(settings.value("ephV3").toInt()));
    180186
     187  connect(_outEphPortLineEdit, SIGNAL(textChanged(const QString &)),
     188          this, SLOT(slotBncTextChanged()));
     189
     190  connect(_ephPathLineEdit, SIGNAL(textChanged(const QString &)),
     191          this, SLOT(slotBncTextChanged()));
     192
    181193  // Broadcast Corrections Options
    182194  // -----------------------------
     
    196208  _corrTimeSpinBox->setSuffix(" sec");
    197209  _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()));
    198216
    199217  // Feed Engine Options
     
    215233  _outUPortLineEdit   = new QLineEdit(settings.value("outUPort").toString());
    216234
     235  connect(_outPortLineEdit, SIGNAL(textChanged(const QString &)),
     236          this, SLOT(slotBncTextChanged()));
     237
     238  connect(_outFileLineEdit, SIGNAL(textChanged(const QString &)),
     239          this, SLOT(slotBncTextChanged()));
     240
    217241  // Serial Output Options
    218242  // ---------------------
     
    258282  _serialFileNMEALineEdit    = new QLineEdit(settings.value("serialFileNMEA").toString());
    259283  _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()));
    260290
    261291  // Outages Options
     
    282312  _adviseScriptLineEdit    = new QLineEdit(settings.value("adviseScript").toString());
    283313
     314  connect(_obsRateComboBox, SIGNAL(currentIndexChanged(const QString &)),
     315          this, SLOT(slotBncTextChanged()));
     316
    284317  // Miscellaneous Options
    285318  // ---------------------
     
    295328  _scanRTCMCheckBox->setCheckState(Qt::CheckState(
    296329                                    settings.value("scanRTCM").toInt()));
     330
     331  connect(_miscMountLineEdit, SIGNAL(textChanged(const QString &)),
     332          this, SLOT(slotBncTextChanged()));
    297333
    298334  // PPP Options
     
    309345  _pppEstTropoCheckBox->setCheckState(Qt::CheckState(
    310346                                      settings.value("pppEstTropo").toInt()));
     347
     348  connect(_pppMountLineEdit, SIGNAL(textChanged(const QString &)),
     349          this, SLOT(slotBncTextChanged()));
    311350
    312351  // Streams
     
    438477  pgroup->setLayout(pLayout);
    439478
    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  
    448479  // General Tab
    449480  // -----------
     
    486517  ogroup->setLayout(oLayout);
    487518
    488   connect(_rnxPathLineEdit, SIGNAL(textChanged(const QString &)),
    489           this, SLOT(bncText(const QString &)));
    490 
    491519  // RINEX Ephemeris
    492520  // ---------------
     
    508536  egroup->setLayout(eLayout);
    509537
    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 &)));
    514538
    515539  // Broadcast Corrections
     
    533557  cLayout->addWidget(new QLabel("    "),5,0);
    534558  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   }
    544559
    545560  // Feed Engine
     
    565580  sLayout->addWidget(new QLabel("    "),5,0);
    566581  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   }
    578582
    579583  // Serial Output
     
    611615  serLayout->addWidget(new QLabel("Port settings to feed a serial connected receiver."),5,0,1,30);
    612616
    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 
    647617  sergroup->setLayout(serLayout);
    648618
     
    666636  agroup->setLayout(aLayout);
    667637
    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 
    679638  // Miscellaneous
    680639  // -------------
     
    693652  rLayout->addWidget(new QLabel("    "),                          5, 0);
    694653  rgroup->setLayout(rLayout);
    695 
    696   connect(_miscMountLineEdit, SIGNAL(textChanged(const QString &)),
    697           this, SLOT(bncText(const QString &)));
    698654
    699655  // PPP Client
     
    716672  pppLayout->addWidget(new QLabel("    "),                5, 0);
    717673  pppgroup->setLayout(pppLayout);
    718 
    719   connect(_pppMountLineEdit, SIGNAL(textChanged(const QString &)),
    720           this, SLOT(bncText(const QString &)));
    721674
    722675  // Main Layout
     
    13561309//  Bnc Text
    13571310////////////////////////////////////////////////////////////////////////////
    1358 void bncWindow::bncText(const QString &text){
    1359 
    1360   bool isEmpty = text.isEmpty();
     1311void bncWindow::slotBncTextChanged(){
    13611312
    13621313  QPalette palette_white(QColor(255, 255, 255));
     
    13651316  // Proxy
    13661317  //------
    1367   if (_aogroup->currentIndex() == 0) {
    1368     if (!isEmpty) {
     1318  if (sender() == _proxyHostLineEdit) {
     1319    if (!_proxyHostLineEdit->text().isEmpty()) {
    13691320      _proxyPortLineEdit->setStyleSheet("background-color: white");
    13701321      _proxyPortLineEdit->setEnabled(true);
    1371     } else {
     1322    }
     1323    else {
    13721324      _proxyPortLineEdit->setStyleSheet("background-color: lightGray");
    13731325      _proxyPortLineEdit->setEnabled(false);
     
    13771329  // RINEX Observations
    13781330  // ------------------
    1379   if (_aogroup->currentIndex() == 2) {
    1380     if (!isEmpty) {
     1331  if (sender() == _rnxPathLineEdit) {
     1332    if (!_rnxPathLineEdit->text().isEmpty()) {
    13811333      _rnxSamplSpinBox->setStyleSheet("background-color: white");
    13821334      _rnxSkelLineEdit->setStyleSheet("background-color: white");
     
    13891341      _rnxV3CheckBox->setEnabled(true);
    13901342      _rnxIntrComboBox->setEnabled(true);
    1391     } else {
     1343    }
     1344    else {
    13921345      _rnxSamplSpinBox->setStyleSheet("background-color: lightGray");
    13931346      _rnxSkelLineEdit->setStyleSheet("background-color: lightGray");
     
    14051358  // RINEX Ephemeris
    14061359  // ---------------
    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()) {
    14091363      _ephIntrComboBox->setStyleSheet("background-color: white");
    14101364      _ephV3CheckBox->setPalette(palette_white);
     
    14121366      _ephV3CheckBox->setEnabled(true);
    14131367    }
    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 {
    14271369      _ephIntrComboBox->setStyleSheet("background-color: lightGray");
    14281370      _ephV3CheckBox->setPalette(palette_gray);
     
    14341376  // Broadcast Corrections
    14351377  // ---------------------
    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()) {
    14391381      _corrIntrComboBox->setStyleSheet("background-color: white");
    1440       _corrPortLineEdit->setStyleSheet("background-color: white");
    14411382      _corrIntrComboBox->setEnabled(true);
    1442       _corrPortLineEdit->setEnabled(true);
    1443       }
    1444     } else {
    1445       if (_corrPathLineEdit->text().isEmpty()) {
     1383    }
     1384    else {
    14461385      _corrIntrComboBox->setStyleSheet("background-color: lightGray");
    14471386      _corrIntrComboBox->setEnabled(false);
    1448       }
    14491387    }
    14501388  }
     
    14521390  // Feed Engine
    14531391  // -----------
    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()) {
    14561395      _waitTimeSpinBox->setStyleSheet("background-color: white");
    14571396      _binSamplSpinBox->setStyleSheet("background-color: white");
    14581397      _waitTimeSpinBox->setEnabled(true);
    14591398      _binSamplSpinBox->setEnabled(true);
    1460     } else {
     1399    }
     1400    else {
    14611401      _waitTimeSpinBox->setStyleSheet("background-color: lightGray");
    14621402      _binSamplSpinBox->setStyleSheet("background-color: lightGray");
     
    14681408  // Serial Output
    14691409  // -------------
    1470   if (_aogroup->currentIndex() == 6) {
    1471     if (!isEmpty) {
     1410  if (sender() == _serialMountPointLineEdit ||
     1411      sender() == _serialAutoNMEAComboBox) {
     1412    if (!_serialMountPointLineEdit->text().isEmpty()) {
    14721413      _serialPortNameLineEdit->setStyleSheet("background-color: white");
    14731414      _serialBaudRateComboBox->setStyleSheet("background-color: white");
     
    14891430        _serialFileNMEALineEdit->setStyleSheet("background-color: lightGray");
    14901431        _serialFileNMEALineEdit->setEnabled(false);
    1491       } else {
     1432      }
     1433      else {
    14921434        _serialHeightNMEALineEdit->setStyleSheet("background-color: lightGray");
    14931435        _serialHeightNMEALineEdit->setEnabled(false);
     
    14951437        _serialFileNMEALineEdit->setEnabled(true);
    14961438      }
    1497     } else {
     1439    }
     1440    else {
    14981441      _serialPortNameLineEdit->setStyleSheet("background-color: lightGray");
    14991442      _serialBaudRateComboBox->setStyleSheet("background-color: lightGray");
     
    15191462  // Outages
    15201463  // -------
    1521   if (_aogroup->currentIndex() == 7) {
    1522     if (!isEmpty) {
     1464  if (sender() == _obsRateComboBox) {
     1465    if (!_obsRateComboBox->currentText().isEmpty()) {
    15231466      _adviseScriptLineEdit->setStyleSheet("background-color: white");
    15241467      _adviseFailSpinBox->setStyleSheet("background-color: white");
     
    15391482  // Miscellaneous
    15401483  // -------------
    1541   if (_aogroup->currentIndex() == 8) {
    1542     if (!isEmpty) {
     1484  if (sender() == _miscMountLineEdit) {
     1485    if (!_miscMountLineEdit->text().isEmpty()) {
    15431486      _perfIntrComboBox->setStyleSheet("background-color: white");
    15441487      _scanRTCMCheckBox->setPalette(palette_white);
     
    15551498  // PPP Client
    15561499  // ----------
    1557   if (_aogroup->currentIndex() == 9) {
    1558     if (!isEmpty) {
     1500  if (sender() == _pppMountLineEdit) {
     1501    if (!_pppMountLineEdit->text().isEmpty()) {
    15591502      _pppNMEALineEdit->setPalette(palette_white);
    15601503      _pppStaticCheckBox->setPalette(palette_white);
  • trunk/BNC/bncwindow.h

    r2126 r2128  
    6161  public slots: 
    6262    void slotMountPointsRead(QList<bncGetThread*>);
    63     void bncText(const QString &text);
     63    void slotBncTextChanged();
    6464
    6565  private slots:
Note: See TracChangeset for help on using the changeset viewer.