1 | // Copyright (C) 2021 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
3 | |
4 | #ifndef QVIRTUALKEYBOARDOBSERVER_H |
5 | #define QVIRTUALKEYBOARDOBSERVER_H |
6 | |
7 | #include <QtCore/QObject> |
8 | #include <QtCore/QVariant> |
9 | #include <QtQml/qqml.h> |
10 | #include <QtVirtualKeyboard/qvirtualkeyboard_global.h> |
11 | |
12 | QT_BEGIN_NAMESPACE |
13 | |
14 | class QVirtualKeyboardObserverPrivate; |
15 | |
16 | class Q_VIRTUALKEYBOARD_EXPORT QVirtualKeyboardObserver : public QObject |
17 | { |
18 | Q_OBJECT |
19 | Q_DECLARE_PRIVATE(QVirtualKeyboardObserver) |
20 | Q_DISABLE_COPY(QVirtualKeyboardObserver) |
21 | Q_PROPERTY(QVariant layout READ layout NOTIFY layoutChanged) |
22 | QML_NAMED_ELEMENT(KeyboardObserver) |
23 | QML_ADDED_IN_VERSION(6, 1) |
24 | |
25 | public: |
26 | explicit QVirtualKeyboardObserver(QObject *parent = nullptr); |
27 | |
28 | QVariant layout(); |
29 | |
30 | Q_SIGNALS: |
31 | void layoutChanged(); |
32 | |
33 | private Q_SLOTS: |
34 | void invalidateLayout(); |
35 | }; |
36 | |
37 | QT_END_NAMESPACE |
38 | |
39 | #endif // QVIRTUALKEYBOARDOBSERVER_H |
40 | |