diff ui/certificateitemwidget.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 248d4f24e618
children 31c3d2bc9880
line wrap: on
line diff
--- a/ui/certificateitemwidget.cpp	Tue Jul 01 12:14:10 2014 +0200
+++ b/ui/certificateitemwidget.cpp	Tue Jul 01 12:49:19 2014 +0200
@@ -10,11 +10,15 @@
 #include <QHBoxLayout>
 #include <QDebug>
 
-CertificateItemWidget::CertificateItemWidget(
-    QWidget *parent,
-    const Certificate &cert,
-    bool state,
-    bool editable) : QWidget(parent)
+CertificateItemWidget::CertificateItemWidget(QWidget *parent,
+                                             const Certificate &cert,
+                                             bool state,
+                                             bool editable,
+                                             const QString &installLabel,
+                                             const QString &removeLabel) :
+    QWidget(parent),
+    mInstallLabel (installLabel),
+    mRemoveLabel (removeLabel)
 {
     mCertificate = cert;
     mState = state;
@@ -32,8 +36,8 @@
 
     QHBoxLayout *layout = new QHBoxLayout;
     if (mCertificate.isInstallCert()) {
-        mComboBox->addItem(QIcon(":/img/security-high.png"), tr("install"), QVariant("true"));
-        mComboBox->addItem(QIcon(":/img/security-low.png"), tr("remove"), QVariant("false"));
+        mComboBox->addItem(QIcon(":/img/security-high.png"), mInstallLabel, QVariant("true"));
+        mComboBox->addItem(QIcon(":/img/security-low.png"), mRemoveLabel, QVariant("false"));
         if (mState)
             mComboBox->setCurrentIndex(0);
         else {

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