1// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#ifndef PLUGINDEPEND_H
6#define PLUGINDEPEND_H
7
8#include "framework/framework_global.h"
9
10#include <QString>
11
12DPF_BEGIN_NAMESPACE
13
14/**
15 * @brief The PluginDepend class
16 * 插件依赖项类
17 */
18class PluginDepend final
19{
20 friend class PluginManager;
21 friend class PluginManagerPrivate;
22 friend class PluginMetaObject;
23 friend Q_CORE_EXPORT QDebug operator<< (QDebug, const PluginDepend &);
24
25 QString pluginName;
26 QString pluginVersion;
27
28public:
29 PluginDepend(const PluginDepend &depend);
30 PluginDepend& operator = (const PluginDepend &depend);
31 QString name() const {return pluginName;}
32 QString version() const {return pluginVersion;}
33 QString toString() const {return pluginName + " (" + pluginVersion + ")";}
34
35private:
36 PluginDepend();
37};
38
39QT_BEGIN_NAMESPACE
40#ifndef QT_NO_DEBUG_STREAM
41Q_CORE_EXPORT QDebug operator<< (QDebug, const DPF_NAMESPACE::PluginDepend &);
42#endif //QT_NO_DEBUG_STREAM
43QT_END_NAMESPACE
44
45DPF_END_NAMESPACE
46
47#endif // PLUGINDEPEND_H
48