diff options
author | saturneric <[email protected]> | 2024-11-27 20:23:51 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-11-27 20:23:51 +0000 |
commit | a83c6e28a16f998d89b956688f07ce5352a2864f (patch) | |
tree | 796ad69eee3add96df38e3e4f1dc78a82745a9db /src/ui/widgets/TextEdit.h | |
parent | fix: solve devops build issues (diff) | |
download | GpgFrontend-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.h | 36 |
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: /** |