1 | // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. |
---|---|
2 | // |
3 | // SPDX-License-Identifier: GPL-3.0-or-later |
4 | |
5 | #ifndef PLUGINMETAOBJECT_P_H |
6 | #define PLUGINMETAOBJECT_P_H |
7 | |
8 | #include "framework/framework_global.h" |
9 | #include "framework/lifecycle/pluginmetaobject.h" |
10 | |
11 | #include <QString> |
12 | #include <QStringList> |
13 | #include <QSharedPointer> |
14 | |
15 | DPF_BEGIN_NAMESPACE |
16 | |
17 | /// @brief PLUGIN_NAME 插件名称Key |
18 | const char PLUGIN_NAME[] = "Name"; |
19 | /// @brief PLUGIN_VERSION 插件版本Key |
20 | const char PLUGIN_VERSION[] = "Version"; |
21 | /// @brief PLUGIN_VERSION 插件兼容版本Key |
22 | const char PLUGIN_COMPATVERSION[] = "CompatVersion"; |
23 | /// @brief PLUGIN_VERSION 插件类型Key |
24 | const char PLUGIN_CATEGORY[] = "Category"; |
25 | /// @nrief PLUGIN_VENDOR 插件作者 |
26 | const char PLUGIN_VENDOR[] = "Vendor"; |
27 | /// @nrief PLUGIN_VENDOR 插件所持有的公司 |
28 | const char PLUGIN_COPYRIGHT[] = "Copyright"; |
29 | /// @nrief PLUGIN_VENDOR 插件描述 |
30 | const char PLUGIN_DESCRIPTION[] = "Description"; |
31 | /// @nrief PLUGIN_VENDOR 插件开源协议 |
32 | const char PLUGIN_LICENSE[] = "License"; |
33 | /// @nrief PLUGIN_VENDOR 插件主页链接地址 |
34 | const char PLUGIN_URLLINK[] = "UrlLink"; |
35 | /// @nrief PLUGIN_VENDOR 插件依赖 |
36 | const char PLUGIN_DEPENDS[] = "Depends"; |
37 | |
38 | class PluginMetaObject; |
39 | class PluginMetaObjectPrivate |
40 | { |
41 | friend class PluginManager; |
42 | friend class PluginManagerPrivate; |
43 | friend class PluginMetaObject; |
44 | PluginMetaObject const *q; |
45 | public: |
46 | QString iid; |
47 | QString name; |
48 | QString version; |
49 | QString compatVersion; |
50 | QString vendor; |
51 | QString copyright; |
52 | QStringList license; |
53 | QString description; |
54 | QString urlLink; |
55 | QString category; |
56 | QString error; |
57 | PluginMetaObject::State state; |
58 | QList<PluginDepend> depends; |
59 | QSharedPointer<Plugin> plugin; |
60 | QSharedPointer<QPluginLoader> loader; |
61 | QSharedPointer<PluginContext> context; |
62 | bool enabledBySettings = true; |
63 | bool disabledBySettings = false; |
64 | |
65 | explicit PluginMetaObjectPrivate(PluginMetaObject * q) |
66 | : q(q) |
67 | , loader(new QPluginLoader(nullptr)) |
68 | { |
69 | |
70 | } |
71 | }; |
72 | |
73 | DPF_END_NAMESPACE |
74 | |
75 | #endif // PLUGINMETAOBJECT_P_H |
76 |