aboutsummaryrefslogtreecommitdiffstats
path: root/include/ui/widgets/TextEdit.h
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2021-06-25 07:04:22 +0000
committerSaturneric <[email protected]>2021-06-25 07:04:22 +0000
commit6f5d4672972c87486f5a34d6dc8b0c8668f9a2a4 (patch)
tree651bc6b2ac5ae26bbb0bee334630a786bef9bc29 /include/ui/widgets/TextEdit.h
parentUpdated Document; (diff)
downloadGpgFrontend-6f5d4672972c87486f5a34d6dc8b0c8668f9a2a4.tar.gz
GpgFrontend-6f5d4672972c87486f5a34d6dc8b0c8668f9a2a4.zip
Update Project Structure;
Update Version; Add FilePage;
Diffstat (limited to '')
-rw-r--r--include/ui/widgets/TextEdit.h (renamed from include/ui/TextEdit.h)25
1 files changed, 15 insertions, 10 deletions
diff --git a/include/ui/TextEdit.h b/include/ui/widgets/TextEdit.h
index 8219814b..f98da145 100644
--- a/include/ui/TextEdit.h
+++ b/include/ui/widgets/TextEdit.h
@@ -25,9 +25,10 @@
#ifndef __TEXTEDIT_H__
#define __TEXTEDIT_H__
-#include "ui/EditorPage.h"
-#include "ui/HelpPage.h"
-#include "QuitDialog.h"
+#include "ui/widgets/EditorPage.h"
+#include "ui/widgets/HelpPage.h"
+#include "ui/widgets/FilePage.h"
+#include "ui/QuitDialog.h"
/**
@@ -59,22 +60,22 @@ public:
*/
bool maybeSaveAnyTab();
- int tabCount() const;
+ [[nodiscard]] int tabCount() const;
/**
* @details textpage of the currently activated tab
* @return \li reference to QTextEdit if tab has one
* \li 0 otherwise (e.g. if helppage)
*/
- QTextEdit *curTextPage() const;
+ [[nodiscard]] QTextEdit *curTextPage() const;
- QTextBrowser *curHelpPage() const;
+ [[nodiscard]] QTextBrowser *curHelpPage() const;
/**
* @details List of currently unsaved tabs.
* @returns QHash<int, QString> Hash of tabindexes and title of unsaved tabs.
*/
- QHash<int, QString> unsavedDocuments() const;
+ [[nodiscard]] QHash<int, QString> unsavedDocuments() const;
QTabWidget *tabWidget; /** Widget containing the tabs of the editor */
@@ -84,7 +85,7 @@ public slots:
* @details Return pointer to the currently activated tabpage.
*
*/
- EditorPage *slotCurPage() const;
+ [[nodiscard]] EditorPage *slotCurPage() const;
/**
* @details Insert a ">" at the begining of every line of current textedit.
@@ -137,6 +138,11 @@ public slots:
void slotNewHelpTab(const QString& title, const QString& path) const;
/**
+ * New File Tab to do file operation
+ */
+ void slotNewFileTab() const;
+
+ /**
* @details put a * in front of current tabs title, if current textedit is modified
*/
void slotShowModified() const;
@@ -240,8 +246,7 @@ private slots:
void slotSelectAll() const;
protected:
- // void dragEnterEvent(QDragEnterEvent *event);
- // void dropEvent(QDropEvent* event);
+
/****************************************************************************************
* Name: saveFile
* Description: Saves the content of currentTab to the file filename