1 | // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. |
---|---|
2 | // |
3 | // SPDX-License-Identifier: GPL-3.0-or-later |
4 | |
5 | #ifndef PLUGINVIEW_H |
6 | #define PLUGINVIEW_H |
7 | |
8 | #include "framework/framework_global.h" |
9 | #include "framework/lifecycle/pluginmetaobject.h" |
10 | |
11 | #include <QWidget> |
12 | |
13 | class QTreeWidget; |
14 | class QStandardItemModel; |
15 | |
16 | DPF_BEGIN_NAMESPACE |
17 | |
18 | class PluginItem; |
19 | class CollectionItem; |
20 | |
21 | class PluginView : public QWidget |
22 | { |
23 | Q_OBJECT |
24 | public: |
25 | explicit PluginView(QWidget *parent = nullptr); |
26 | |
27 | PluginMetaObjectPointer currentPlugin() const; |
28 | |
29 | signals: |
30 | void currentPluginActived(); |
31 | void pluginSettingChanged(PluginMetaObjectPointer plugin); |
32 | |
33 | private: |
34 | void updatePluginsWidegt(); |
35 | void setPluginEnabled(PluginMetaObjectPointer plugin, bool enable); |
36 | |
37 | QTreeWidget *categoryWidegt = nullptr; |
38 | |
39 | friend class PluginItem; |
40 | friend class CollectionItem; |
41 | }; |
42 | |
43 | DPF_END_NAMESPACE |
44 | |
45 | #endif // PLUGINVIEW_H |
46 |