aboutsummaryrefslogtreecommitdiffstats
path: root/mainwindow.cpp
diff options
context:
space:
mode:
authornils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2012-03-21 22:06:17 +0000
committernils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2012-03-21 22:06:17 +0000
commitffc7c45fee1bfa046cd2c605a43c9c5d2cf7eb62 (patch)
tree15fa804d0f2945a64d5a70bb6c71ce804f231b09 /mainwindow.cpp
parentadded rsa key generation (diff)
downloadgpg4usb-ffc7c45fee1bfa046cd2c605a43c9c5d2cf7eb62.tar.gz
gpg4usb-ffc7c45fee1bfa046cd2c605a43c9c5d2cf7eb62.zip
proof of concept for upload key to server
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@859 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'mainwindow.cpp')
-rw-r--r--mainwindow.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp
index 6c462e2..52f91a8 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -57,6 +57,8 @@ MainWindow::MainWindow()
mKeyList->addMenuAction(copyMailAddressToClipboardAct);
mKeyList->addMenuAction(showKeyDetailsAct);
mKeyList->addMenuAction(refreshKeysFromKeyserverAct);
+ mKeyList->addMenuAction(uploadKeyToServerAct);
+
restoreSettings();
// open filename if provided as first command line parameter
@@ -354,6 +356,10 @@ void MainWindow::createActions()
refreshKeysFromKeyserverAct->setToolTip(tr("Refresh key from default keyserver"));
connect(refreshKeysFromKeyserverAct, SIGNAL(triggered()), this, SLOT(refreshKeysFromKeyserver()));
+ uploadKeyToServerAct = new QAction(tr("Upload Key(s) To Server"), this);
+ uploadKeyToServerAct->setToolTip(tr("Upload The Selected Keys To Server"));
+ connect(uploadKeyToServerAct, SIGNAL(triggered()), this, SLOT(uploadKeyToServer()));
+
/* Key-Shortcuts for Tab-Switchung-Action
*/
switchTabUpAct = new QAction(this);
@@ -904,7 +910,14 @@ void MainWindow::refreshKeysFromKeyserver()
KeyServerImportDialog *ksid = new KeyServerImportDialog(mCtx,mKeyList,this);
ksid->import(*mKeyList->getSelected());
+}
+
+void MainWindow::uploadKeyToServer()
+{
+ QByteArray *keyArray = new QByteArray();
+ mCtx->exportKeys(mKeyList->getSelected(), keyArray);
+ mKeyList->uploadKeyToServer(keyArray);
}
void MainWindow::fileEncryption()