1 | // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. |
2 | // |
3 | // SPDX-License-Identifier: GPL-3.0-or-later |
4 | |
5 | #ifndef TREEVIEW_H |
6 | #define TREEVIEW_H |
7 | |
8 | #include <QTreeView> |
9 | #include "services/project/projectservice.h" |
10 | |
11 | class TreeViewPrivate; |
12 | class TreeView : public QTreeView |
13 | { |
14 | Q_OBJECT |
15 | TreeViewPrivate *const d; |
16 | public: |
17 | explicit TreeView(QWidget *parent = nullptr); |
18 | virtual ~TreeView(); |
19 | void setProjectInfo(const dpfservice::ProjectInfo &proInfo); |
20 | public slots: |
21 | void selOpen(); |
22 | void selMoveToTrash(); |
23 | void selRemove(); |
24 | void selNewDocument(); |
25 | void selNewFolder(); |
26 | void recoverFromTrash(); |
27 | void doDoubleClicked(const QModelIndex &index); |
28 | signals: |
29 | void rootPathChanged(const QString &folder); |
30 | protected: |
31 | void (QContextMenuEvent *event); |
32 | virtual QMenu *(const QModelIndexList &indexs); |
33 | virtual QMenu *(); |
34 | }; |
35 | |
36 | #endif // TREEVIEW_H |
37 | |