diff options
author | Saturneric <[email protected]> | 2022-02-13 06:54:44 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2022-02-13 06:54:44 +0000 |
commit | b991fea4912c63170c79ccdc586e3d3bc4297715 (patch) | |
tree | 8d1e1c2acc55442a52caf7f8814a689d9f7ba37b /src/ui/main_window/MainWindow.h | |
parent | <fix>(ci): Set Git's file line endings to LF (diff) | |
download | GpgFrontend-b991fea4912c63170c79ccdc586e3d3bc4297715.tar.gz GpgFrontend-b991fea4912c63170c79ccdc586e3d3bc4297715.zip |
<feat, refactor>(src): Enable top encryption action menu in file mode
1. Adjust the names of some functions
2. Enable top encryption action menu in file mode
Diffstat (limited to '')
-rw-r--r-- | src/ui/main_window/MainWindow.h | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/ui/main_window/MainWindow.h b/src/ui/main_window/MainWindow.h index cfae16ab..5cc9a15a 100644 --- a/src/ui/main_window/MainWindow.h +++ b/src/ui/main_window/MainWindow.h @@ -53,6 +53,19 @@ class MainWindow : public QMainWindow { Q_OBJECT public: + + struct CryptoMenu{ + using OperationType = unsigned int; + + static constexpr OperationType None = 0; + static constexpr OperationType Encrypt = 1 << 0; + static constexpr OperationType Sign = 1 << 1; + static constexpr OperationType Decrypt = 1 << 2; + static constexpr OperationType Verify = 1 << 3; + static constexpr OperationType EncryptAndSign = 1 << 4; + static constexpr OperationType DecryptAndVerify = 1 << 5; + }; + /** * @brief * @@ -62,14 +75,20 @@ class MainWindow : public QMainWindow { /** * @details ONLY Called from main() */ - void init() noexcept; + void Init() noexcept; + + /** + * @details refresh and enable specify crypto-menu actions. + */ + void SetCryptoMenuStatus(CryptoMenu::OperationType type); signals: /** * @brief */ - void Loaded(); + void SignalLoaded(); + public slots: |