diff options
author | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-11-05 23:10:23 +0000 |
---|---|---|
committer | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-11-05 23:10:23 +0000 |
commit | b9308d094c76779277f2002a776769b43f17798c (patch) | |
tree | f8d076a0dd40930b56feeb817bda935d0d0f6156 | |
parent | import from gnupg in wizard home works in windows now (still untested, but it... (diff) | |
download | gpg4usb-b9308d094c76779277f2002a776769b43f17798c.tar.gz gpg4usb-b9308d094c76779277f2002a776769b43f17798c.zip |
added start wizard to help menu
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@600 34ebc366-c3a9-4b3c-9f84-69acf7962910
-rw-r--r-- | mainwindow.cpp | 25 | ||||
-rw-r--r-- | mainwindow.h | 4 |
2 files changed, 21 insertions, 8 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp index 7710043..8dc1e6a 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -78,11 +78,9 @@ MainWindow::MainWindow() // Show wizard, if the don't show wizard message box wasn't checked // and keylist doesn't contain a private key QSettings settings; - // if (settings.value("wizard/showWizard",true).toBool() && !mKeyList->containsPrivateKeys()) { - Wizard *wizard = new Wizard(mCtx,this); - wizard->show(); - wizard->setModal(true); - //} + if (settings.value("wizard/showWizard",true).toBool() && !mKeyList->containsPrivateKeys()) { + startWizard(); + } } void MainWindow::restoreSettings() @@ -291,12 +289,12 @@ void MainWindow::createActions() importKeyFromEditAct->setToolTip(tr("Import New Key From Editor")); connect(importKeyFromEditAct, SIGNAL(triggered()), this, SLOT(importKeyFromEdit())); - openKeyManagementAct = new QAction(tr("Key Management"), this); + openKeyManagementAct = new QAction(tr("&Key Management"), this); openKeyManagementAct->setIcon(QIcon(iconPath + "keymgmt.png")); openKeyManagementAct->setToolTip(tr("Open Keymanagement")); connect(openKeyManagementAct, SIGNAL(triggered()), this, SLOT(openKeyManagement())); - importKeyDialogAct = new QAction(tr("Import Key"), this); + importKeyDialogAct = new QAction(tr("&Import Key"), this); importKeyDialogAct->setIcon(QIcon(iconPath + "key_import.png")); importKeyDialogAct->setToolTip(tr("Open Import New Key Dialog")); connect(importKeyDialogAct, SIGNAL(triggered()), this, SLOT(importKeyDialog())); @@ -309,7 +307,6 @@ void MainWindow::createActions() connect(aboutAct, SIGNAL(triggered()), this, SLOT(about())); openTutorialAct = new QAction(tr("Online &Tutorial"), this); - openTutorialAct->setIcon(QIcon(iconPath + "help.png")); openTutorialAct->setToolTip(tr("Open Online Tutorial")); connect(openTutorialAct, SIGNAL(triggered()), this, SLOT(openTutorial())); @@ -317,6 +314,10 @@ void MainWindow::createActions() openTranslateAct->setToolTip(tr("Translate gpg4usb yourself")); connect(openTranslateAct, SIGNAL(triggered()), this, SLOT(openTranslate())); + startWizardAct= new QAction(tr("Open &Wizard"), this); + startWizardAct->setToolTip(tr("Open the wizard")); + connect(startWizardAct, SIGNAL(triggered()), this, SLOT(startWizard())); + /* Popup-Menu-Action for KeyList */ appendSelectedKeysAct = new QAction(tr("Append Selected Key(s) To Text"), this); @@ -396,6 +397,7 @@ void MainWindow::createMenus() helpMenu = menuBar()->addMenu(tr("&Help")); helpMenu->addAction(openTutorialAct); helpMenu->addAction(openTranslateAct); + helpMenu->addAction(startWizardAct); helpMenu->addAction(aboutAct); } @@ -611,6 +613,13 @@ void MainWindow::openTutorial() { QDesktopServices::openUrl(QUrl("http://gpg4usb.cpunk.de/docu.html")); } +void MainWindow::startWizard() +{ + Wizard *wizard = new Wizard(mCtx,this); + wizard->show(); + wizard->setModal(true); +} + /* * if this is mime, split text and attachments... * message contains only text afterwards diff --git a/mainwindow.h b/mainwindow.h index 21939e0..b73fec2 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -104,6 +104,8 @@ private slots: void showKeyDetails(); + void startWizard(); + /** * @details Import keys from currently active tab to keylist if possible. */ @@ -276,6 +278,8 @@ private: QAction *openTranslateAct; /** Action to open translate doc*/ QAction *openTutorialAct; /** Action to open tutorial */ QAction *showKeyDetailsAct; /** Action to open key-details dialog */ + QAction *startWizardAct; /** Action to open the wizard */ + QLineEdit *nameEdit; /**< TODO */ QLineEdit *emailEdit; /**< TODO */ QLineEdit *commentEdit; /**< TODO */ |