dde-control-center
Deepin Control Center
载入中...
搜索中...
未找到
vlistmodule.h
1// SPDX-FileCopyrightText: 2018 - 2023 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4#ifndef VLISTMODULE_H
5#define VLISTMODULE_H
6#include "interface/moduleobject.h"
7
8namespace DCC_NAMESPACE {
9class VListModulePrivate;
10
12{
13 Q_OBJECT
14public:
15 explicit VListModule(QObject *parent = nullptr);
16 explicit VListModule(const QString &name,
17 const QString &displayName = {},
18 QObject *parent = nullptr);
19 explicit VListModule(const QString &name,
20 const QStringList &contentText,
21 QObject *parent = nullptr);
22 explicit VListModule(const QString &name,
23 const QString &displayName,
24 const QStringList &contentText,
25 QObject *parent = nullptr);
26 explicit VListModule(const QString &name,
27 const QString &displayName,
28 const QVariant &icon,
29 QObject *parent = nullptr);
30 explicit VListModule(const QString &name,
31 const QString &displayName,
32 const QString &description,
33 QObject *parent = nullptr);
34 explicit VListModule(const QString &name,
35 const QString &displayName,
36 const QString &description,
37 const QVariant &icon,
38 QObject *parent = nullptr);
39 explicit VListModule(const QString &name,
40 const QString &displayName,
41 const QString &description,
42 const QIcon &icon,
43 QObject *parent = nullptr);
44 explicit VListModule(const QString &name,
45 const QString &displayName,
46 const QString &description,
47 const QStringList &contentText,
48 const QVariant &icon,
49 QObject *parent = nullptr);
50 explicit VListModule(const ModuleInitContext &message, QObject *parent = nullptr);
51
52 ~VListModule() override;
53
54 QWidget *page() override;
55
56 inline DCC_MODULE_TYPE getClassID() const override { return VLISTLAYOUT; }
57
58 DCC_DECLARE_PRIVATE(VListModule)
59};
60} // namespace DCC_NAMESPACE
61#endif // VLISTMODULE_H
ModuleObject作为规范每个Module的接口,每个Module必须提供其基本的信息
Definition moduleobject.h:66
Definition vlistmodule.h:12
QWidget * page() override
每次被调均需new新的QWidget
ModuleInitContext 作为初始化传入的结构体,其中name和displayName 必须有数值 这个结构体保存了所有初始化的信息
Definition moduleobject.h:54