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
12QT_BEGIN_NAMESPACE
13
14class QVirtualKeyboardObserverPrivate;
15
16class 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
25public:
26 explicit QVirtualKeyboardObserver(QObject *parent = nullptr);
27
28 QVariant layout();
29
30Q_SIGNALS:
31 void layoutChanged();
32
33private Q_SLOTS:
34 void invalidateLayout();
35};
36
37QT_END_NAMESPACE
38
39#endif // QVIRTUALKEYBOARDOBSERVER_H
40

source code of qtvirtualkeyboard/src/virtualkeyboard/qvirtualkeyboardobserver.h