diff options
author | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-08-13 01:14:20 +0000 |
---|---|---|
committer | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-08-13 01:14:20 +0000 |
commit | 8fb695a304f1ae1b53c500912d23de63e8bf2340 (patch) | |
tree | d8a1a646d9670b37680e0ca403f3c4bd041ea8ff /verifynotification.cpp | |
parent | further comments (diff) | |
download | gpg4usb-8fb695a304f1ae1b53c500912d23de63e8bf2340.tar.gz gpg4usb-8fb695a304f1ae1b53c500912d23de63e8bf2340.zip |
changed verifylabel to verifylabellist and added states ok,warn,crit for verifylabels
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@514 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'verifynotification.cpp')
-rw-r--r-- | verifynotification.cpp | 45 |
1 files changed, 33 insertions, 12 deletions
diff --git a/verifynotification.cpp b/verifynotification.cpp index 1569542..25cbc4e 100644 --- a/verifynotification.cpp +++ b/verifynotification.cpp @@ -5,37 +5,64 @@ 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); - keysNotInList = new QStringList(); - + // the details button 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(verifyLabel,2); + notificationWidgetLayout->addWidget(verifyLabelList); 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::setVerifyDetailText (QString text) +void VerifyNotification::setVerifyLabel(QString text) { - verifyDetailText->clear(); - verifyDetailText->append(text); + verifyLabel->setText(text); return; } @@ -47,12 +74,6 @@ void VerifyNotification::importFromKeyserver() } } -void VerifyNotification::setVerifyLabel(QString text) -{ - verifyLabel->setText(text); - return; -} - void VerifyNotification::showImportAction() { importFromKeyserverAct->setVisible(true); |