aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/gnupg/GnuPGControllerDialog.h
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2023-04-04 16:19:36 +0000
committerSaturneric <[email protected]>2023-04-04 16:19:36 +0000
commit2b2ae2bc7b704e5631458f0411fb3ee9203efdcb (patch)
tree018a9cb84151b413c1f9b9c5e9a7fee3b9817777 /src/ui/dialog/gnupg/GnuPGControllerDialog.h
parentfeat: add custom gpgconf path support in context (diff)
downloadGpgFrontend-2b2ae2bc7b704e5631458f0411fb3ee9203efdcb.tar.gz
GpgFrontend-2b2ae2bc7b704e5631458f0411fb3ee9203efdcb.zip
feat: add gnupg controller
Diffstat (limited to 'src/ui/dialog/gnupg/GnuPGControllerDialog.h')
-rw-r--r--src/ui/dialog/gnupg/GnuPGControllerDialog.h104
1 files changed, 104 insertions, 0 deletions
diff --git a/src/ui/dialog/gnupg/GnuPGControllerDialog.h b/src/ui/dialog/gnupg/GnuPGControllerDialog.h
new file mode 100644
index 00000000..497f293a
--- /dev/null
+++ b/src/ui/dialog/gnupg/GnuPGControllerDialog.h
@@ -0,0 +1,104 @@
+/**
+ * Copyright (C) 2021 Saturneric
+ *
+ * This file is part of GpgFrontend.
+ *
+ * GpgFrontend is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GpgFrontend is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GpgFrontend. If not, see <https://www.gnu.org/licenses/>.
+ *
+ * The initial version of the source code is inherited from
+ * the gpg4usb project, which is under GPL-3.0-or-later.
+ *
+ * All the source code of GpgFrontend was modified and released by
+ * Saturneric<[email protected]> starting on May 12, 2021.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+
+#ifndef GPGFRONTEND_GNUPGCONTROLLERDIALOGLOG_H
+#define GPGFRONTEND_GNUPGCONTROLLERDIALOGLOG_H
+
+#include "ui/GpgFrontendUI.h"
+#include "ui/dialog/GeneralDialog.h"
+
+class Ui_GnuPGControllerDialog;
+
+namespace GpgFrontend::UI {
+class GnuPGControllerDialog : public GeneralDialog {
+ Q_OBJECT
+ public:
+ /**
+ * @brief Construct a new General Tab object
+ *
+ * @param parent
+ */
+ explicit GnuPGControllerDialog(QWidget* parent = nullptr);
+
+ public slots:
+
+ /**
+ * @brief
+ *
+ */
+ void SlotAccept();
+
+ signals:
+
+ /**
+ * @brief
+ *
+ * @param needed
+ */
+ void SignalRestartNeeded(int);
+
+ private slots:
+
+ /**
+ * @brief
+ *
+ * @param needed
+ */
+ void slot_set_restart_needed(int);
+
+ /**
+ * @brief
+ *
+ */
+ void slot_update_custom_key_database_path_label(int state);
+
+ /**
+ * @brief
+ *
+ */
+ void slot_update_custom_gnupg_install_path_label(int state);
+
+ private:
+ std::shared_ptr<Ui_GnuPGControllerDialog> ui_; ///<
+ int restart_needed_{0}; ///<
+
+ /**
+ * @brief Get the Restart Needed object
+ *
+ * @return true
+ * @return false
+ */
+ int get_restart_needed() const;
+
+ void set_settings();
+
+ void apply_settings();
+};
+} // namespace GpgFrontend::UI
+
+#endif // GPGFRONTEND_GNUPGCONTROLLERDIALOGLOG_H