GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
FilePage.h
1
29#ifndef GPGFRONTEND_FILEPAGE_H
30#define GPGFRONTEND_FILEPAGE_H
31
32
33
34#include "ui/GpgFrontendUI.h"
35#include "ui/widgets/InfoBoardWidget.h"
36
37class Ui_FilePage;
38
39namespace GpgFrontend::UI {
40
45class FilePage : public QWidget {
46 Q_OBJECT
47 public:
53 explicit FilePage(QWidget* parent = nullptr);
54
60 [[nodiscard]] QString GetSelected() const;
61
62 public slots:
67 void SlotGoPath();
68
69 signals:
70
76 void SignalPathChanged(const QString& path);
77
84 void SignalRefreshInfoBoard(const QString& text,
85 InfoBoardStatus verify_label_status);
86
87 private slots:
88
94 void slot_file_tree_view_item_clicked(const QModelIndex& index);
95
101 void slot_file_tree_view_item_double_clicked(const QModelIndex& index);
102
107 void slot_up_level();
108
113 void slot_open_item();
114
119 void slot_rename_item();
120
125 void slot_delete_item();
126
131 void slot_calculate_hash();
132
137 void slot_mkdir();
138
143 void slot_create_empty_file();
144
149 void slot_compress_files();
150
151 protected:
157 void keyPressEvent(QKeyEvent* event) override;
158
164 void onCustomContextMenu(const QPoint& point);
165
166 private:
171 void create_popup_menu();
172
173 std::shared_ptr<Ui_FilePage> ui_;
174
175 QFileSystemModel* dir_model_;
176 QCompleter* path_edit_completer_;
177 QStringListModel* path_complete_model_;
178
179 std::filesystem::path m_path_;
180 std::filesystem::path selected_path_;
181
182 QMenu* popup_menu_{};
183 QMenu* option_popup_menu_{};
184 QWidget* first_parent_{};
185};
186
187} // namespace GpgFrontend::UI
188
189#endif // GPGFRONTEND_FILEPAGE_H
Definition: FilePage.h:45
void slot_compress_files()
compress directory into gpg-zip
Definition: FilePage.cpp:452
void SignalRefreshInfoBoard(const QString &text, InfoBoardStatus verify_label_status)
QString GetSelected() const
Get the Selected object.
Definition: FilePage.cpp:184
FilePage(QWidget *parent=nullptr)
Construct a new File Page object.
Definition: FilePage.cpp:41
void slot_file_tree_view_item_clicked(const QModelIndex &index)
Definition: FilePage.cpp:101
void create_popup_menu()
Create a popup menu object.
Definition: FilePage.cpp:219
void onCustomContextMenu(const QPoint &point)
Definition: FilePage.cpp:289
void slot_file_tree_view_item_double_clicked(const QModelIndex &index)
Definition: FilePage.cpp:173
void keyPressEvent(QKeyEvent *event) override
Definition: FilePage.cpp:438
void SignalPathChanged(const QString &path)
Definition: VerifyDetailsDialog.cpp:33
InfoBoardStatus
Definition: InfoBoardWidget.h:43