comparison ui/certificatelistwidget.cpp @ 687:973a7ce19658

(issue24) Let the string for install / remove be set for each item individually
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 01 Jul 2014 12:49:19 +0200
parents 320a64d58e62
children 0f4c480c41f4
comparison
equal deleted inserted replaced
686:a2e94e88d304 687:973a7ce19658
68 } 68 }
69 69
70 void CertificateListWidget::addCertificate( 70 void CertificateListWidget::addCertificate(
71 const Certificate &certificate, 71 const Certificate &certificate,
72 bool state, 72 bool state,
73 bool editable) 73 bool editable,
74 const QString &installLabel,
75 const QString &removeLabel)
74 { 76 {
75 QListWidgetItem* item = new QListWidgetItem(mCertificateList); 77 QListWidgetItem* item = new QListWidgetItem(mCertificateList);
76 item->setData(Qt::UserRole, 78 item->setData(Qt::UserRole,
77 QVariant::fromValue(certificate)); 79 QVariant::fromValue(certificate));
78 mCertificateList->addItem(item); 80 mCertificateList->addItem(item);
79 CertificateItemWidget *widget = 81 CertificateItemWidget *widget =
80 new CertificateItemWidget(mCertificateList, certificate, state, editable); 82 new CertificateItemWidget(mCertificateList, certificate, state, editable,
83 installLabel, removeLabel);
81 connect(widget, SIGNAL(stateChanged(bool, const Certificate&)), 84 connect(widget, SIGNAL(stateChanged(bool, const Certificate&)),
82 this, SLOT(certStateChanged(bool, const Certificate&))); 85 this, SLOT(certStateChanged(bool, const Certificate&)));
83 item->setSizeHint(widget->minimumSizeHint()); 86 item->setSizeHint(widget->minimumSizeHint());
84 mCertificateList->setItemWidget(item, widget); 87 mCertificateList->setItemWidget(item, widget);
85 } 88 }

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