diff options
author | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-08-18 23:37:41 +0000 |
---|---|---|
committer | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-08-18 23:37:41 +0000 |
commit | 1c20e7187fa2022da66559a498dd643cd7381c16 (patch) | |
tree | ce0835996a26fb3e8baedc538ea3fe22154f5764 /verifynotification.cpp | |
parent | add almost unconfigured doxygen conf-file, which outputs qch for qtcreator (diff) | |
download | gpg4usb-1c20e7187fa2022da66559a498dd643cd7381c16.tar.gz gpg4usb-1c20e7187fa2022da66559a498dd643cd7381c16.zip |
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
Diffstat (limited to 'verifynotification.cpp')
-rw-r--r-- | verifynotification.cpp | 46 |
1 files changed, 13 insertions, 33 deletions
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); |