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 #include "ui/GpgFrontendUI.h"
33 #include "ui/widgets/InfoBoardWidget.h"
34
35 class Ui_FilePage;
36
37 namespace GpgFrontend::UI {
38
43 class FilePage : public QWidget {
44 Q_OBJECT
45 public:
51 explicit FilePage(QWidget* parent = nullptr);
52
58 [[nodiscard]] QString GetSelected() const;
59
60 public slots:
65 void SlotGoPath();
66
67 signals:
68
74 void SignalPathChanged(const QString& path);
75
82 void SignalRefreshInfoBoard(const QString& text,
83 InfoBoardStatus verify_label_status);
84
85 private slots:
86
92 void slot_file_tree_view_item_clicked(const QModelIndex& index);
93
99 void slot_file_tree_view_item_double_clicked(const QModelIndex& index);
100
105 void slot_up_level();
106
111 void slot_open_item();
112
117 void slot_rename_item();
118
123 void slot_delete_item();
124
129 void slot_calculate_hash();
130
135 void slot_mkdir();
136
141 void slot_create_empty_file();
142
147 void slot_compress_files();
148
149 protected:
155 void keyPressEvent(QKeyEvent* event) override;
156
162 void onCustomContextMenu(const QPoint& point);
163
164 private:
169 void create_popup_menu();
170
171 std::shared_ptr<Ui_FilePage> ui_;
172
173 QFileSystemModel* dir_model_;
174 QCompleter* path_edit_completer_;
175 QStringListModel* path_complete_model_;
176
177 std::filesystem::path m_path_;
178 std::filesystem::path selected_path_;
179
180 QMenu* popup_menu_{};
181 QMenu* option_popup_menu_{};
182 QWidget* first_parent_{};
183 };
184
185 } // namespace GpgFrontend::UI
186
187 #endif // GPGFRONTEND_FILEPAGE_H
GpgFrontend::UI::FilePage
Definition: FilePage.h:43
GpgFrontend::UI::FilePage::slot_compress_files
void slot_compress_files()
compress directory into gpg-zip
Definition: FilePage.cpp:457
GpgFrontend::UI::FilePage::SignalRefreshInfoBoard
void SignalRefreshInfoBoard(const QString &text, InfoBoardStatus verify_label_status)
GpgFrontend::UI::FilePage::GetSelected
QString GetSelected() const
Get the Selected object.
Definition: FilePage.cpp:187
GpgFrontend::UI::FilePage::FilePage
FilePage(QWidget *parent=nullptr)
Construct a new File Page object.
Definition: FilePage.cpp:41
GpgFrontend::UI::FilePage::slot_file_tree_view_item_clicked
void slot_file_tree_view_item_clicked(const QModelIndex &index)
Definition: FilePage.cpp:101
GpgFrontend::UI::FilePage::create_popup_menu
void create_popup_menu()
Create a popup menu object.
Definition: FilePage.cpp:222
GpgFrontend::UI::FilePage::onCustomContextMenu
void onCustomContextMenu(const QPoint &point)
Definition: FilePage.cpp:292
GpgFrontend::UI::FilePage::slot_file_tree_view_item_double_clicked
void slot_file_tree_view_item_double_clicked(const QModelIndex &index)
Definition: FilePage.cpp:176
GpgFrontend::UI::FilePage::keyPressEvent
void keyPressEvent(QKeyEvent *event) override
Definition: FilePage.cpp:443
GpgFrontend::UI::FilePage::SignalPathChanged
void SignalPathChanged(const QString &path)
GpgFrontend::UI
Definition: FileReadTask.cpp:29
GpgFrontend::UI::InfoBoardStatus
InfoBoardStatus
Definition: InfoBoardWidget.h:43