DtkWidget
DTK Widget module
载入中...
搜索中...
未找到
daboutdialog.h
浏览该文件的文档.
1// SPDX-FileCopyrightText: 2017 - 2022 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#ifndef DABOUTDIALOG_H
6#define DABOUTDIALOG_H
7
8#include <DDialog>
9
10DWIDGET_BEGIN_NAMESPACE
11
12class DAboutDialogPrivate;
13class DAboutDialog : public DDialog
14{
15 Q_OBJECT
16
17 Q_PROPERTY(QString windowTitle READ windowTitle WRITE setWindowTitle)
18 Q_PROPERTY(QString productName READ productName WRITE setProductName)
19 Q_PROPERTY(QString version READ version WRITE setVersion)
20 Q_PROPERTY(QString description READ description WRITE setDescription)
21 Q_PROPERTY(QString license READ license WRITE setLicense)
22 Q_PROPERTY(QString websiteName READ websiteName WRITE setWebsiteName)
23 Q_PROPERTY(QString websiteLink READ websiteLink WRITE setWebsiteLink)
24#if DTK_VERSION < DTK_VERSION_CHECK(6, 0, 0, 0)
25 Q_PROPERTY(QString acknowledgementLink READ acknowledgementLink WRITE setAcknowledgementLink)
26#endif
27
28public:
29 DAboutDialog(QWidget *parent = 0);
30
31 QString windowTitle() const;
32 QString productName() const;
33 QString version() const;
34 QString description() const;
35#if DTK_VERSION < DTK_VERSION_CHECK(6, 0, 0, 0)
36 D_DECL_DEPRECATED_X("this method will be deprecated after dtk6") const QPixmap *companyLogo() const;
37#else
38 QPixmap companyLogo() const;
39#endif
40 QString websiteName() const;
41 QString websiteLink() const;
42#if DTK_VERSION < DTK_VERSION_CHECK(6, 0, 0, 0)
43 D_DECL_DEPRECATED_X("acknowledgement is no longer used") QString acknowledgementLink() const;
44#endif
45 QString license() const;
46 void setLicenseEnabled(bool enabled);
47
48Q_SIGNALS:
49 void featureActivated();
50 void licenseActivated();
51
52public Q_SLOTS:
53 void setWindowTitle(const QString &windowTitle);
54 void setProductIcon(const QIcon &icon);
55 void setProductName(const QString &productName);
56 void setVersion(const QString &version);
57 void setDescription(const QString &description);
58 void setCompanyLogo(const QPixmap &companyLogo);
59 void setWebsiteName(const QString &websiteName);
60 void setWebsiteLink(const QString &websiteLink);
61#if DTK_VERSION < DTK_VERSION_CHECK(6, 0, 0, 0)
62 D_DECL_DEPRECATED_X("acknowledgement is no longer used") void setAcknowledgementLink(const QString &acknowledgementLink);
63#endif
64 void setAcknowledgementVisible(bool visible);
65 void setLicense(const QString &license);
66
67protected:
68 void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
69 void showEvent(QShowEvent *event) Q_DECL_OVERRIDE;
70
71private:
72 Q_PRIVATE_SLOT(d_func(), void _q_onLinkActivated(const QString &link))
73 Q_PRIVATE_SLOT(d_func(), void _q_onFeatureActivated(const QString &link))
74 Q_PRIVATE_SLOT(d_func(), void _q_onLicenseActivated(const QString &link))
75
76 Q_DISABLE_COPY(DAboutDialog)
77 D_DECLARE_PRIVATE(DAboutDialog)
78};
79
80DWIDGET_END_NAMESPACE
81
82#endif // DABOUTDIALOG_H
DAboutDialog 类提供了应用程序的关于对话框, 规范所有 deepin 应用关于窗口设计规范, 符合 deepin 风格
Definition daboutdialog.h:14
DDialog 旨在提供简要的讯问式对话框的快速实现。提供了包含标题,对话框内容,默认图标,用以添加按钮的布局和一个可以自由添加内容的内容布局。
Definition ddialog.h:22