Changeset 1446 in ntrip
- Timestamp:
- Jan 5, 2009, 5:54:14 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncwindow.cpp
r1444 r1446 394 394 this, SLOT(bncText(const QString &))); 395 395 if (_proxyHostLineEdit->text().isEmpty()) { 396 palette.setColor(_proxyPortLineEdit->backgroundRole(), lightGray); 397 _proxyPortLineEdit->setPalette(palette); 396 _proxyPortLineEdit->setStyleSheet("background-color: lightGray"); 398 397 _proxyPortLineEdit->setEnabled(false); 399 398 } … … 438 437 this, SLOT(bncText(const QString &))); 439 438 if (_outPortLineEdit->text().isEmpty() && _outFileLineEdit->text().isEmpty()) { 440 palette.setColor(_waitTimeSpinBox->backgroundRole(), lightGray); 441 _waitTimeSpinBox->setPalette(palette); 442 palette.setColor(_binSamplSpinBox->backgroundRole(), lightGray); 443 _binSamplSpinBox->setPalette(palette); 439 _waitTimeSpinBox->setStyleSheet("background-color: lightGray"); 440 _binSamplSpinBox->setStyleSheet("background-color: lightGray"); 444 441 _waitTimeSpinBox->setEnabled(false); 445 442 _binSamplSpinBox->setEnabled(false); … … 465 462 this, SLOT(bncText(const QString &))); 466 463 if (_ephPathLineEdit->text().isEmpty()) { 467 palette.setColor(_ephIntrComboBox->backgroundRole(), lightGray); 468 _ephIntrComboBox->setPalette(palette); 469 palette.setColor(_outEphPortLineEdit->backgroundRole(), lightGray); 470 _outEphPortLineEdit->setPalette(palette); 464 _ephIntrComboBox->setStyleSheet("background-color: lightGray"); 465 _outEphPortLineEdit->setStyleSheet("background-color: lightGray"); 471 466 palette.setColor(_ephV3CheckBox->backgroundRole(), lightGray); 472 467 _ephV3CheckBox->setPalette(palette); … … 496 491 this, SLOT(bncText(const QString))); 497 492 if (_obsRateComboBox->currentText().isEmpty()) { 498 palette.setColor(_adviseFailSpinBox->backgroundRole(), lightGray); 499 _adviseFailSpinBox->setPalette(palette); 500 palette.setColor(_adviseRecoSpinBox->backgroundRole(), lightGray); 501 _adviseRecoSpinBox->setPalette(palette); 493 _adviseFailSpinBox->setStyleSheet("background-color: lightGray"); 494 _adviseRecoSpinBox->setStyleSheet("background-color: lightGray"); 502 495 palette.setColor(_makePauseCheckBox->backgroundRole(), lightGray); 503 496 _makePauseCheckBox->setPalette(palette); 504 palette.setColor(_adviseScriptLineEdit->backgroundRole(), lightGray); 505 _adviseScriptLineEdit->setPalette(palette); 497 _adviseScriptLineEdit->setStyleSheet("background-color: lightGray"); 506 498 _adviseFailSpinBox->setEnabled(false); 507 499 _adviseRecoSpinBox->setEnabled(false); … … 528 520 this, SLOT(bncText(const QString &))); 529 521 if (_miscMountLineEdit->text().isEmpty()) { 530 palette.setColor(_perfIntrComboBox->backgroundRole(), lightGray); 531 _perfIntrComboBox->setPalette(palette); 522 _perfIntrComboBox->setStyleSheet("background-color: lightGray"); 532 523 palette.setColor(_scanRTCMCheckBox->backgroundRole(), lightGray); 533 524 _scanRTCMCheckBox->setPalette(palette); … … 558 549 this, SLOT(bncText(const QString &))); 559 550 if (_rnxPathLineEdit->text().isEmpty()) { 560 palette.setColor(_rnxIntrComboBox->backgroundRole(), lightGray); 561 _rnxIntrComboBox->setPalette(palette); 562 palette.setColor(_rnxSamplSpinBox->backgroundRole(), lightGray); 563 _rnxSamplSpinBox->setPalette(palette); 564 palette.setColor(_rnxSkelLineEdit->backgroundRole(), lightGray); 565 _rnxSkelLineEdit->setPalette(palette); 566 palette.setColor(_rnxScrpLineEdit->backgroundRole(), lightGray); 567 _rnxScrpLineEdit->setPalette(palette); 551 _rnxIntrComboBox->setStyleSheet("background-color: lightGray"); 552 _rnxSamplSpinBox->setStyleSheet("background-color: lightGray"); 553 _rnxSkelLineEdit->setStyleSheet("background-color: lightGray"); 554 _rnxScrpLineEdit->setStyleSheet("background-color: lightGray"); 568 555 palette.setColor(_rnxV3CheckBox->backgroundRole(), lightGray); 569 556 _rnxV3CheckBox->setPalette(palette); … … 595 582 this, SLOT(bncText(const QString &))); 596 583 if (_corrPathLineEdit->text().isEmpty()) { 597 palette.setColor(_corrIntrComboBox->backgroundRole(), lightGray); 598 _corrIntrComboBox->setPalette(palette); 599 palette.setColor(_corrPortLineEdit->backgroundRole(), lightGray); 600 _corrPortLineEdit->setPalette(palette); 601 palette.setColor(_corrTimeSpinBox->backgroundRole(), lightGray); 602 _corrTimeSpinBox->setPalette(palette); 584 _corrIntrComboBox->setStyleSheet("background-color: lightGray"); 585 _corrPortLineEdit->setStyleSheet("background-color: lightGray"); 586 _corrTimeSpinBox->setStyleSheet("background-color: lightGray"); 603 587 _corrIntrComboBox->setEnabled(false); 604 588 _corrPortLineEdit->setEnabled(false); … … 629 613 this, SLOT(bncText(const QString &))); 630 614 if (_serialMountPointLineEdit->text().isEmpty()) { 631 palette.setColor(_serialPortNameLineEdit->backgroundRole(), lightGray); 632 _serialPortNameLineEdit->setPalette(palette); 633 palette.setColor(_serialBaudRateComboBox->backgroundRole(), lightGray); 634 _serialBaudRateComboBox->setPalette(palette); 635 palette.setColor(_serialParityComboBox->backgroundRole(), lightGray); 636 _serialParityComboBox->setPalette(palette); 637 palette.setColor(_serialDataBitsComboBox->backgroundRole(), lightGray); 638 _serialDataBitsComboBox->setPalette(palette); 639 palette.setColor(_serialStopBitsComboBox->backgroundRole(), lightGray); 640 _serialStopBitsComboBox->setPalette(palette); 615 _serialPortNameLineEdit->setStyleSheet("background-color: lightGray"); 616 _serialBaudRateComboBox->setStyleSheet("background-color: lightGray"); 617 _serialParityComboBox->setStyleSheet("background-color: lightGray"); 618 _serialDataBitsComboBox->setStyleSheet("background-color: lightGray"); 619 _serialStopBitsComboBox->setStyleSheet("background-color: lightGray"); 641 620 palette.setColor(_serialAutoNMEACheckBox->backgroundRole(), lightGray); 642 621 _serialAutoNMEACheckBox->setPalette(palette); … … 1194 1173 QPalette palette; 1195 1174 QColor lightGray(230, 230, 230); 1175 QColor white(255, 255, 255); 1196 1176 1197 1177 // Proxy … … 1199 1179 if (aogroup->currentIndex() == 0) { 1200 1180 if (!isEmpty) { 1201 palette.setColor(_proxyPortLineEdit->backgroundRole(), Qt::white); 1202 _proxyPortLineEdit->setPalette(palette); 1181 _proxyPortLineEdit->setStyleSheet("background-color: white"); 1203 1182 _proxyPortLineEdit->setEnabled(true); 1204 1183 } else { 1205 palette.setColor(_proxyPortLineEdit->backgroundRole(), lightGray); 1206 _proxyPortLineEdit->setPalette(palette); 1184 _proxyPortLineEdit->setStyleSheet("background-color: lightGray"); 1207 1185 _proxyPortLineEdit->setEnabled(false); 1208 1186 } … … 1213 1191 if (aogroup->currentIndex() == 2) { 1214 1192 if (!isEmpty) { 1215 palette.setColor(_rnxSamplSpinBox->backgroundRole(), Qt::white); 1216 _rnxSamplSpinBox->setPalette(palette); 1217 palette.setColor(_rnxSkelLineEdit->backgroundRole(), Qt::white); 1218 _rnxSkelLineEdit->setPalette(palette); 1219 palette.setColor(_rnxScrpLineEdit->backgroundRole(), Qt::white); 1220 _rnxScrpLineEdit->setPalette(palette); 1221 palette.setColor(_rnxV3CheckBox->backgroundRole(), Qt::white); 1193 _rnxSamplSpinBox->setStyleSheet("background-color: white"); 1194 _rnxSkelLineEdit->setStyleSheet("background-color: white"); 1195 _rnxScrpLineEdit->setStyleSheet("background-color: white"); 1196 palette.setColor(_rnxV3CheckBox->backgroundRole(), white); 1222 1197 _rnxV3CheckBox->setPalette(palette); 1223 palette.setColor(_rnxIntrComboBox->backgroundRole(), Qt::white); 1224 _rnxIntrComboBox->setPalette(palette); 1198 _rnxIntrComboBox->setStyleSheet("background-color: white"); 1225 1199 _rnxSamplSpinBox->setEnabled(true); 1226 1200 _rnxSkelLineEdit->setEnabled(true); … … 1229 1203 _rnxIntrComboBox->setEnabled(true); 1230 1204 } else { 1231 palette.setColor(_rnxSkelLineEdit->backgroundRole(), lightGray); 1232 _rnxSkelLineEdit->setPalette(palette); 1233 palette.setColor(_rnxScrpLineEdit->backgroundRole(), lightGray); 1234 _rnxScrpLineEdit->setPalette(palette); 1205 _rnxSamplSpinBox->setStyleSheet("background-color: lightGray"); 1206 _rnxSkelLineEdit->setStyleSheet("background-color: lightGray"); 1207 _rnxScrpLineEdit->setStyleSheet("background-color: lightGray"); 1235 1208 palette.setColor(_rnxV3CheckBox->backgroundRole(), lightGray); 1236 1209 _rnxV3CheckBox->setPalette(palette); 1237 palette.setColor(_rnxSamplSpinBox->backgroundRole(), lightGray); 1238 _rnxSamplSpinBox->setPalette(palette); 1239 palette.setColor(_rnxIntrComboBox->backgroundRole(), lightGray); 1240 _rnxIntrComboBox->setPalette(palette); 1210 _rnxIntrComboBox->setStyleSheet("background-color: lightGray"); 1241 1211 _rnxSamplSpinBox->setEnabled(false); 1242 1212 _rnxSkelLineEdit->setEnabled(false); … … 1251 1221 if (aogroup->currentIndex() == 3) { 1252 1222 if (!isEmpty) { 1253 palette.setColor(_outEphPortLineEdit->backgroundRole(), Qt::white); 1254 _outEphPortLineEdit->setPalette(palette); 1255 palette.setColor(_ephV3CheckBox->backgroundRole(), Qt::white); 1223 _outEphPortLineEdit->setStyleSheet("background-color: white"); 1224 palette.setColor(_ephV3CheckBox->backgroundRole(), white); 1256 1225 _ephV3CheckBox->setPalette(palette); 1257 palette.setColor(_ephIntrComboBox->backgroundRole(), Qt::white); 1258 _ephIntrComboBox->setPalette(palette); 1226 _ephIntrComboBox->setStyleSheet("background-color: white"); 1259 1227 _outEphPortLineEdit->setEnabled(true); 1260 1228 _ephV3CheckBox->setEnabled(true); 1261 1229 _ephIntrComboBox->setEnabled(true); 1262 1230 } else { 1263 palette.setColor(_outEphPortLineEdit->backgroundRole(), lightGray); 1264 _outEphPortLineEdit->setPalette(palette); 1231 _outEphPortLineEdit->setStyleSheet("background-color: lightGray"); 1265 1232 palette.setColor(_ephV3CheckBox->backgroundRole(), lightGray); 1266 1233 _ephV3CheckBox->setPalette(palette); 1267 palette.setColor(_ephIntrComboBox->backgroundRole(), lightGray); 1268 _ephIntrComboBox->setPalette(palette); 1234 _ephIntrComboBox->setStyleSheet("background-color: lightGray"); 1269 1235 _outEphPortLineEdit->setEnabled(false); 1270 1236 _ephV3CheckBox->setEnabled(false); … … 1277 1243 if (aogroup->currentIndex() == 4) { 1278 1244 if (!isEmpty) { 1279 palette.setColor(_corrPortLineEdit->backgroundRole(), Qt::white); 1280 _corrPortLineEdit->setPalette(palette); 1281 palette.setColor(_corrTimeSpinBox->backgroundRole(), Qt::white); 1282 _corrTimeSpinBox->setPalette(palette); 1283 palette.setColor(_corrIntrComboBox->backgroundRole(), Qt::white); 1284 _corrIntrComboBox->setPalette(palette); 1245 _corrPortLineEdit->setStyleSheet("background-color: white"); 1246 _corrTimeSpinBox->setStyleSheet("background-color: white"); 1247 _corrIntrComboBox->setStyleSheet("background-color: white"); 1285 1248 _corrPortLineEdit->setEnabled(true); 1286 1249 _corrTimeSpinBox->setEnabled(true); 1287 1250 _corrIntrComboBox->setEnabled(true); 1288 1251 } else { 1289 palette.setColor(_corrPortLineEdit->backgroundRole(), lightGray); 1290 _corrPortLineEdit->setPalette(palette); 1291 palette.setColor(_corrTimeSpinBox->backgroundRole(), lightGray); 1292 _corrTimeSpinBox->setPalette(palette); 1293 palette.setColor(_corrIntrComboBox->backgroundRole(), lightGray); 1294 _corrIntrComboBox->setPalette(palette); 1252 _corrPortLineEdit->setStyleSheet("background-color: lightGray"); 1253 _corrTimeSpinBox->setStyleSheet("background-color: lightGray"); 1254 _corrIntrComboBox->setStyleSheet("background-color: lightGray"); 1295 1255 _corrPortLineEdit->setEnabled(false); 1296 1256 _corrTimeSpinBox->setEnabled(false); … … 1303 1263 if (aogroup->currentIndex() == 5) { 1304 1264 if ( !_outPortLineEdit->text().isEmpty() || !_outFileLineEdit->text().isEmpty()) { 1265 _waitTimeSpinBox->setStyleSheet("background-color: white"); 1266 _binSamplSpinBox->setStyleSheet("background-color: white"); 1305 1267 _waitTimeSpinBox->setEnabled(true); 1306 1268 _binSamplSpinBox->setEnabled(true); 1307 palette.setColor(_binSamplSpinBox->backgroundRole(), Qt::white);1308 _binSamplSpinBox->setPalette(palette);1309 palette.setColor(_waitTimeSpinBox->backgroundRole(), Qt::white);1310 _waitTimeSpinBox->setPalette(palette);1311 1269 } else { 1270 _waitTimeSpinBox->setStyleSheet("background-color: lightGray"); 1271 _binSamplSpinBox->setStyleSheet("background-color: lightGray"); 1312 1272 _waitTimeSpinBox->setEnabled(false); 1313 _binSamplSpinBox->setEnabled(false); 1314 palette.setColor(_binSamplSpinBox->backgroundRole(), lightGray); 1315 _binSamplSpinBox->setPalette(palette); 1316 palette.setColor(_waitTimeSpinBox->backgroundRole(), lightGray); 1317 _waitTimeSpinBox->setPalette(palette); 1273 _binSamplSpinBox->setEnabled(false); 1318 1274 } 1319 1275 } … … 1323 1279 if (aogroup->currentIndex() == 6) { 1324 1280 if (!isEmpty) { 1325 palette.setColor(_serialPortNameLineEdit->backgroundRole(), Qt::white); 1326 _serialPortNameLineEdit->setPalette(palette); 1327 palette.setColor(_serialBaudRateComboBox->backgroundRole(), Qt::white); 1328 _serialBaudRateComboBox->setPalette(palette); 1329 palette.setColor(_serialParityComboBox->backgroundRole(), Qt::white); 1330 _serialParityComboBox->setPalette(palette); 1331 palette.setColor(_serialDataBitsComboBox->backgroundRole(), Qt::white); 1332 _serialDataBitsComboBox->setPalette(palette); 1333 palette.setColor(_serialStopBitsComboBox->backgroundRole(), Qt::white); 1334 _serialStopBitsComboBox->setPalette(palette); 1335 palette.setColor(_serialAutoNMEACheckBox->backgroundRole(), Qt::white); 1281 _serialPortNameLineEdit->setStyleSheet("background-color: white"); 1282 _serialBaudRateComboBox->setStyleSheet("background-color: white"); 1283 _serialParityComboBox->setStyleSheet("background-color: white"); 1284 _serialDataBitsComboBox->setStyleSheet("background-color: white"); 1285 _serialStopBitsComboBox->setStyleSheet("background-color: white"); 1286 palette.setColor(_serialAutoNMEACheckBox->backgroundRole(), white); 1336 1287 _serialAutoNMEACheckBox->setPalette(palette); 1337 1288 _serialPortNameLineEdit->setEnabled(true); … … 1342 1293 _serialAutoNMEACheckBox->setEnabled(true); 1343 1294 } else { 1344 palette.setColor(_serialPortNameLineEdit->backgroundRole(), lightGray); 1345 _serialPortNameLineEdit->setPalette(palette); 1346 palette.setColor(_serialBaudRateComboBox->backgroundRole(), lightGray); 1347 _serialBaudRateComboBox->setPalette(palette); 1348 palette.setColor(_serialParityComboBox->backgroundRole(), lightGray); 1349 _serialParityComboBox->setPalette(palette); 1350 palette.setColor(_serialDataBitsComboBox->backgroundRole(), lightGray); 1351 _serialDataBitsComboBox->setPalette(palette); 1352 palette.setColor(_serialStopBitsComboBox->backgroundRole(), lightGray); 1353 _serialStopBitsComboBox->setPalette(palette); 1295 _serialPortNameLineEdit->setStyleSheet("background-color: lightGray"); 1296 _serialBaudRateComboBox->setStyleSheet("background-color: lightGray"); 1297 _serialParityComboBox->setStyleSheet("background-color: lightGray"); 1298 _serialDataBitsComboBox->setStyleSheet("background-color: lightGray"); 1299 _serialStopBitsComboBox->setStyleSheet("background-color: lightGray"); 1354 1300 palette.setColor(_serialAutoNMEACheckBox->backgroundRole(), lightGray); 1355 1301 _serialAutoNMEACheckBox->setPalette(palette); … … 1367 1313 if (aogroup->currentIndex() == 7) { 1368 1314 if (!isEmpty) { 1369 palette.setColor(_adviseScriptLineEdit->backgroundRole(), Qt::white); 1370 _adviseScriptLineEdit->setPalette(palette); 1371 palette.setColor(_adviseFailSpinBox->backgroundRole(), Qt::white); 1372 _adviseFailSpinBox->setPalette(palette); 1373 palette.setColor(_adviseRecoSpinBox->backgroundRole(), Qt::white); 1374 _adviseRecoSpinBox->setPalette(palette); 1375 palette.setColor(_makePauseCheckBox->backgroundRole(), Qt::white); 1315 _adviseScriptLineEdit->setStyleSheet("background-color: white"); 1316 _adviseFailSpinBox->setStyleSheet("background-color: white"); 1317 _adviseRecoSpinBox->setStyleSheet("background-color: white"); 1318 palette.setColor(_makePauseCheckBox->backgroundRole(), white); 1376 1319 _makePauseCheckBox->setPalette(palette); 1377 1320 _adviseFailSpinBox->setEnabled(true); … … 1380 1323 _adviseScriptLineEdit->setEnabled(true); 1381 1324 } else { 1382 palette.setColor(_adviseScriptLineEdit->backgroundRole(), lightGray); 1383 _adviseScriptLineEdit->setPalette(palette); 1384 palette.setColor(_adviseFailSpinBox->backgroundRole(), lightGray); 1385 _adviseFailSpinBox->setPalette(palette); 1386 palette.setColor(_adviseRecoSpinBox->backgroundRole(), lightGray); 1387 _adviseRecoSpinBox->setPalette(palette); 1325 _adviseScriptLineEdit->setStyleSheet("background-color: lightGray"); 1326 _adviseFailSpinBox->setStyleSheet("background-color: lightGray"); 1327 _adviseRecoSpinBox->setStyleSheet("background-color: lightGray"); 1388 1328 palette.setColor(_makePauseCheckBox->backgroundRole(), lightGray); 1389 1329 _makePauseCheckBox->setPalette(palette); … … 1399 1339 if (aogroup->currentIndex() == 8) { 1400 1340 if (!isEmpty) { 1401 palette.setColor(_perfIntrComboBox->backgroundRole(), Qt::white); 1402 _perfIntrComboBox->setPalette(palette); 1341 _perfIntrComboBox->setStyleSheet("background-color: white"); 1342 palette.setColor(_scanRTCMCheckBox->backgroundRole(), white); 1343 _scanRTCMCheckBox->setPalette(palette); 1403 1344 _perfIntrComboBox->setEnabled(true); 1404 palette.setColor(_scanRTCMCheckBox->backgroundRole(), Qt::white);1405 _scanRTCMCheckBox->setPalette(palette);1406 1345 _scanRTCMCheckBox->setEnabled(true); 1407 1346 } else { 1347 _perfIntrComboBox->setStyleSheet("background-color: lightGray"); 1408 1348 palette.setColor(_scanRTCMCheckBox->backgroundRole(), lightGray); 1409 1349 _scanRTCMCheckBox->setPalette(palette); 1350 _perfIntrComboBox->setEnabled(false); 1410 1351 _scanRTCMCheckBox->setEnabled(false); 1411 palette.setColor(_perfIntrComboBox->backgroundRole(), lightGray); 1412 _perfIntrComboBox->setPalette(palette); 1413 _perfIntrComboBox->setEnabled(false); 1414 } 1415 } 1416 } 1417 1352 } 1353 } 1354 }
Note:
See TracChangeset
for help on using the changeset viewer.