diff options
author | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-08-02 00:43:21 +0000 |
---|---|---|
committer | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-08-02 00:43:21 +0000 |
commit | 54f9d1f4d3ab003f4d658aeb64b482b212ab7041 (patch) | |
tree | fb830a416d3684b225ddacc68e537c86705bdea7 /verifynotification.cpp | |
parent | changed bool iscompletlysigned to int issigned and added setverifylabel to ve... (diff) | |
download | gpg4usb-54f9d1f4d3ab003f4d658aeb64b482b212ab7041.tar.gz gpg4usb-54f9d1f4d3ab003f4d658aeb64b482b212ab7041.zip |
added information to verifylabel and functionalitiy to import missing keys. Dont show a delete dialog, if no key is checked
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@506 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'verifynotification.cpp')
-rw-r--r-- | verifynotification.cpp | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/verifynotification.cpp b/verifynotification.cpp index 2de1a2a..2c5cd56 100644 --- a/verifynotification.cpp +++ b/verifynotification.cpp @@ -1,32 +1,40 @@ + #include "verifynotification.h" -VerifyNotification::VerifyNotification(QWidget *parent) : +VerifyNotification::VerifyNotification(GpgME::Context *ctx, QWidget *parent ) : QWidget(parent) { + mCtx = ctx; verifyLabel = new QLabel("Verified"); QHBoxLayout *notificationWidgetLayout = new QHBoxLayout(); notificationWidgetLayout->setContentsMargins(0,0,0,0); - notificationWidgetLayout->addWidget(verifyLabel); + notificationWidgetLayout->addWidget(verifyLabel,2); // notificationWidget = new QWidget(this); this->setStyleSheet("background-color: #CBFDCB;"); this->setLayout(notificationWidgetLayout); - QAction *openAct = new QAction(tr("&Open..."), this); - openAct->setShortcut(QKeySequence::Open); - openAct->setToolTip(tr("Open an existing file")); - - QMenu *verifyMenu = new QMenu(); - verifyMenu->addAction(openAct); + QAction *importFromKeyserverAct = new QAction(tr("Import missing key from Keyserver"), this); + connect(importFromKeyserverAct, SIGNAL(triggered()), this, SLOT(importFromKeyserver())); + QMenu *detailMenu = new QMenu(); + detailMenu->addAction(importFromKeyserverAct); + keysNotInList = new QStringList(); QPushButton *verifyButton = new QPushButton("Details"); - verifyButton->setMenu(verifyMenu); - notificationWidgetLayout->addStretch(1); + verifyButton->setMenu(detailMenu); + // notificationWidgetLayout->addStretch(1); notificationWidgetLayout->addWidget(verifyButton); } +void VerifyNotification::importFromKeyserver(){ + KeyServerImportDialog *importDialog =new KeyServerImportDialog(mCtx,this); + foreach (QString keyid, *keysNotInList) { + importDialog->import(keyid); + } +} + void VerifyNotification::setVerifyLabel(QString text) { verifyLabel->setText(text); |