diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/MainWindow.h | 10 | ||||
-rw-r--r-- | include/ui/FindWidget.h | 2 | ||||
-rw-r--r-- | include/ui/VerifyDetailsDialog.h | 2 | ||||
-rw-r--r-- | include/ui/widgets/Attachments.h (renamed from include/ui/Attachments.h) | 2 | ||||
-rw-r--r-- | include/ui/widgets/EditorPage.h (renamed from include/ui/EditorPage.h) | 0 | ||||
-rw-r--r-- | include/ui/widgets/FilePage.h | 56 | ||||
-rw-r--r-- | include/ui/widgets/HelpPage.h (renamed from include/ui/HelpPage.h) | 0 | ||||
-rw-r--r-- | include/ui/widgets/InfoBoardWidget.h | 2 | ||||
-rw-r--r-- | include/ui/widgets/TextEdit.h (renamed from include/ui/TextEdit.h) | 25 |
9 files changed, 83 insertions, 16 deletions
diff --git a/include/MainWindow.h b/include/MainWindow.h index 95a10210..c5937e0d 100644 --- a/include/MainWindow.h +++ b/include/MainWindow.h @@ -26,9 +26,9 @@ #define __GPGWIN_H__ #include "gpg/GpgConstants.h" -#include "ui/Attachments.h" +#include "ui/widgets/Attachments.h" #include "ui/KeyMgmt.h" -#include "ui/TextEdit.h" +#include "ui/widgets/TextEdit.h" #include "ui/FileEncryptionDialog.h" #include "ui/SettingsDialog.h" #include "ui/AboutDialog.h" @@ -176,6 +176,11 @@ private slots: void slotFileVerify(); /** + * @details Open File Opera Tab + */ + void slotOpenFileTab(); + + /** * @details Open settings-dialog. */ void slotOpenSettingsDialog(); @@ -339,6 +344,7 @@ private: GpgME::GpgContext *mCtx; /**< TODO */ KeyMgmt *keyMgmt; /**< TODO */ KeyServerImportDialog *importDialog; /**< TODO */ + bool attachmentDockCreated; bool restartNeeded; }; diff --git a/include/ui/FindWidget.h b/include/ui/FindWidget.h index 2e9c67b0..1142b649 100644 --- a/include/ui/FindWidget.h +++ b/include/ui/FindWidget.h @@ -25,7 +25,7 @@ #ifndef FINDWIDGET_H #define FINDWIDGET_H -#include "EditorPage.h" +#include "ui/widgets/EditorPage.h" /** * @brief Class for handling the find widget shown at buttom of a textedit-page diff --git a/include/ui/VerifyDetailsDialog.h b/include/ui/VerifyDetailsDialog.h index a1f28e5d..ece2f1e7 100644 --- a/include/ui/VerifyDetailsDialog.h +++ b/include/ui/VerifyDetailsDialog.h @@ -25,7 +25,7 @@ #ifndef __VERIFYDETAILSDIALOG_H__ #define __VERIFYDETAILSDIALOG_H__ -#include "ui/EditorPage.h" +#include "ui/widgets/EditorPage.h" #include "ui/widgets/VerifyKeyDetailBox.h" class VerifyDetailsDialog : public QDialog { diff --git a/include/ui/Attachments.h b/include/ui/widgets/Attachments.h index 19b6ef37..00433028 100644 --- a/include/ui/Attachments.h +++ b/include/ui/widgets/Attachments.h @@ -25,7 +25,7 @@ #ifndef __ATTACHMENTS_H__ #define __ATTACHMENTS_H__ -#include "AttachmentTableModel.h" +#include "ui/AttachmentTableModel.h" class Attachments : public QWidget { Q_OBJECT diff --git a/include/ui/EditorPage.h b/include/ui/widgets/EditorPage.h index a06d6cd6..a06d6cd6 100644 --- a/include/ui/EditorPage.h +++ b/include/ui/widgets/EditorPage.h diff --git a/include/ui/widgets/FilePage.h b/include/ui/widgets/FilePage.h new file mode 100644 index 00000000..6585bed9 --- /dev/null +++ b/include/ui/widgets/FilePage.h @@ -0,0 +1,56 @@ +/** + * 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. + * + * Foobar 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 Foobar. If not, see <https://www.gnu.org/licenses/>. + * + * The initial version of the source code is inherited from gpg4usb-team. + * Their source code version also complies with GNU General Public License. + * + * The source code version of this software was modified and released + * by Saturneric<[email protected]> starting on May 12, 2021. + * + */ + +#ifndef GPGFRONTEND_FILEPAGE_H +#define GPGFRONTEND_FILEPAGE_H + +#include <GpgFrontend.h> + +class FilePage : public QWidget { +Q_OBJECT +public: + + explicit FilePage(QWidget* parent = nullptr); + + void getSelected(QString &path); + + +private slots: + + void fileTreeViewItemClicked(const QModelIndex &index); + void fileTreeViewItemDoubleClicked(const QModelIndex &index); + + void slotUpLevel(); + +private: + QFileSystemModel *dirModel; + QTreeView *dirTreeView; + QString mPath; + + QPushButton *upLevelButton; + +}; + + +#endif //GPGFRONTEND_FILEPAGE_H diff --git a/include/ui/HelpPage.h b/include/ui/widgets/HelpPage.h index 0b5e4ca3..0b5e4ca3 100644 --- a/include/ui/HelpPage.h +++ b/include/ui/widgets/HelpPage.h diff --git a/include/ui/widgets/InfoBoardWidget.h b/include/ui/widgets/InfoBoardWidget.h index 88c7cb04..9d3dbd16 100644 --- a/include/ui/widgets/InfoBoardWidget.h +++ b/include/ui/widgets/InfoBoardWidget.h @@ -25,7 +25,7 @@ #ifndef __VERIFYNOTIFICATION_H__ #define __VERIFYNOTIFICATION_H__ -#include "ui/EditorPage.h" +#include "EditorPage.h" #include "ui/VerifyDetailsDialog.h" #include "gpg/result_analyse/VerifyResultAnalyse.h" 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 |