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_open_item_by_system_application();
118
123 void slot_rename_item();
124
129 void slot_delete_item();
130
135 void slot_calculate_hash();
136
141 void slot_mkdir();
142
147 void slot_create_empty_file();
148
153 void slot_compress_files();
154
155 protected:
161 void keyPressEvent(QKeyEvent* event) override;
162
168 void onCustomContextMenu(const QPoint& point);
169
170 private:
175 void create_popup_menu();
176
177 std::shared_ptr<Ui_FilePage> ui_;
178
179 QFileSystemModel* dir_model_;
180 QCompleter* path_edit_completer_;
181 QStringListModel* path_complete_model_;
182
183 std::filesystem::path m_path_;
184 std::filesystem::path selected_path_;
185
186 QMenu* popup_menu_{};
187 QMenu* option_popup_menu_{};
188 QWidget* first_parent_{};
189 };
190
191 } // namespace GpgFrontend::UI
192
193 #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:478
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:301
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:464
GpgFrontend::UI::FilePage::SignalPathChanged
void SignalPathChanged(const QString &path)
GpgFrontend::UI
Definition: FileReadTask.cpp:29
GpgFrontend::UI::InfoBoardStatus
InfoBoardStatus
Definition: InfoBoardWidget.h:43