Debian Codegraph @

kysdk-qtwidgets/src/parmscontroller.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 PARMSCONTROLLER_H
24 #define PARMSCONTROLLER_H
25
26 #include <QObject>
27
28 class QDBusConnection;
29
30 namespace kdk
31 {
32 /**
33 * @brief The Parmscontroller class
34 * @since 2.0.2.1
35 */
36 class Parmscontroller : public QObject
37 {
38
39 Q_OBJECT
40
41 public:
42 enum Parm {
43 PM_TabBarHeight,
44 PM_PushButtonHeight,
45 PM_ToolButtonHeight,
46 PM_SearchLineEditHeight,
47 PM_PasswordEditHeight,
48 PM_NavigationBatHeight,
49 PM_TagHeight,
50 PM_SearchLineEditItemHeight,
51 PM_SliderHandleRadius,
52 PM_SliderNodeRadius,
53 PM_BadgeHeight,
54 PM_IconbarHeight,
55 PM_IconBarIconSize,
56 PM_WindowButtonBarSize,
57 PM_NavigationBatInterval,
58 // PM_NavigationBarWidth,
59 PM_Widget_SideWidget_Width,
60 PM_InputDialog_Height,
61 PM_InputDialog_Width,
62 PM_InputDialog_Label_Spacing,
63 PM_InputDialog_Widget_Spacing,
64 PM_InputDialog_Button_Spacing,
65 PM_InputDialog_Bottom_Spacing,
66 PM_InputDialog_Right_Spacing,
67 };
68 static Parmscontroller *self();
69 static bool isTabletMode();
70 static int parm(Parm p);
71
72 Q_SIGNALS:
73 void modeChanged(bool);
74
75 private:
76 explicit Parmscontroller(QObject *parent = nullptr);
77 ~Parmscontroller();
78 };
79 }
80 #endif // PARMSCONTROLLER_H