- Timestamp:
- Jan 5, 2009, 2:22:37 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncwindow.cpp
r1443 r1444 435 435 connect(_outPortLineEdit, SIGNAL(textChanged(const QString &)), 436 436 this, SLOT(bncText(const QString &))); 437 if (_outPortLineEdit->text().isEmpty()) { 437 connect(_outFileLineEdit, SIGNAL(textChanged(const QString &)), 438 this, SLOT(bncText(const QString &))); 439 if (_outPortLineEdit->text().isEmpty() && _outFileLineEdit->text().isEmpty()) { 438 440 palette.setColor(_waitTimeSpinBox->backgroundRole(), lightGray); 439 441 _waitTimeSpinBox->setPalette(palette); 440 palette.setColor(_outFileLineEdit->backgroundRole(), lightGray);441 _outFileLineEdit->setPalette(palette);442 442 palette.setColor(_binSamplSpinBox->backgroundRole(), lightGray); 443 443 _binSamplSpinBox->setPalette(palette); 444 444 _waitTimeSpinBox->setEnabled(false); 445 _outFileLineEdit->setEnabled(false);446 445 _binSamplSpinBox->setEnabled(false); 447 446 } … … 1303 1302 // ----------- 1304 1303 if (aogroup->currentIndex() == 5) { 1305 if (!isEmpty) { 1306 palette.setColor(_outFileLineEdit->backgroundRole(), Qt::white); 1307 _outFileLineEdit->setPalette(palette); 1304 if ( !_outPortLineEdit->text().isEmpty() || !_outFileLineEdit->text().isEmpty()) { 1305 _waitTimeSpinBox->setEnabled(true); 1306 _binSamplSpinBox->setEnabled(true); 1307 palette.setColor(_binSamplSpinBox->backgroundRole(), Qt::white); 1308 _binSamplSpinBox->setPalette(palette); 1308 1309 palette.setColor(_waitTimeSpinBox->backgroundRole(), Qt::white); 1309 1310 _waitTimeSpinBox->setPalette(palette); 1310 palette.setColor(_binSamplSpinBox->backgroundRole(), Qt::white); 1311 } else { 1312 _waitTimeSpinBox->setEnabled(false); 1313 _binSamplSpinBox->setEnabled(false); 1314 palette.setColor(_binSamplSpinBox->backgroundRole(), lightGray); 1311 1315 _binSamplSpinBox->setPalette(palette); 1312 _waitTimeSpinBox->setEnabled(true);1313 _outFileLineEdit->setEnabled(true);1314 _binSamplSpinBox->setEnabled(true);1315 } else {1316 palette.setColor(_outFileLineEdit->backgroundRole(), lightGray);1317 _outFileLineEdit->setPalette(palette);1318 1316 palette.setColor(_waitTimeSpinBox->backgroundRole(), lightGray); 1319 1317 _waitTimeSpinBox->setPalette(palette); 1320 palette.setColor(_binSamplSpinBox->backgroundRole(), lightGray);1321 _binSamplSpinBox->setPalette(palette);1322 _waitTimeSpinBox->setEnabled(false);1323 _outFileLineEdit->setEnabled(false);1324 _binSamplSpinBox->setEnabled(false);1325 1318 } 1326 1319 }
Note:
See TracChangeset
for help on using the changeset viewer.