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
6
8
9QWaylandKeymap::QWaylandKeymap(const QString &layout, const QString &variant, const QString &options, const QString &model, const QString &rules, QObject *parent)
10 : QObject(*new QWaylandKeymapPrivate(layout, variant, options, model, rules), parent)
11{
12}
13
14/*!
15 * \qmlproperty string QtWayland.Compositor::WaylandKeymap::layout
16 *
17 * This property holds the layout name of the keyboard as defined in the XKB
18 * keymap.
19 */
20
21/*!
22 * \property QWaylandKeymap::layout
23 *
24 * This property holds the layout name of the keyboard as defined in the XKB
25 * keymap.
26 */
27QString QWaylandKeymap::layout() const {
28 Q_D(const QWaylandKeymap);
29 return d->m_layout;
30}
31
32void QWaylandKeymap::setLayout(const QString &layout)
33{
34 Q_D(QWaylandKeymap);
35 if (d->m_layout == layout)
36 return;
37 d->m_layout = layout;
38 emit layoutChanged();
39}
40
41/*!
42 * \qmlproperty string QtWayland.Compositor::WaylandKeymap::variant
43 *
44 * This property holds the variant name of the keyboard layout as defined in the
45 * XKB keymap.
46 */
47
48/*!
49 * \property QWaylandKeymap::variant
50 *
51 * This property holds the variant name of the keyboard layout as defined in the
52 * XKB keymap.
53 */
54QString QWaylandKeymap::variant() const
55{
56 Q_D(const QWaylandKeymap);
57 return d->m_variant;
58}
59
60void QWaylandKeymap::setVariant(const QString &variant)
61{
62 Q_D(QWaylandKeymap);
63 if (d->m_variant == variant)
64 return;
65 d->m_variant = variant;
66 emit variantChanged();
67}
68
69/*!
70 * \qmlproperty string QtWayland.Compositor::WaylandKeymap::options
71 *
72 * This property holds the options string for the keyboard as defined in the
73 * XKB keymap.
74 */
75
76/*!
77 * \property QWaylandKeymap::options
78 *
79 * This property holds the options string for the keyboard as defined in the
80 * XKB keymap.
81 */
82QString QWaylandKeymap::options() const {
83 Q_D(const QWaylandKeymap);
84 return d->m_options;
85}
86
87void QWaylandKeymap::setOptions(const QString &options)
88{
89 Q_D(QWaylandKeymap);
90 if (d->m_options == options)
91 return;
92 d->m_options = options;
93 emit optionsChanged();
94}
95
96/*!
97 * \qmlproperty string QtWayland.Compositor::WaylandKeymap::rules
98 *
99 * This property holds the rules name for the keyboard as defined in the XKB
100 * keymap.
101 */
102
103/*!
104 * \property QWaylandKeymap::rules
105 *
106 * This property holds the rules name for the keyboard as defined in the XKB
107 * keymap.
108 */
109QString QWaylandKeymap::rules() const {
110 Q_D(const QWaylandKeymap);
111 return d->m_rules;
112}
113
114void QWaylandKeymap::setRules(const QString &rules)
115{
116 Q_D(QWaylandKeymap);
117 if (d->m_rules == rules)
118 return;
119 d->m_rules = rules;
120 emit rulesChanged();
121}
122
123/*!
124 * \qmlproperty string QtWayland.Compositor::WaylandKeymap::model
125 *
126 * This property holds the model name of the keyboard as defined in the XKB
127 * keymap.
128 */
129
130/*!
131 * \property QWaylandKeymap::model
132 *
133 * This property holds the model name of the keyboard as defined in the XKB
134 * keymap.
135 */
136QString QWaylandKeymap::model() const {
137 Q_D(const QWaylandKeymap);
138 return d->m_model;
139}
140
141void QWaylandKeymap::setModel(const QString &model)
142{
143 Q_D(QWaylandKeymap);
144 if (d->m_model == model)
145 return;
146 d->m_model = model;
147 emit modelChanged();
148}
149
150QWaylandKeymapPrivate::QWaylandKeymapPrivate(const QString &layout, const QString &variant,
151 const QString &options, const QString &model,
152 const QString &rules)
153 : m_layout(layout)
154 , m_variant(variant)
155 , m_options(options)
156 , m_rules(rules)
157 , m_model(model)
158{
159}
160
161QT_END_NAMESPACE
162
163#include "moc_qwaylandkeymap.cpp"
Combined button and popup list for selecting options.