aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/main_window/MainWindow.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/main_window/MainWindow.h')
-rw-r--r--src/ui/main_window/MainWindow.h154
1 files changed, 93 insertions, 61 deletions
diff --git a/src/ui/main_window/MainWindow.h b/src/ui/main_window/MainWindow.h
index 42f9daf3..66b61d68 100644
--- a/src/ui/main_window/MainWindow.h
+++ b/src/ui/main_window/MainWindow.h
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2021 Saturneric
+ * Copyright (C) 2021 Saturneric <[email protected]>
*
* This file is part of GpgFrontend.
*
@@ -20,31 +20,22 @@
* 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.
+ * Saturneric <[email protected]> starting on May 12, 2021.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
*/
-#ifndef __GPGWIN_H__
-#define __GPGWIN_H__
-
-#include "KeyMgmt.h"
-#include "core/GpgConstants.h"
-#include "core/function/result_analyse/GpgDecryptResultAnalyse.h"
-#include "core/function/result_analyse/GpgEncryptResultAnalyse.h"
-#include "core/function/result_analyse/GpgSignResultAnalyse.h"
-#include "ui/GpgFrontendUI.h"
-#include "ui/dialog/WaitingDialog.h"
-#include "ui/dialog/Wizard.h"
-#include "ui/dialog/help/AboutDialog.h"
-#include "ui/dialog/import_export/KeyUploadDialog.h"
-#include "ui/dialog/settings/SettingsDialog.h"
+#pragma once
+
#include "ui/main_window/GeneralMainWindow.h"
-#include "ui/widgets/FindWidget.h"
#include "ui/widgets/InfoBoardWidget.h"
#include "ui/widgets/TextEdit.h"
+namespace GpgFrontend {
+class GpgPassphraseContext;
+}
+
namespace GpgFrontend::UI {
/**
* @brief
@@ -127,82 +118,130 @@ class MainWindow : public GeneralMainWindow {
/**
* @details Open a new tab for path
*/
- void SlotOpenFile(QString& path);
+ void SlotOpenFile(const QString& path);
/**
- * @details Open dialog for encrypting file.
+ * @details encrypt the text of currently active textedit-page
+ * with the currently checked keys
*/
- void SlotFileEncrypt();
+ void SlotEncrypt();
/**
- * @details Open dialog for decrypting file.
+ * @details encrypt and sign the text of currently active textedit-page
+ * with the currently checked keys
*/
- void SlotFileDecrypt();
+ void SlotEncryptSign();
/**
- * @details Open dialog for signing file.
+ * @details Show a passphrase dialog and decrypt the text of currently active
+ * tab.
*/
- void SlotFileSign();
+ void SlotDecrypt();
/**
- * @details Open dialog for verifying file.
+ * @details Sign the text of currently active tab with the checked private
+ * keys
*/
- void SlotFileVerify();
+ void SlotSign();
/**
- * @details Open dialog for signing file.
+ * @details Verify the text of currently active tab and show verify
+ * information. If document is signed with a key, which is not in keylist,
+ * show import missing key from keyserver in Menu of verifynotification.
*/
- void SlotFileEncryptSign();
+ void SlotVerify();
/**
- * @details Open dialog for verifying file.
+ * @details decrypt and verify the text of currently active textedit-page
+ * with the currently checked keys
*/
- void SlotFileDecryptVerify();
+ void SlotDecryptVerify();
/**
- * @details get value of member restartNeeded to needed.
- * @param needed true, if application has to be restarted
+ * @details Open dialog for encrypting file.
*/
- void SlotSetRestartNeeded(int);
+ void SlotFileEncrypt(const QString&);
- private slots:
+ /**
+ * @brief
+ *
+ */
+ void SlotDirectoryEncrypt(const QString&);
/**
- * @details encrypt the text of currently active textedit-page
- * with the currently checked keys
+ * @brief
+ *
+ * @param path
*/
- void slot_encrypt();
+ void SlotFileDecrypt(const QString& path);
/**
- * @details encrypt and sign the text of currently active textedit-page
- * with the currently checked keys
+ * @brief
+ *
+ * @param path
*/
- void slot_encrypt_sign();
+ void SlotArchiveDecrypt(const QString& path);
/**
- * @details Show a passphrase dialog and decrypt the text of currently active
- * tab.
+ * @brief
+ *
+ * @param path
*/
- void slot_decrypt();
+ void SlotFileSign(const QString& path);
/**
- * @details Sign the text of currently active tab with the checked private
- * keys
+ * @brief
+ *
+ * @param path
*/
- void slot_sign();
+ void SlotFileVerify(const QString& path);
/**
- * @details Verify the text of currently active tab and show verify
- * information. If document is signed with a key, which is not in keylist,
- * show import missing key from keyserver in Menu of verifynotification.
+ * @brief
+ *
+ * @param path
*/
- void slot_verify();
+ void SlotFileEncryptSign(const QString& path);
/**
- * @details decrypt and verify the text of currently active textedit-page
- * with the currently checked keys
+ * @brief
+ *
+ * @param path
+ */
+ void SlotDirectoryEncryptSign(const QString& path);
+
+ /**
+ * @brief
+ *
+ * @param path
+ */
+ void SlotFileDecryptVerify(const QString& path);
+
+ /**
+ * @brief
+ *
+ * @param path
+ */
+ void SlotArchiveDecryptVerify(const QString& path);
+
+ /**
+ * @details get value of member restartNeeded to needed.
+ * @param needed true, if application has to be restarted
+ */
+ void SlotSetRestartNeeded(int);
+
+ /**
+ * @details Open a new tab for path
+ */
+ void SlotRaisePinentry(QSharedPointer<GpgPassphraseContext>);
+
+ private slots:
+
+ /**
+ * @brief
+ *
*/
- void slot_decrypt_verify();
+ void slot_refresh_current_file_view();
/**
* @details Show the details of the first of the first of selected keys
@@ -315,7 +354,7 @@ class MainWindow : public GeneralMainWindow {
/**
* @details called when need to upgrade.
*/
- void slot_version_upgrade(const SoftwareVersion& version);
+ void slot_version_upgrade_nofity();
/**
* @details
@@ -380,11 +419,6 @@ class MainWindow : public GeneralMainWindow {
void recover_editor_unsaved_pages_from_cache();
/**
- * @details Save settings to ini-file.
- */
- void save_settings();
-
- /**
* @brief return true, if restart is needed
*/
[[nodiscard]] int get_restart_needed() const;
@@ -490,5 +524,3 @@ class MainWindow : public GeneralMainWindow {
};
} // namespace GpgFrontend::UI
-
-#endif // __GPGWIN_H__