Mercurial > trustbridge
comparison ui/mainwindow.cpp @ 1209:3815a0d2017b
(issue115) icons, new for cert-to-be* with color.
author | Bernhard Reiter <bernhard@intevation.de> |
---|---|
date | Tue, 23 Sep 2014 20:11:16 +0200 |
parents | 407f2c1286ae |
children | b64f847bde09 |
comparison
equal
deleted
inserted
replaced
1208:0a803c3fb5a6 | 1209:3815a0d2017b |
---|---|
1227 if (cert.isInstallCert()) { | 1227 if (cert.isInstallCert()) { |
1228 oldInstallCerts.append(cert); | 1228 oldInstallCerts.append(cert); |
1229 QToolButton* actionBtn = new QToolButton(); | 1229 QToolButton* actionBtn = new QToolButton(); |
1230 QIcon btnIcon; | 1230 QIcon btnIcon; |
1231 if (!state) { | 1231 if (!state) { |
1232 btnIcon.addFile(":/img/write-into-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off); | 1232 btnIcon.addFile(":/img/cert-to-be-installed-good-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off); |
1233 btnIcon.addFile(":/img/cert-not-installed-bad-48.png", QSize(48, 48), QIcon::Normal, QIcon::On); | 1233 btnIcon.addFile(":/img/cert-not-installed-bad-48.png", QSize(48, 48), QIcon::Normal, QIcon::On); |
1234 actionBtn->setProperty("ToolTip_Off", tr("Certificate will be installed.")); | 1234 actionBtn->setProperty("ToolTip_Off", tr("Certificate will be installed.")); |
1235 actionBtn->setProperty("ToolTip_On", tr("Certifcate is not installed.")); | 1235 actionBtn->setProperty("ToolTip_On", tr("Certifcate is not installed.")); |
1236 } else { | 1236 } else { |
1237 actionBtn->setProperty("ToolTip_Off", tr("Certificate is installed.")); | 1237 actionBtn->setProperty("ToolTip_Off", tr("Certificate is installed.")); |
1238 actionBtn->setProperty("ToolTip_On", tr("Certificate will be removed.")); | 1238 actionBtn->setProperty("ToolTip_On", tr("Certificate will be removed.")); |
1239 btnIcon.addFile(":/img/cert-is-installed-good-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off); | 1239 btnIcon.addFile(":/img/cert-is-installed-good-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off); |
1240 btnIcon.addFile(":/img/write-remove-48.png", QSize(48, 48), QIcon::Normal, QIcon::On); | 1240 btnIcon.addFile(":/img/cert-to-be-removed-bad-48.png", QSize(48, 48), QIcon::Normal, QIcon::On); |
1241 } | 1241 } |
1242 actionBtn->setIcon(btnIcon); | 1242 actionBtn->setIcon(btnIcon); |
1243 mInstallList->addCertificate(cert, state, actionBtn); | 1243 mInstallList->addCertificate(cert, state, actionBtn); |
1244 } | 1244 } |
1245 else { | 1245 else { |
1246 oldRemoveCerts.append(cert); | 1246 oldRemoveCerts.append(cert); |
1247 QToolButton* actionBtn = new QToolButton(); | 1247 QToolButton* actionBtn = new QToolButton(); |
1248 QIcon btnIcon; | 1248 QIcon btnIcon; |
1249 actionBtn->setProperty("ToolTip_Off", tr("Certificate will be removed.")); | 1249 actionBtn->setProperty("ToolTip_Off", tr("Certificate will be removed.")); |
1250 actionBtn->setProperty("ToolTip_On", tr("Certificate has not been removed.")); | 1250 actionBtn->setProperty("ToolTip_On", tr("Certificate has not been removed.")); |
1251 btnIcon.addFile(":/img/write-remove-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off); | 1251 btnIcon.addFile(":/img/cert-to-be-removed-good-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off); |
1252 btnIcon.addFile(":/img/cert-is-installed-bad-48.png", QSize(48, 48), QIcon::Normal, QIcon::On); | 1252 btnIcon.addFile(":/img/cert-is-installed-bad-48.png", QSize(48, 48), QIcon::Normal, QIcon::On); |
1253 btnIcon.addFile(":/img/cert-not-installed-good-48.png", QSize(48, 48), QIcon::Disabled, QIcon::Off); | 1253 btnIcon.addFile(":/img/cert-not-installed-good-48.png", QSize(48, 48), QIcon::Disabled, QIcon::Off); |
1254 actionBtn->setIcon(btnIcon); | 1254 actionBtn->setIcon(btnIcon); |
1255 if (state) { | 1255 if (state) { |
1256 actionBtn->setEnabled(false); | 1256 actionBtn->setEnabled(false); |
1283 newInstallCerts.append(cert); | 1283 newInstallCerts.append(cert); |
1284 QToolButton* actionBtn = new QToolButton(); | 1284 QToolButton* actionBtn = new QToolButton(); |
1285 QIcon btnIcon; | 1285 QIcon btnIcon; |
1286 actionBtn->setProperty("ToolTip_Off", tr("Certificate will be installed.")); | 1286 actionBtn->setProperty("ToolTip_Off", tr("Certificate will be installed.")); |
1287 actionBtn->setProperty("ToolTip_On", tr("Certificate will not be installed.")); | 1287 actionBtn->setProperty("ToolTip_On", tr("Certificate will not be installed.")); |
1288 btnIcon.addFile(":/img/write-into-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off); | 1288 btnIcon.addFile(":/img/cert-to-be-installed-good-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off); |
1289 btnIcon.addFile(":/img/cert-not-installed-bad-48.png", QSize(48, 48), QIcon::Normal, QIcon::On); | 1289 btnIcon.addFile(":/img/cert-not-installed-bad-48.png", QSize(48, 48), QIcon::Normal, QIcon::On); |
1290 actionBtn->setIcon(btnIcon); | 1290 actionBtn->setIcon(btnIcon); |
1291 mUpdatesNew->addCertificate(cert, state, actionBtn); | 1291 mUpdatesNew->addCertificate(cert, state, actionBtn); |
1292 } | 1292 } |
1293 } | 1293 } |
1299 // Is removed, so set editable to false. | 1299 // Is removed, so set editable to false. |
1300 QToolButton* actionBtn = new QToolButton(); | 1300 QToolButton* actionBtn = new QToolButton(); |
1301 QIcon btnIcon; | 1301 QIcon btnIcon; |
1302 actionBtn->setProperty("ToolTip_Off", tr("Certificate will be removed.")); | 1302 actionBtn->setProperty("ToolTip_Off", tr("Certificate will be removed.")); |
1303 actionBtn->setProperty("ToolTip_On", tr("Certificate has not been removed.")); | 1303 actionBtn->setProperty("ToolTip_On", tr("Certificate has not been removed.")); |
1304 btnIcon.addFile(":/img/write-remove-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off); | 1304 btnIcon.addFile(":/img/cert-to-be-removed-good-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off); |
1305 btnIcon.addFile(":/img/cert-is-installed-bad-48.png", QSize(48, 48), QIcon::Normal, QIcon::On); | 1305 btnIcon.addFile(":/img/cert-is-installed-bad-48.png", QSize(48, 48), QIcon::Normal, QIcon::On); |
1306 btnIcon.addFile(":/img/cert-not-installed-good-48.png", QSize(48, 48), QIcon::Disabled, QIcon::Off); | 1306 btnIcon.addFile(":/img/cert-not-installed-good-48.png", QSize(48, 48), QIcon::Disabled, QIcon::Off); |
1307 actionBtn->setIcon(btnIcon); | 1307 actionBtn->setIcon(btnIcon); |
1308 if (state) { | 1308 if (state) { |
1309 actionBtn->setEnabled(false); | 1309 actionBtn->setEnabled(false); |
1317 newRemoveCerts.append(cert); | 1317 newRemoveCerts.append(cert); |
1318 QToolButton* actionBtn = new QToolButton(); | 1318 QToolButton* actionBtn = new QToolButton(); |
1319 QIcon btnIcon; | 1319 QIcon btnIcon; |
1320 actionBtn->setProperty("ToolTip_Off", tr("Certificate will be removed.")); | 1320 actionBtn->setProperty("ToolTip_Off", tr("Certificate will be removed.")); |
1321 actionBtn->setProperty("ToolTip_On", tr("Certificate will not be removed.")); | 1321 actionBtn->setProperty("ToolTip_On", tr("Certificate will not be removed.")); |
1322 btnIcon.addFile(":/img/write-remove-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off); | 1322 btnIcon.addFile(":/img/cert-to-be-removed-good-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off); |
1323 btnIcon.addFile(":/img/cert-is-installed-bad-48.png", QSize(48, 48), QIcon::Normal, QIcon::On); | 1323 btnIcon.addFile(":/img/cert-is-installed-bad-48.png", QSize(48, 48), QIcon::Normal, QIcon::On); |
1324 actionBtn->setIcon(btnIcon); | 1324 actionBtn->setIcon(btnIcon); |
1325 mUpdatesRemove->addCertificate(cert, state, actionBtn); | 1325 mUpdatesRemove->addCertificate(cert, state, actionBtn); |
1326 } | 1326 } |
1327 } | 1327 } |
1492 { | 1492 { |
1493 if (!mUpdatesManual->contains(cert)) { | 1493 if (!mUpdatesManual->contains(cert)) { |
1494 QToolButton* actionBtn = new QToolButton(); | 1494 QToolButton* actionBtn = new QToolButton(); |
1495 QIcon btnIcon; | 1495 QIcon btnIcon; |
1496 if (mRemoveList->contains(cert)) { | 1496 if (mRemoveList->contains(cert)) { |
1497 btnIcon.addFile(":/img/write-remove-48.png", QSize(48, 48), QIcon::Normal, QIcon::On); | 1497 btnIcon.addFile(":/img/cert-to-be-removed-good-48.png", QSize(48, 48), QIcon::Normal, QIcon::On); |
1498 btnIcon.addFile(":/img/cert-is-installed-bad-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off); | 1498 btnIcon.addFile(":/img/cert-is-installed-bad-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off); |
1499 actionBtn->setProperty("ToolTip_On", tr("Certificate will be removed.")); | 1499 actionBtn->setProperty("ToolTip_On", tr("Certificate will be removed.")); |
1500 /* Off should never be possible here | 1500 /* Off should never be possible here |
1501 * As the manual change of removed certificates is disabled */ | 1501 * As the manual change of removed certificates is disabled */ |
1502 actionBtn->setProperty("ToolTip_Off", tr("Certificate will not be removed.")); | 1502 actionBtn->setProperty("ToolTip_Off", tr("Certificate will not be removed.")); |
1503 } else { | 1503 } else { |
1504 btnIcon.addFile(":/img/write-into-48.png", QSize(48, 48), QIcon::Normal, QIcon::On); | 1504 btnIcon.addFile(":/img/cert-to-be-installed-good-48.png", QSize(48, 48), QIcon::Normal, QIcon::On); |
1505 btnIcon.addFile(":/img/write-remove-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off); | 1505 btnIcon.addFile(":/img/cert-to-be-removed-bad-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off); |
1506 actionBtn->setProperty("ToolTip_On", tr("Certificate will be installed.")); | 1506 actionBtn->setProperty("ToolTip_On", tr("Certificate will be installed.")); |
1507 actionBtn->setProperty("ToolTip_Off", tr("Certificate will be removed.")); | 1507 actionBtn->setProperty("ToolTip_Off", tr("Certificate will be removed.")); |
1508 } | 1508 } |
1509 actionBtn->setIcon(btnIcon); | 1509 actionBtn->setIcon(btnIcon); |
1510 mUpdatesManual->addCertificate(cert, state, actionBtn); | 1510 mUpdatesManual->addCertificate(cert, state, actionBtn); |