blob: e6b3819547de19fde790ffebb37f558128a0b9a2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
#include "verifynotification.h"
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,2);
// notificationWidget = new QWidget(this);
//this->setStyleSheet("background-color: #CBFDCB;");
this->setLayout(notificationWidgetLayout);
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(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);
return;
}
|