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
13class QTreeWidget;
14class QStandardItemModel;
15
16DPF_BEGIN_NAMESPACE
17
18class PluginItem;
19class CollectionItem;
20
21class PluginView : public QWidget
22{
23 Q_OBJECT
24public:
25 explicit PluginView(QWidget *parent = nullptr);
26
27 PluginMetaObjectPointer currentPlugin() const;
28
29signals:
30 void currentPluginActived();
31 void pluginSettingChanged(PluginMetaObjectPointer plugin);
32
33private:
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
43DPF_END_NAMESPACE
44
45#endif // PLUGINVIEW_H
46