comparison ui/mainwindow.cpp @ 1148:6ec64a30fd5f

(issue115) Use updated icons.
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 18 Sep 2014 11:43:54 +0200
parents 5fdda2ad19fb
children 0495f9187c4b
comparison
equal deleted inserted replaced
1147:0486da3ce13c 1148:6ec64a30fd5f
1227 oldInstallCerts.append(cert); 1227 oldInstallCerts.append(cert);
1228 QToolButton* actionBtn = new QToolButton(); 1228 QToolButton* actionBtn = new QToolButton();
1229 QIcon btnIcon; 1229 QIcon btnIcon;
1230 if (!state) { 1230 if (!state) {
1231 btnIcon.addFile(":/img/write-into-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off); 1231 btnIcon.addFile(":/img/write-into-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off);
1232 btnIcon.addFile(":/img/security-low.png", QSize(48, 48), QIcon::Normal, QIcon::On); 1232 btnIcon.addFile(":/img/cert-not-installed-bad-48.png", QSize(48, 48), QIcon::Normal, QIcon::On);
1233 actionBtn->setProperty("ToolTip_Off", tr("Certificate will be installed.")); 1233 actionBtn->setProperty("ToolTip_Off", tr("Certificate will be installed."));
1234 actionBtn->setProperty("ToolTip_On", tr("Certifcate is not installed.")); 1234 actionBtn->setProperty("ToolTip_On", tr("Certifcate is not installed."));
1235 } else { 1235 } else {
1236 actionBtn->setProperty("ToolTip_Off", tr("Certificate is installed.")); 1236 actionBtn->setProperty("ToolTip_Off", tr("Certificate is installed."));
1237 actionBtn->setProperty("ToolTip_On", tr("Certificate will be removed.")); 1237 actionBtn->setProperty("ToolTip_On", tr("Certificate will be removed."));
1238 btnIcon.addFile(":/img/security-high.png", QSize(48, 48), QIcon::Normal, QIcon::Off); 1238 btnIcon.addFile(":/img/cert-is-installed-good-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off);
1239 btnIcon.addFile(":/img/write-remove-48.png", QSize(48, 48), QIcon::Normal, QIcon::On); 1239 btnIcon.addFile(":/img/write-remove-48.png", QSize(48, 48), QIcon::Normal, QIcon::On);
1240 } 1240 }
1241 actionBtn->setIcon(btnIcon); 1241 actionBtn->setIcon(btnIcon);
1242 mInstallList->addCertificate(cert, state, actionBtn); 1242 mInstallList->addCertificate(cert, state, actionBtn);
1243 } 1243 }
1246 QToolButton* actionBtn = new QToolButton(); 1246 QToolButton* actionBtn = new QToolButton();
1247 QIcon btnIcon; 1247 QIcon btnIcon;
1248 actionBtn->setProperty("ToolTip_Off", tr("Certificate will be removed.")); 1248 actionBtn->setProperty("ToolTip_Off", tr("Certificate will be removed."));
1249 actionBtn->setProperty("ToolTip_On", tr("Certificate has not been removed.")); 1249 actionBtn->setProperty("ToolTip_On", tr("Certificate has not been removed."));
1250 btnIcon.addFile(":/img/write-remove-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off); 1250 btnIcon.addFile(":/img/write-remove-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off);
1251 btnIcon.addFile(":/img/security-medium.png", QSize(48, 48), QIcon::Normal, QIcon::On); 1251 btnIcon.addFile(":/img/cert-is-installed-bad-48.png", QSize(48, 48), QIcon::Normal, QIcon::On);
1252 btnIcon.addFile(":/img/trash-empty.png", QSize(48, 48), QIcon::Disabled, QIcon::Off); 1252 btnIcon.addFile(":/img/cert-not-installed-good-48.png", QSize(48, 48), QIcon::Disabled, QIcon::Off);
1253 actionBtn->setIcon(btnIcon); 1253 actionBtn->setIcon(btnIcon);
1254 if (state) { 1254 if (state) {
1255 actionBtn->setEnabled(false); 1255 actionBtn->setEnabled(false);
1256 actionBtn->setToolTip(tr("Certificate has been removed.")); 1256 actionBtn->setToolTip(tr("Certificate has been removed."));
1257 } 1257 }
1270 oldInstallCerts.append(cert); 1270 oldInstallCerts.append(cert);
1271 QToolButton* actionBtn = new QToolButton(); 1271 QToolButton* actionBtn = new QToolButton();
1272 QIcon btnIcon; 1272 QIcon btnIcon;
1273 actionBtn->setProperty("ToolTip_Off", tr("Certificate is installed.")); 1273 actionBtn->setProperty("ToolTip_Off", tr("Certificate is installed."));
1274 actionBtn->setProperty("ToolTip_On", tr("Certifcate is not installed.")); 1274 actionBtn->setProperty("ToolTip_On", tr("Certifcate is not installed."));
1275 btnIcon.addFile(":/img/security-high.png", QSize(48, 48), QIcon::Normal, QIcon::Off); 1275 btnIcon.addFile(":/img/cert-is-installed-good-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off);
1276 btnIcon.addFile(":/img/security-low.png", QSize(48, 48), QIcon::Normal, QIcon::On); 1276 btnIcon.addFile(":/img/cert-not-installed-bad-48.png", QSize(48, 48), QIcon::Normal, QIcon::On);
1277 actionBtn->setIcon(btnIcon); 1277 actionBtn->setIcon(btnIcon);
1278 mInstallList->addCertificate(cert, state, actionBtn); 1278 mInstallList->addCertificate(cert, state, actionBtn);
1279 } 1279 }
1280 else { 1280 else {
1281 // Is a brand new certificate 1281 // Is a brand new certificate
1283 QToolButton* actionBtn = new QToolButton(); 1283 QToolButton* actionBtn = new QToolButton();
1284 QIcon btnIcon; 1284 QIcon btnIcon;
1285 actionBtn->setProperty("ToolTip_Off", tr("Certificate will be installed.")); 1285 actionBtn->setProperty("ToolTip_Off", tr("Certificate will be installed."));
1286 actionBtn->setProperty("ToolTip_On", tr("Certificate will not be installed.")); 1286 actionBtn->setProperty("ToolTip_On", tr("Certificate will not be installed."));
1287 btnIcon.addFile(":/img/write-into-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off); 1287 btnIcon.addFile(":/img/write-into-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off);
1288 btnIcon.addFile(":/img/security-low.png", QSize(48, 48), QIcon::Normal, QIcon::On); 1288 btnIcon.addFile(":/img/cert-not-installed-bad-48.png", QSize(48, 48), QIcon::Normal, QIcon::On);
1289 actionBtn->setIcon(btnIcon); 1289 actionBtn->setIcon(btnIcon);
1290 mUpdatesNew->addCertificate(cert, state, actionBtn); 1290 mUpdatesNew->addCertificate(cert, state, actionBtn);
1291 } 1291 }
1292 } 1292 }
1293 else { 1293 else {
1299 QToolButton* actionBtn = new QToolButton(); 1299 QToolButton* actionBtn = new QToolButton();
1300 QIcon btnIcon; 1300 QIcon btnIcon;
1301 actionBtn->setProperty("ToolTip_Off", tr("Certificate will be removed.")); 1301 actionBtn->setProperty("ToolTip_Off", tr("Certificate will be removed."));
1302 actionBtn->setProperty("ToolTip_On", tr("Certificate has not been removed.")); 1302 actionBtn->setProperty("ToolTip_On", tr("Certificate has not been removed."));
1303 btnIcon.addFile(":/img/write-remove-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off); 1303 btnIcon.addFile(":/img/write-remove-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off);
1304 btnIcon.addFile(":/img/security-medium.png", QSize(48, 48), QIcon::Normal, QIcon::On); 1304 btnIcon.addFile(":/img/cert-is-installed-bad-48.png", QSize(48, 48), QIcon::Normal, QIcon::On);
1305 btnIcon.addFile(":/img/trash-empty.png", QSize(48, 48), QIcon::Disabled, QIcon::Off); 1305 btnIcon.addFile(":/img/cert-not-installed-good-48.png", QSize(48, 48), QIcon::Disabled, QIcon::Off);
1306 actionBtn->setIcon(btnIcon); 1306 actionBtn->setIcon(btnIcon);
1307 if (state) { 1307 if (state) {
1308 actionBtn->setEnabled(false); 1308 actionBtn->setEnabled(false);
1309 actionBtn->setToolTip(tr("Certificate has been removed.")); 1309 actionBtn->setToolTip(tr("Certificate has been removed."));
1310 } 1310 }
1317 QToolButton* actionBtn = new QToolButton(); 1317 QToolButton* actionBtn = new QToolButton();
1318 QIcon btnIcon; 1318 QIcon btnIcon;
1319 actionBtn->setProperty("ToolTip_Off", tr("Certificate will be removed.")); 1319 actionBtn->setProperty("ToolTip_Off", tr("Certificate will be removed."));
1320 actionBtn->setProperty("ToolTip_On", tr("Certificate will not be removed.")); 1320 actionBtn->setProperty("ToolTip_On", tr("Certificate will not be removed."));
1321 btnIcon.addFile(":/img/write-remove-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off); 1321 btnIcon.addFile(":/img/write-remove-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off);
1322 btnIcon.addFile(":/img/security-medium.png", QSize(48, 48), QIcon::Normal, QIcon::On); 1322 btnIcon.addFile(":/img/cert-is-installed-bad-48.png", QSize(48, 48), QIcon::Normal, QIcon::On);
1323 actionBtn->setIcon(btnIcon); 1323 actionBtn->setIcon(btnIcon);
1324 mUpdatesRemove->addCertificate(cert, state, actionBtn); 1324 mUpdatesRemove->addCertificate(cert, state, actionBtn);
1325 } 1325 }
1326 } 1326 }
1327 } 1327 }

http://wald.intevation.org/projects/trustbridge/