FilePage.h
#ifndef GPGFRONTEND_FILEPAGE_H
#define GPGFRONTEND_FILEPAGE_H
#include "ui/GpgFrontendUI.h"
#include "ui/widgets/InfoBoardWidget.h"
class Ui_FilePage;
namespace GpgFrontend::UI {
class FilePage : public QWidget {
Q_OBJECT
public:
explicit FilePage(QWidget* parent = nullptr);
[[nodiscard]] QString GetSelected() const;
public slots:
void SlotGoPath();
signals:
void SignalPathChanged(const QString& path);
void SignalRefreshInfoBoard(const QString& text,
InfoBoardStatus verify_label_status);
private slots:
void slot_file_tree_view_item_clicked(const QModelIndex& index);
void slot_file_tree_view_item_double_clicked(const QModelIndex& index);
void slot_up_level();
void slot_open_item();
void slot_rename_item();
void slot_delete_item();
void slot_calculate_hash();
void slot_mkdir();
void slot_create_empty_file();
void slot_compress_files();
protected:
void keyPressEvent(QKeyEvent* event) override;
void onCustomContextMenu(const QPoint& point);
private:
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_{};
};
} // namespace GpgFrontend::UI
#endif // GPGFRONTEND_FILEPAGE_H
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::slot_file_tree_view_item_clicked
void slot_file_tree_view_item_clicked(const QModelIndex &index)
Definition: FilePage.cpp:101
GpgFrontend::UI
Definition: FileReadTask.cpp:31
GpgFrontend::UI::FilePage::SignalPathChanged
void SignalPathChanged(const QString &path)
GpgFrontend::UI::FilePage::onCustomContextMenu
void onCustomContextMenu(const QPoint &point)
Definition: FilePage.cpp:292
GpgFrontend::FileOperator::CalculateHash
static std::string CalculateHash(const std::filesystem::path &file_path)
Definition: FileOperator.cpp:75
GpgFrontend::UI::FilePage::keyPressEvent
void keyPressEvent(QKeyEvent *event) override
Definition: FilePage.cpp:443
GpgFrontend::UI::FilePage
Definition: FilePage.h:43
GpgFrontend::UI::InfoBoardStatus
InfoBoardStatus
Definition: InfoBoardWidget.h:43
GpgFrontend::UI::FilePage::slot_compress_files
void slot_compress_files()
compress directory into gpg-zip
Definition: FilePage.cpp:457
GpgFrontend::UI::SignalStation::SignalRefreshInfoBoard
void SignalRefreshInfoBoard(const QString &text, InfoBoardStatus verify_label_status)
GpgFrontend::UI::FilePage::FilePage
FilePage(QWidget *parent=nullptr)
Construct a new File Page object.
Definition: FilePage.cpp:41
GpgFrontend::UI::FilePage::GetSelected
QString GetSelected() const
Get the Selected object.
Definition: FilePage.cpp:187
GpgFrontend::UI::SignalStation::GetInstance
static SignalStation * GetInstance()
Get the Instance object.
Definition: SignalStation.cpp:37
GpgFrontend::UI::FilePage::SignalRefreshInfoBoard
void SignalRefreshInfoBoard(const QString &text, InfoBoardStatus verify_label_status)
GpgFrontend::UI::FilePage::create_popup_menu
void create_popup_menu()
Create a popup menu object.
Definition: FilePage.cpp:222