From 1c20e7187fa2022da66559a498dd643cd7381c16 Mon Sep 17 00:00:00 2001 From: nils Date: Thu, 18 Aug 2011 23:37:41 +0000 Subject: changed verifylabellist back to one verifylabel and updated TODO git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@516 34ebc366-c3a9-4b3c-9f84-69acf7962910 --- verifynotification.cpp | 46 +++++++++++++--------------------------------- 1 file changed, 13 insertions(+), 33 deletions(-) (limited to 'verifynotification.cpp') diff --git a/verifynotification.cpp b/verifynotification.cpp index 25cbc4e..67efe89 100644 --- a/verifynotification.cpp +++ b/verifynotification.cpp @@ -5,64 +5,37 @@ VerifyNotification::VerifyNotification(GpgME::Context *ctx, QWidget *parent ) : QWidget(parent) { mCtx = ctx; - - //text shown in verify notification verifyLabel = new QLabel(this); - // QLabel *verifyLabel2 = new QLabel(this); - // verifyLabel2->setText("hallo"); - - // Text contained in detilsdialog verifyDetailText = new QString(); - // List kontaining the signature keys not contained in keylist - keysNotInList = new QStringList(); - importFromKeyserverAct = new QAction(tr("Import missing key from Keyserver"), this); connect(importFromKeyserverAct, SIGNAL(triggered()), this, SLOT(importFromKeyserver())); showVerifyDetailsAct = new QAction(tr("Show detailed verify information"), this); connect(showVerifyDetailsAct, SIGNAL(triggered()), this, SLOT(showVerifyDetails())); - // Menu for the details button detailMenu = new QMenu(this); detailMenu->addAction(showVerifyDetailsAct); detailMenu->addAction(importFromKeyserverAct); importFromKeyserverAct->setVisible(false); - // the details button + keysNotInList = new QStringList(); + detailsButton = new QPushButton("Details",this); detailsButton->setMenu(detailMenu); - verifyLabelList = new QWidget(this); - verifyLabelListLayout = new QVBoxLayout(this); - verifyLabelList->setLayout(verifyLabelListLayout); - //addVerifyLabel(verifyLabel->text(),QString("ok")); - verifyLabel->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum); -// verifyLabelListLayout->addWidget(verifyLabel2); - //verifyLabel2->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum); notificationWidgetLayout = new QHBoxLayout(this); - verifyLabelListLayout->setContentsMargins(0,0,0,0); notificationWidgetLayout->setContentsMargins(0,0,0,0); - notificationWidgetLayout->addWidget(verifyLabelList); + notificationWidgetLayout->addWidget(verifyLabel,2); notificationWidgetLayout->addWidget(detailsButton); - detailsButton->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum); this->setLayout(notificationWidgetLayout); -} - -void VerifyNotification::addVerifyLabel(QString text, QString status) -{ - QLabel *label = new QLabel(text); - label->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum); -// label->setContentsMargins(0,0,0,0); - - verifyLabelListLayout->addWidget(label); - label->setObjectName(status); } -void VerifyNotification::setVerifyLabel(QString text) +void VerifyNotification::setVerifyDetailText (QString text) { - verifyLabel->setText(text); + verifyDetailText->clear(); + verifyDetailText->append(text); return; } @@ -74,6 +47,13 @@ void VerifyNotification::importFromKeyserver() } } +void VerifyNotification::setVerifyLabel(QString text, QString status) +{ + verifyLabel->setText(text); + verifyLabel->setObjectName(status); + return; +} + void VerifyNotification::showImportAction() { importFromKeyserverAct->setVisible(true); -- cgit v1.2.3