diff options
author | saturneric <[email protected]> | 2024-01-01 09:15:25 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-01-01 09:15:25 +0000 |
commit | 1cdba285be9bebd9b793fc6ae0369d201a0e713b (patch) | |
tree | 6f38e86b19044ba9ecbe9a520e150dd49cb992a8 /src/ui/widgets/FilePage.h | |
parent | feat: fully test basical operations of archive and file (diff) | |
download | GpgFrontend-1cdba285be9bebd9b793fc6ae0369d201a0e713b.tar.gz GpgFrontend-1cdba285be9bebd9b793fc6ae0369d201a0e713b.zip |
feat: improve file browser's functions and tidy up codes
Diffstat (limited to 'src/ui/widgets/FilePage.h')
-rw-r--r-- | src/ui/widgets/FilePage.h | 92 |
1 files changed, 3 insertions, 89 deletions
diff --git a/src/ui/widgets/FilePage.h b/src/ui/widgets/FilePage.h index 634c31db..c1c9dc39 100644 --- a/src/ui/widgets/FilePage.h +++ b/src/ui/widgets/FilePage.h @@ -29,6 +29,7 @@ #pragma once #include "ui/GpgFrontendUI.h" +#include "ui/widgets/FileTreeView.h" #include "ui/widgets/InfoBoardWidget.h" class Ui_FilePage; @@ -54,7 +55,7 @@ class FilePage : public QWidget { * * @return QString */ - [[nodiscard]] QString GetSelected() const; + [[nodiscard]] auto GetSelected() const -> QString; public slots: /** @@ -81,76 +82,6 @@ class FilePage : public QWidget { void SignalRefreshInfoBoard(const QString& text, InfoBoardStatus verify_label_status); - private slots: - - /** - * @brief - * - * @param index - */ - void slot_file_tree_view_item_clicked(const QModelIndex& index); - - /** - * @brief - * - * @param index - */ - void slot_file_tree_view_item_double_clicked(const QModelIndex& index); - - /** - * @brief - * - */ - void slot_up_level(); - - /** - * @brief - * - */ - void slot_open_item(); - - /** - * @brief - * - */ - void slot_open_item_by_system_application(); - - /** - * @brief - * - */ - void slot_rename_item(); - - /** - * @brief - * - */ - void slot_delete_item(); - - /** - * @brief - * - */ - void slot_calculate_hash(); - - /** - * @brief - * - */ - void slot_mkdir(); - - /** - * @brief - * - */ - void slot_create_empty_file(); - - /** - * @brief compress directory into gpg-zip - * - */ - void slot_compress_files(); - protected: /** * @brief @@ -159,32 +90,15 @@ class FilePage : public QWidget { */ void keyPressEvent(QKeyEvent* event) override; - /** - * @brief - * - * @param point - */ - void onCustomContextMenu(const QPoint& point); - private: - /** - * @brief Create a popup menu object - * - */ - void create_popup_menu(); - std::shared_ptr<Ui_FilePage> ui_; ///< - QFileSystemModel* dir_model_; ///< QCompleter* path_edit_completer_; ///< QStringListModel* path_complete_model_; ///< - std::filesystem::path m_path_; ///< - std::filesystem::path selected_path_; ///< - QMenu* popup_menu_{}; ///< QMenu* option_popup_menu_{}; ///< - QWidget* first_parent_{}; ///< + FileTreeView* file_tree_view_; }; } // namespace GpgFrontend::UI |