Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwaylandkeymap.cpp
Go to the documentation of this file.
1
// Copyright (C) 2017 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
#
include
"qwaylandkeymap.h"
6
#
include
"qwaylandkeymap_p.h"
7
8
QT_BEGIN_NAMESPACE
9
10
QWaylandKeymap::QWaylandKeymap(
const
QString &layout,
const
QString &variant,
const
QString &options,
const
QString &model,
const
QString &rules, QObject *parent)
11
: QObject(*
new
QWaylandKeymapPrivate(layout, variant, options, model, rules), parent)
12
{
13
}
14
15
/*!
16
* \qmlproperty string QtWayland.Compositor::WaylandKeymap::layout
17
*
18
* This property holds the layout name of the keyboard as defined in the XKB
19
* keymap.
20
*/
21
22
/*!
23
* \property QWaylandKeymap::layout
24
*
25
* This property holds the layout name of the keyboard as defined in the XKB
26
* keymap.
27
*/
28
QString QWaylandKeymap::layout()
const
{
29
Q_D(
const
QWaylandKeymap);
30
return
d->m_layout;
31
}
32
33
void
QWaylandKeymap::setLayout(
const
QString &layout)
34
{
35
Q_D(QWaylandKeymap);
36
if
(d->m_layout == layout)
37
return
;
38
d->m_layout = layout;
39
emit layoutChanged();
40
}
41
42
/*!
43
* \qmlproperty string QtWayland.Compositor::WaylandKeymap::variant
44
*
45
* This property holds the variant name of the keyboard layout as defined in the
46
* XKB keymap.
47
*/
48
49
/*!
50
* \property QWaylandKeymap::variant
51
*
52
* This property holds the variant name of the keyboard layout as defined in the
53
* XKB keymap.
54
*/
55
QString QWaylandKeymap::variant()
const
56
{
57
Q_D(
const
QWaylandKeymap);
58
return
d->m_variant;
59
}
60
61
void
QWaylandKeymap::setVariant(
const
QString &variant)
62
{
63
Q_D(QWaylandKeymap);
64
if
(d->m_variant == variant)
65
return
;
66
d->m_variant = variant;
67
emit variantChanged();
68
}
69
70
/*!
71
* \qmlproperty string QtWayland.Compositor::WaylandKeymap::options
72
*
73
* This property holds the options string for the keyboard as defined in the
74
* XKB keymap.
75
*/
76
77
/*!
78
* \property QWaylandKeymap::options
79
*
80
* This property holds the options string for the keyboard as defined in the
81
* XKB keymap.
82
*/
83
QString QWaylandKeymap::options()
const
{
84
Q_D(
const
QWaylandKeymap);
85
return
d->m_options;
86
}
87
88
void
QWaylandKeymap::setOptions(
const
QString &options)
89
{
90
Q_D(QWaylandKeymap);
91
if
(d->m_options == options)
92
return
;
93
d->m_options = options;
94
emit optionsChanged();
95
}
96
97
/*!
98
* \qmlproperty string QtWayland.Compositor::WaylandKeymap::rules
99
*
100
* This property holds the rules name for the keyboard as defined in the XKB
101
* keymap.
102
*/
103
104
/*!
105
* \property QWaylandKeymap::rules
106
*
107
* This property holds the rules name for the keyboard as defined in the XKB
108
* keymap.
109
*/
110
QString QWaylandKeymap::rules()
const
{
111
Q_D(
const
QWaylandKeymap);
112
return
d->m_rules;
113
}
114
115
void
QWaylandKeymap::setRules(
const
QString &rules)
116
{
117
Q_D(QWaylandKeymap);
118
if
(d->m_rules == rules)
119
return
;
120
d->m_rules = rules;
121
emit rulesChanged();
122
}
123
124
/*!
125
* \qmlproperty string QtWayland.Compositor::WaylandKeymap::model
126
*
127
* This property holds the model name of the keyboard as defined in the XKB
128
* keymap.
129
*/
130
131
/*!
132
* \property QWaylandKeymap::model
133
*
134
* This property holds the model name of the keyboard as defined in the XKB
135
* keymap.
136
*/
137
QString QWaylandKeymap::model()
const
{
138
Q_D(
const
QWaylandKeymap);
139
return
d->m_model;
140
}
141
142
void
QWaylandKeymap::setModel(
const
QString &model)
143
{
144
Q_D(QWaylandKeymap);
145
if
(d->m_model == model)
146
return
;
147
d->m_model = model;
148
emit modelChanged();
149
}
150
151
QWaylandKeymapPrivate::QWaylandKeymapPrivate(
const
QString &layout,
const
QString &variant,
152
const
QString &options,
const
QString &model,
153
const
QString &rules)
154
: m_layout(layout)
155
, m_variant(variant)
156
, m_options(options)
157
, m_rules(rules)
158
, m_model(model)
159
{
160
}
161
162
QT_END_NAMESPACE
163
164
#
include
"moc_qwaylandkeymap.cpp"
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtwayland
src
compositor
compositor_api
qwaylandkeymap.cpp
Generated on
for Qt by
1.16.1