diff options
Diffstat (limited to '')
-rw-r--r-- | src/ui/keypair_details/KeySetExpireDateDialog.h (renamed from include/ui/keypair_details/KeySetExpireDateDialog.h) | 46 |
1 files changed, 28 insertions, 18 deletions
diff --git a/include/ui/keypair_details/KeySetExpireDateDialog.h b/src/ui/keypair_details/KeySetExpireDateDialog.h index 11f2a560..d7c19eaa 100644 --- a/include/ui/keypair_details/KeySetExpireDateDialog.h +++ b/src/ui/keypair_details/KeySetExpireDateDialog.h @@ -25,29 +25,39 @@ #ifndef GPGFRONTEND_KEYSETEXPIREDATEDIALOG_H #define GPGFRONTEND_KEYSETEXPIREDATEDIALOG_H -#include "GpgFrontend.h" #include "gpg/GpgContext.h" #include "gpg/model/GpgKey.h" #include "gpg/model/GpgSubKey.h" +#include "ui/GpgFrontendUI.h" + +namespace GpgFrontend::UI { class KeySetExpireDateDialog : public QDialog { -Q_OBJECT -public: - explicit KeySetExpireDateDialog(GpgFrontend::GpgContext *ctx, const GpgKey &key, const GpgSubKey *subkey, QWidget *parent = nullptr); - -private: - GpgFrontend::GpgContext *mCtx; - const GpgKey &mKey; - const GpgSubKey *mSubkey; - - QDateTimeEdit *dateTimeEdit{}; - QPushButton *confirmButton{}; - QCheckBox *nonExpiredCheck{}; - -private slots: - void slotConfirm(); - void slotNonExpiredChecked(int state); + Q_OBJECT + public: + explicit KeySetExpireDateDialog(const KeyId& key_id, + QWidget* parent = nullptr); + + explicit KeySetExpireDateDialog(const KeyId& key_id, + const std::string& subkey_id, + QWidget* parent = nullptr); + + private: + + void init(); + + const GpgKey mKey; + const SubkeyId mSubkey; + + QDateTimeEdit* dateTimeEdit{}; + QPushButton* confirmButton{}; + QCheckBox* nonExpiredCheck{}; + + private slots: + void slotConfirm(); + void slotNonExpiredChecked(int state); }; +} // namespace GpgFrontend::UI -#endif //GPGFRONTEND_KEYSETEXPIREDATEDIALOG_H +#endif // GPGFRONTEND_KEYSETEXPIREDATEDIALOG_H |