diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/MainWindow.h | 2 | ||||
-rw-r--r-- | include/gpg/GpgFileOpera.h | 37 | ||||
-rw-r--r-- | include/ui/widgets/FilePage.h | 5 | ||||
-rw-r--r-- | include/ui/widgets/TextEdit.h | 10 |
4 files changed, 51 insertions, 3 deletions
diff --git a/include/MainWindow.h b/include/MainWindow.h index c5937e0d..efe56919 100644 --- a/include/MainWindow.h +++ b/include/MainWindow.h @@ -41,6 +41,8 @@ #include "gpg/result_analyse/EncryptResultAnalyse.h" #include "gpg/result_analyse/DecryptResultAnalyse.h" +#include "gpg/GpgFileOpera.h" + /** * @brief diff --git a/include/gpg/GpgFileOpera.h b/include/gpg/GpgFileOpera.h new file mode 100644 index 00000000..c6b4aec8 --- /dev/null +++ b/include/gpg/GpgFileOpera.h @@ -0,0 +1,37 @@ +/** + * 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_GPGFILEOPERA_H +#define GPGFRONTEND_GPGFILEOPERA_H + +#include "GpgFrontend.h" +#include "gpg/GpgContext.h" + +class GpgFileOpera { +public: + static bool encryptFile(GpgME::GpgContext *ctx, QVector<GpgKey> &keys, const QString &mPath); +}; + + +#endif //GPGFRONTEND_GPGFILEOPERA_H diff --git a/include/ui/widgets/FilePage.h b/include/ui/widgets/FilePage.h index 6585bed9..c343571d 100644 --- a/include/ui/widgets/FilePage.h +++ b/include/ui/widgets/FilePage.h @@ -33,7 +33,7 @@ public: explicit FilePage(QWidget* parent = nullptr); - void getSelected(QString &path); + QString getSelected() const; private slots: @@ -42,13 +42,16 @@ private slots: void fileTreeViewItemDoubleClicked(const QModelIndex &index); void slotUpLevel(); + void slotGoPath(); private: QFileSystemModel *dirModel; QTreeView *dirTreeView; + QLineEdit *pathEdit; QString mPath; QPushButton *upLevelButton; + QPushButton *goPathButton; }; diff --git a/include/ui/widgets/TextEdit.h b/include/ui/widgets/TextEdit.h index f98da145..99b8bcc7 100644 --- a/include/ui/widgets/TextEdit.h +++ b/include/ui/widgets/TextEdit.h @@ -82,10 +82,16 @@ public: public slots: /** - * @details Return pointer to the currently activated tabpage. + * @details Return pointer to the currently activated text edit tab page. * */ - [[nodiscard]] EditorPage *slotCurPage() const; + [[nodiscard]] EditorPage *slotCurPageTextEdit() const; + + /** + * @details Return pointer to the currently activated file treeview tab page. + * + */ + [[nodiscard]] FilePage *slotCurPageFileTreeView() const; /** * @details Insert a ">" at the begining of every line of current textedit. |