1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QWAYLANDKEYMAP_H
5#define QWAYLANDKEYMAP_H
6
7#include <QtCore/QObject>
8#include <QtWaylandCompositor/qtwaylandcompositorglobal.h>
9#include <QtWaylandCompositor/qtwaylandqmlinclude.h>
10#if QT_CONFIG(wayland_compositor_quick)
11#include <QtWaylandCompositor/qwaylandquickchildren.h>
12#endif
13
14QT_BEGIN_NAMESPACE
15
16class QWaylandKeymapPrivate;
17
18class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandKeymap : public QObject
19{
20 Q_OBJECT
21 Q_DECLARE_PRIVATE(QWaylandKeymap)
22#if QT_CONFIG(wayland_compositor_quick)
23 Q_WAYLAND_COMPOSITOR_DECLARE_QUICK_CHILDREN(QWaylandKeymap)
24#endif
25 Q_PROPERTY(QString layout READ layout WRITE setLayout NOTIFY layoutChanged)
26 Q_PROPERTY(QString variant READ variant WRITE setVariant NOTIFY variantChanged)
27 Q_PROPERTY(QString options READ options WRITE setOptions NOTIFY optionsChanged)
28 Q_PROPERTY(QString rules READ rules WRITE setRules NOTIFY rulesChanged)
29 Q_PROPERTY(QString model READ model WRITE setModel NOTIFY modelChanged)
30 QML_NAMED_ELEMENT(WaylandKeymap)
31 QML_ADDED_IN_VERSION(1, 0)
32public:
33 QWaylandKeymap(const QString &layout = QString(), const QString &variant = QString(), const QString &options = QString(),
34 const QString &model = QString(), const QString &rules = QString(), QObject *parent = nullptr);
35
36 QString layout() const;
37 void setLayout(const QString &layout);
38 QString variant() const;
39 void setVariant(const QString &variant);
40 QString options() const;
41 void setOptions(const QString &options);
42 QString rules() const;
43 void setRules(const QString &rules);
44 QString model() const;
45 void setModel(const QString &model);
46
47Q_SIGNALS:
48 void layoutChanged();
49 void variantChanged();
50 void optionsChanged();
51 void rulesChanged();
52 void modelChanged();
53};
54
55QT_END_NAMESPACE
56
57#endif //QWAYLANDKEYMAP_H
58

source code of qtwayland/src/compositor/compositor_api/qwaylandkeymap.h