Mercurial > trustbridge
view ui/certificateitemwidget.cpp @ 583:7d6026424f37 trustbridge-refactor
Added images for the new UI design.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Tue, 27 May 2014 16:17:09 +0200 |
parents | 88c9bdc74175 |
children | 566ee111e331 |
line wrap: on
line source
/* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik * Software engineering by Intevation GmbH * * This file is Free Software under the GNU GPL (v>=2) * and comes with ABSOLUTELY NO WARRANTY! * See LICENSE.txt for details. */ #include "certificateitemwidget.h" #include <QHBoxLayout> #include <QDebug> CertificateItemWidget::CertificateItemWidget( QWidget *parent, const Certificate &cert) : QWidget(parent) { mCertificate = cert; setupGUI(); } void CertificateItemWidget::setupGUI() { mLabel = new QLabel(mCertificate.subjectCN()); mComboBox = new QComboBox; mComboBox->setFixedWidth(46); if (mCertificate.isInstallCert()) { mComboBox->addItem(QIcon(":/img/list-add.png"), tr("add"), QVariant("true")); mComboBox->addItem(QIcon(":/img/list-remove.png"), tr("remove"), QVariant("false")); } else { mComboBox->addItem(QIcon(":/img/list-add.png"), tr("add"), QVariant("true")); mComboBox->addItem(QIcon(":/img/list-remove.png"), tr("remove"), QVariant("false")); } QHBoxLayout *layout = new QHBoxLayout; layout->addWidget(mComboBox); layout->addWidget(mLabel); this->setLayout(layout); }