comparison ui/certificateitemwidget.cpp @ 650:9c3e7754b76b trustbridge-refactor

Use new icons in certificate lists.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 25 Jun 2014 14:51:07 +0200
parents 9d806f140bd5
children c7405d526ead
comparison
equal deleted inserted replaced
649:ba0434cd12e1 650:9c3e7754b76b
30 connect(mComboBox, SIGNAL(currentIndexChanged(int)), 30 connect(mComboBox, SIGNAL(currentIndexChanged(int)),
31 this, SLOT(currentStateChanged(int))); 31 this, SLOT(currentStateChanged(int)));
32 32
33 QHBoxLayout *layout = new QHBoxLayout; 33 QHBoxLayout *layout = new QHBoxLayout;
34 if (mCertificate.isInstallCert()) { 34 if (mCertificate.isInstallCert()) {
35 mComboBox->addItem(QIcon(":/img/list-add.png"), tr("add"), QVariant("true")); 35 mComboBox->addItem(QIcon(":/img/security-high.png"), tr("install"), QVariant("true"));
36 mComboBox->addItem(QIcon(":/img/list-remove.png"), 36 mComboBox->addItem(QIcon(":/img/security-low.png"),
37 tr("remove"), QVariant("false")); 37 tr("remove"), QVariant("false"));
38 if (mState) 38 if (mState)
39 mComboBox->setCurrentIndex(0); 39 mComboBox->setCurrentIndex(0);
40 else { 40 else {
41 mComboBox->setCurrentIndex(1); 41 mComboBox->setCurrentIndex(1);
42 } 42 }
43 layout->addWidget(mComboBox); 43 layout->addWidget(mComboBox);
44 } 44 }
45 else if (!mCertificate.isInstallCert() && !mEditable){ 45 else if (!mCertificate.isInstallCert() && !mEditable){
46 QImage *img = new QImage(":/img/list-remove.png"); 46 QImage *img = new QImage(":/img/trash-empty.png");
47 QLabel *imgLabel = new QLabel; 47 QLabel *imgLabel = new QLabel;
48 imgLabel->setPixmap(QPixmap::fromImage(*img)); 48 imgLabel->setPixmap(QPixmap::fromImage(*img));
49 imgLabel->setFixedSize(25, 25); 49 imgLabel->setFixedSize(28, 28);
50 imgLabel->setMargin(5); 50 imgLabel->setMargin(2);
51 layout->addWidget(imgLabel); 51 layout->addWidget(imgLabel);
52 } 52 }
53 else { 53 else {
54 mComboBox->addItem(QIcon(":/img/list-add.png"), tr("add"), QVariant("true")); 54 mComboBox->addItem(QIcon(":/img/trash-empty.png"), tr("deinstall"), QVariant("true"));
55 mComboBox->addItem(QIcon(":/img/list-remove.png"), 55 mComboBox->addItem(QIcon(":/img/security-medium.png"),
56 tr("remove"), QVariant("false")); 56 tr("leave"), QVariant("false"));
57 if (mState) 57 if (mState)
58 mComboBox->setCurrentIndex(0); 58 mComboBox->setCurrentIndex(0);
59 else { 59 else {
60 mComboBox->setCurrentIndex(1); 60 mComboBox->setCurrentIndex(1);
61 } 61 }

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