MauiKit Controls

controls.cpp
1#include "controls.h"
2
3Controls::Controls(QObject *parent)
4 : QObject{parent}
5{
6
7}
8
9Controls *Controls::qmlAttachedProperties(QObject *object)
10{
11 Q_UNUSED(object)
12
13 return new Controls(object);
14}
15
16bool Controls::showCSD() const
17{
18 return m_showCSD;
19}
20
21void Controls::setShowCSD(bool newShowCSD)
22{
23 if (m_showCSD == newShowCSD)
24 return;
25 m_showCSD = newShowCSD;
26 Q_EMIT showCSDChanged();
27}
28
30{
31 return m_title;
32}
33
34void Controls::setTitle(const QString &title)
35{
36 if (m_title == title)
37 return;
38 m_title = title;
39 Q_EMIT titleChanged();
40}
41
43{
44 return m_iconName;
45}
46
47void Controls::setIconName(const QString &newIconName)
48{
49 if (m_iconName == newIconName)
50 return;
51 m_iconName = newIconName;
52 Q_EMIT iconNameChanged();
53}
54
56{
57 return m_badgeText;
58}
59
60void Controls::setBadgeText(const QString &newBadgeText)
61{
62 if (m_badgeText == newBadgeText)
63 return;
64 m_badgeText = newBadgeText;
65 Q_EMIT badgeTextChanged();
66}
67
69{
70 return m_toolTipText;
71}
72
73void Controls::setToolTipText(const QString &newToolTipText)
74{
75 if (m_toolTipText == newToolTipText)
76 return;
77 m_toolTipText = newToolTipText;
78 Q_EMIT toolTipTextChanged();
79}
80
82{
83 return m_color;
84}
85
86void Controls::setColor(const QString &newColor)
87{
88 if (m_color == newColor)
89 return;
90 m_color = newColor;
91 Q_EMIT colorChanged();
92}
93
94
96{
97 return m_level;
98}
99
100void Controls::setLevel(Controls::Level level)
101{
102 if(m_level == level)
103 return;
104
105 m_level = level;
106 Q_EMIT levelChanged();
107}
The Controls class.
Definition controls.h:14
QString toolTipText
The text to be shown in the tool-tip when hovering over the tab button representing the view.
Definition controls.h:45
QML_ELEMENTQString title
A title text that can be attached to any control.
Definition controls.h:23
QString iconName
The icon name to be used in the AppViews button port.
Definition controls.h:28
QString badgeText
The text to be used as a badge for notification purposes.
Definition controls.h:35
Level
A property hint for UI elements to be styled as a flat surface, for example, without a background.
Definition controls.h:67
QString color
The color to be used as an indicator in the tab button representing the view.
Definition controls.h:40
bool showCSD
Whether a supported MauiKit controls should display the window control buttons when using CSD.
Definition controls.h:50
Level level
Set a UI element hierarchy level.
Definition controls.h:56
Q_EMITQ_EMIT
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 26 2024 11:50:53 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.