Debian Codegraph @

kysdk-qtwidgets/src/kuninstalldialog.h

raw
1 /*
2 * libkysdk-qtwidgets's Library
3 *
4 * Copyright (C) 2023, KylinSoft Co., Ltd.
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 3 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this library. If not, see <https://www.gnu.org/licenses/>.
18 *
19 * Authors: Zhen Sun <[email protected]>
20 *
21 */
22
23 #ifndef KUNINSTALLDIALOG_H
24 #define KUNINSTALLDIALOG_H
25
26 #include "gui_g.h"
27 #include "kdialog.h"
28 #include "themeController.h"
29 #include <QDialog>
30 #include <QLabel>
31 #include <QLayout>
32 #include <QPushButton>
33 #include <QWidget>
34
35 namespace kdk
36 {
37
38 /** @defgroup DialogBoxModule
39 * @{
40 */
41
42 static const QByteArray ORG_UKUI_STYLE_FONT = "org.ukui.style";
43 static const QByteArray GSETTING_FONT_KEY = "systemFontSize";
44
45 class KUninstallDialogPrivate;
46
47 /**
48 * @brief 卸载对话框,当用户卸载时可能会弹出此提示对话框
49 * @since 1.0.0
50 */
51 class GUI_EXPORT KUninstallDialog : public KDialog
52 {
53 Q_OBJECT
54
55 public:
56 KUninstallDialog(QString appName, QString appVersion, QWidget *parent = nullptr);
57 ~KUninstallDialog();
58
59 /**
60 * @brief debAppNameLabel
61 * @return
62 */
63 QLabel *debAppNameLabel();
64
65 /**
66 * @brief 包名Label
67 * @return
68 */
69 QLabel *debNameLabel();
70
71 /**
72 * @brief 包IconLabel
73 * @return
74 */
75 QLabel *debIconLabel();
76
77 /**
78 * @brief 包版本Label
79 * @return
80 */
81 QLabel *debVersionLabel();
82
83 /**
84 * @brief 卸载按钮
85 * @return
86 */
87 QPushButton *uninstallButtton();
88
89 protected:
90 void changeTheme();
91
92 private:
93 Q_DECLARE_PRIVATE(KUninstallDialog)
94 KUninstallDialogPrivate *const d_ptr;
95 };
96 }
97 /**
98 * @example testDialog/widget.h
99 * @example testDialog/widget.cpp
100 * @}
101 */
102 #endif // KUNINSTALLDIALOG_H