aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/widgets/TextEdit.h
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-11-27 20:23:51 +0000
committersaturneric <[email protected]>2024-11-27 20:23:51 +0000
commita83c6e28a16f998d89b956688f07ce5352a2864f (patch)
tree796ad69eee3add96df38e3e4f1dc78a82745a9db /src/ui/widgets/TextEdit.h
parentfix: solve devops build issues (diff)
downloadGpgFrontend-a83c6e28a16f998d89b956688f07ce5352a2864f.tar.gz
GpgFrontend-a83c6e28a16f998d89b956688f07ce5352a2864f.zip
feat: improve ui logic and support more email operations
Diffstat (limited to 'src/ui/widgets/TextEdit.h')
-rw-r--r--src/ui/widgets/TextEdit.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/ui/widgets/TextEdit.h b/src/ui/widgets/TextEdit.h
index 30540569..68b648e5 100644
--- a/src/ui/widgets/TextEdit.h
+++ b/src/ui/widgets/TextEdit.h
@@ -29,6 +29,7 @@
#pragma once
#include "ui/dialog/QuitDialog.h"
+#include "ui/widgets/EMailEditorPage.h"
#include "ui/widgets/FilePage.h"
#include "ui/widgets/PlainTextEditorPage.h"
@@ -78,6 +79,13 @@ class TextEdit : public QWidget {
/**
* @brief
*
+ * @return EMailEditorPage*
+ */
+ [[nodiscard]] auto CurEMailPage() const -> EMailEditorPage*;
+
+ /**
+ * @brief
+ *
* @return FilePage*
*/
[[nodiscard]] auto CurFilePage() const -> FilePage*;
@@ -161,6 +169,12 @@ class TextEdit : public QWidget {
void SlotNewTab();
/**
+ * @details Adds a new tab with the title "untitled"+countpage+".eml"
+ * Sets the focus to the new tab. Increase Tab-Count by one
+ */
+ void SlotNewEMailTab();
+
+ /**
* @details
*
*/
@@ -260,6 +274,21 @@ class TextEdit : public QWidget {
*/
void SlotAppendText2CurTextPage(const QString& text);
+ /**
+ * @brief
+ *
+ * @param text
+ */
+ void SlotSetText2CurEMailPage(const QString& text);
+
+ /**
+ * @brief
+ *
+ * @return true
+ * @return false
+ */
+ auto SlotSaveAsEML() -> bool;
+
protected:
/**
* @brief Saves the content of currentTab to the file filename
@@ -268,6 +297,13 @@ class TextEdit : public QWidget {
*/
auto saveFile(const QString& file_name) -> bool;
+ /**
+ * @brief
+ *
+ * @return auto
+ */
+ auto saveEMLFile(const QString& file_name) -> bool;
+
private slots:
/**