diff options
author | Saturneric <[email protected]> | 2021-10-02 14:08:50 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2021-10-02 14:16:27 +0000 |
commit | 3c65d087eeee687ac01af2e80f3dd538f9a2c230 (patch) | |
tree | 1e860dc6343c1897e2224a002f2ca44c574381b3 /src/ui/keypair_details/KeySetExpireDateDialog.h | |
parent | The basic functions of the core pass the test. (diff) | |
download | GpgFrontend-3c65d087eeee687ac01af2e80f3dd538f9a2c230.tar.gz GpgFrontend-3c65d087eeee687ac01af2e80f3dd538f9a2c230.zip |
UI Framework Modified.
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 |