Mercurial > trustbridge
comparison ui/mainwindow.cpp @ 1204:939f26d3db59
Merged.
author | Emanuel Schuetze <emanuel@intevation.de> |
---|---|
date | Tue, 23 Sep 2014 14:52:10 +0200 |
parents | 407f2c1286ae |
children | 3815a0d2017b |
comparison
equal
deleted
inserted
replaced
1203:b4185dd3810f | 1204:939f26d3db59 |
---|---|
999 mButtonGroup = new QButtonGroup; | 999 mButtonGroup = new QButtonGroup; |
1000 | 1000 |
1001 TextOverlayButton *updatesButton = new TextOverlayButton; | 1001 TextOverlayButton *updatesButton = new TextOverlayButton; |
1002 updatesButton->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); | 1002 updatesButton->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); |
1003 updatesButton->setBackgroundIcon(":/img/red-circle.png"); | 1003 updatesButton->setBackgroundIcon(":/img/red-circle.png"); |
1004 updatesButton->setIcon(QIcon(":/img/view-refresh.png")); | 1004 updatesButton->setIcon(QIcon(":/img/pending-changes-overview-48.png")); |
1005 updatesButton->setIconSize(QSize(48, 48)); | 1005 updatesButton->setIconSize(QSize(48, 48)); |
1006 updatesButton->setText(tr("Pending\nchanges")); | 1006 updatesButton->setText(tr("Pending\nchanges")); |
1007 updatesButton->setFixedWidth(120); | 1007 updatesButton->setFixedWidth(120); |
1008 updatesButton->setFixedHeight(90); | 1008 updatesButton->setFixedHeight(90); |
1009 updatesButton->setCheckable(true); | 1009 updatesButton->setCheckable(true); |
1491 void MainWindow::toggleInManual(bool state, const Certificate &cert) | 1491 void MainWindow::toggleInManual(bool state, const Certificate &cert) |
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 btnIcon.addFile(":/img/write-into-48.png", QSize(48, 48), QIcon::Normal, QIcon::On); | 1496 if (mRemoveList->contains(cert)) { |
1497 btnIcon.addFile(":/img/write-remove-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off); | 1497 btnIcon.addFile(":/img/write-remove-48.png", QSize(48, 48), QIcon::Normal, QIcon::On); |
1498 actionBtn->setProperty("ToolTip_On", tr("Certificate will be installed.")); | 1498 btnIcon.addFile(":/img/cert-is-installed-bad-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off); |
1499 actionBtn->setProperty("ToolTip_Off", tr("Certificate will be removed.")); | 1499 actionBtn->setProperty("ToolTip_On", tr("Certificate will be removed.")); |
1500 /* Off should never be possible here | |
1501 * As the manual change of removed certificates is disabled */ | |
1502 actionBtn->setProperty("ToolTip_Off", tr("Certificate will not be removed.")); | |
1503 } else { | |
1504 btnIcon.addFile(":/img/write-into-48.png", QSize(48, 48), QIcon::Normal, QIcon::On); | |
1505 btnIcon.addFile(":/img/write-remove-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off); | |
1506 actionBtn->setProperty("ToolTip_On", tr("Certificate will be installed.")); | |
1507 actionBtn->setProperty("ToolTip_Off", tr("Certificate will be removed.")); | |
1508 } | |
1500 actionBtn->setIcon(btnIcon); | 1509 actionBtn->setIcon(btnIcon); |
1501 mUpdatesManual->addCertificate(cert, state, actionBtn); | 1510 mUpdatesManual->addCertificate(cert, state, actionBtn); |
1502 } | 1511 } |
1503 else { | 1512 else { |
1504 mUpdatesManual->removeCertificate(cert); | 1513 mUpdatesManual->removeCertificate(cert); |