diff options
Diffstat (limited to 'wizard.h')
-rw-r--r-- | wizard.h | 66 |
1 files changed, 39 insertions, 27 deletions
@@ -39,6 +39,9 @@ class Wizard : public QWizard Q_OBJECT public: + enum { Page_Intro, Page_ImportFromGpg4usb, Page_ImportFromGnupg, Page_GenKey, + Page_Conclusion }; + Wizard(GpgME::GpgContext *ctx, KeyMgmt *keyMgmt, QWidget *parent = 0); private: @@ -53,54 +56,47 @@ class IntroPage : public QWizardPage public: IntroPage(QWidget *parent = 0); QLabel *topLabel; - - int nextId() const; -}; - -class LanguagePage : public QWizardPage -{ - Q_OBJECT - -public: - LanguagePage(QWidget *parent = 0); - QLabel *topLabel; - + QLabel *langLabel; int nextId() const; }; -class KeyGenPage : public QWizardPage +class ImportFromGpg4usbPage : public QWizardPage { Q_OBJECT public: - KeyGenPage(GpgME::GpgContext *ctx, QWidget *parent = 0); - int nextId() const; + ImportFromGpg4usbPage(GpgME::GpgContext *ctx, KeyMgmt *keyMgmt, QWidget *parent = 0); private slots: - void generateKeyDialog(); - void showKeyGeneratedMessage(); + /** + * @details Import keys from gnupg-homedir, private or/and public depend on the checked boxes + */ + bool importKeysFromGpg4usb(); + bool importConfFromGpg4usb(QString dir); private: - QLabel *topLabel; - QPushButton *createKeyButton; - GpgME::GpgContext *mCtx; + int nextId() const; + + KeyMgmt *mKeyMgmt; QVBoxLayout *layout; + GpgME::GpgContext *mCtx; + QCheckBox *gpg4usbPrivKeyCheckBox; + QCheckBox *gpg4usbPubKeyCheckBox; + QPushButton *importFromGpg4usbButton; }; -class ImportPage : public QWizardPage +class ImportFromGnupgPage : public QWizardPage { Q_OBJECT public: - ImportPage(GpgME::GpgContext *ctx, KeyMgmt *keyMgmt, QWidget *parent = 0); + ImportFromGnupgPage(GpgME::GpgContext *ctx, KeyMgmt *keyMgmt, QWidget *parent = 0); private slots: /** * @details Import keys from gnupg-homedir, private or/and public depend on the checked boxes */ bool importKeysFromGnupg(); - bool importKeysFromGpg4usb(); - bool importConfFromGpg4usb(QString dir); private: KeyMgmt *mKeyMgmt; @@ -118,10 +114,26 @@ private: GpgME::GpgContext *mCtx; QCheckBox *gnupgPrivKeyCheckBox; QCheckBox *gnupgpPubKeyCheckBox; - QCheckBox *gpg4usbPrivKeyCheckBox; - QCheckBox *gpg4usbPubKeyCheckBox; QPushButton *importFromGnupgButton; - QPushButton *importFromGpg4usbButton; +}; + +class KeyGenPage : public QWizardPage +{ + Q_OBJECT + +public: + KeyGenPage(GpgME::GpgContext *ctx, QWidget *parent = 0); + int nextId() const; + +private slots: + void generateKeyDialog(); + void showKeyGeneratedMessage(); + +private: + QLabel *topLabel; + QPushButton *createKeyButton; + GpgME::GpgContext *mCtx; + QVBoxLayout *layout; }; class ConclusionPage : public QWizardPage |