DtkWidget
DTK Widget module
载入中...
搜索中...
未找到
dfeaturedisplaydialog.h
浏览该文件的文档.
1// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#ifndef DFEATUREDISPLAYDIALOG_H
6#define DFEATUREDISPLAYDIALOG_H
7
8#include <DDialog>
9
10class QLabel;
11DWIDGET_BEGIN_NAMESPACE
12
13class DFeatureItemPrivate;
14class DFeatureItem :public QObject, public DTK_CORE_NAMESPACE::DObject
15{
16 Q_OBJECT
17public:
18 explicit DFeatureItem(const QIcon &icon = QIcon(), const QString &name = QString(),
19 const QString &description = QString(), QObject *parent = nullptr);
20 ~DFeatureItem() override;
21
22 QIcon icon() const;
23 void setIcon(const QIcon &icon);
24
25 QString name() const;
26 void setName(const QString &name);
27
28 QString description() const;
29 void setDescription(const QString &description);
30
31private:
32 D_DECLARE_PRIVATE(DFeatureItem)
33};
34
37{
38 Q_OBJECT
39public:
40 explicit DFeatureDisplayDialog(QWidget *parent = nullptr);
41 ~DFeatureDisplayDialog() override;
42
43 void setTitle(const QString &title);
44 void addItem(DFeatureItem *item);
45 void removeItem(DFeatureItem* item);
46 void addItems(QList<DFeatureItem*> items);
47 void clearItems();
48 void setLinkButtonVisible(bool isVisible);
49 void setLinkUrl(const QString &url);
50 void show();
51 bool isEmpty() const;
52
53private:
54 D_DECLARE_PRIVATE(DFeatureDisplayDialog)
55 D_PRIVATE_SLOT(void _q_toggleLinkBtn())
56
57};
58
59DWIDGET_END_NAMESPACE
60
61#endif // DFEATUREDISPLAYDIALOG_H
DDialog 旨在提供简要的讯问式对话框的快速实现。提供了包含标题,对话框内容,默认图标,用以添加按钮的布局和一个可以自由添加内容的内容布局。
Definition ddialog.h:22
Definition dfeaturedisplaydialog_p.h:43
特性介绍对话框,展示应用更新的新特性
Definition dfeaturedisplaydialog.h:37
特性介绍中的每项特性
Definition dfeaturedisplaydialog.h:15