aboutsummaryrefslogtreecommitdiffstats
path: root/src/virtualkeyboard/qvirtualkeyboardinputcontext.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/virtualkeyboard/qvirtualkeyboardinputcontext.h')
-rw-r--r--src/virtualkeyboard/qvirtualkeyboardinputcontext.h58
1 files changed, 21 insertions, 37 deletions
diff --git a/src/virtualkeyboard/qvirtualkeyboardinputcontext.h b/src/virtualkeyboard/qvirtualkeyboardinputcontext.h
index e511bbfb..1bd81d58 100644
--- a/src/virtualkeyboard/qvirtualkeyboardinputcontext.h
+++ b/src/virtualkeyboard/qvirtualkeyboardinputcontext.h
@@ -1,40 +1,15 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QVIRTUALKEYBOARDINPUTCONTEXT_H
#define QVIRTUALKEYBOARDINPUTCONTEXT_H
-#include <QObject>
-#include <QRectF>
-#include <QLocale>
-#include <QInputMethodEvent>
-#include <QInputMethod>
+#include <QtCore/QObject>
+#include <QtCore/QRectF>
+#include <QtCore/QLocale>
+#include <QtGui/QInputMethodEvent>
+#include <QtGui/QInputMethod>
+#include <QtQml/qqml.h>
#include <QtVirtualKeyboard/qvirtualkeyboard_global.h>
QT_BEGIN_NAMESPACE
@@ -44,16 +19,17 @@ class PlatformInputContext;
}
class QVirtualKeyboardInputEngine;
class QVirtualKeyboardInputContextPrivate;
+class QVirtualKeyboardObserver;
-class QVIRTUALKEYBOARD_EXPORT QVirtualKeyboardInputContext : public QObject
+class Q_VIRTUALKEYBOARD_EXPORT QVirtualKeyboardInputContext : public QObject
{
Q_OBJECT
Q_DISABLE_COPY(QVirtualKeyboardInputContext)
Q_DECLARE_PRIVATE(QVirtualKeyboardInputContext)
Q_PROPERTY(bool shift READ isShiftActive NOTIFY shiftActiveChanged)
- Q_PROPERTY(bool shiftActive READ isShiftActive NOTIFY shiftActiveChanged REVISION 4)
+ Q_PROPERTY(bool shiftActive READ isShiftActive NOTIFY shiftActiveChanged REVISION(2, 4))
Q_PROPERTY(bool capsLock READ isCapsLockActive NOTIFY capsLockActiveChanged)
- Q_PROPERTY(bool capsLockActive READ isCapsLockActive NOTIFY capsLockActiveChanged REVISION 4)
+ Q_PROPERTY(bool capsLockActive READ isCapsLockActive NOTIFY capsLockActiveChanged REVISION(2, 4))
Q_PROPERTY(bool uppercase READ isUppercase NOTIFY uppercaseChanged)
Q_PROPERTY(int anchorPosition READ anchorPosition NOTIFY anchorPositionChanged)
Q_PROPERTY(int cursorPosition READ cursorPosition NOTIFY cursorPositionChanged)
@@ -70,10 +46,17 @@ class QVIRTUALKEYBOARD_EXPORT QVirtualKeyboardInputContext : public QObject
Q_PROPERTY(bool selectionControlVisible READ isSelectionControlVisible NOTIFY selectionControlVisibleChanged)
Q_PROPERTY(bool anchorRectIntersectsClipRect READ anchorRectIntersectsClipRect NOTIFY anchorRectIntersectsClipRectChanged)
Q_PROPERTY(bool cursorRectIntersectsClipRect READ cursorRectIntersectsClipRect NOTIFY cursorRectIntersectsClipRectChanged)
- Q_PROPERTY(QVirtualKeyboardInputContextPrivate *priv READ priv CONSTANT)
+ Q_PROPERTY(QVirtualKeyboardInputContextPrivate *priv READ priv CONSTANT REVISION(2, 0))
+ Q_PROPERTY(QVirtualKeyboardObserver *keyboardObserver READ keyboardObserver CONSTANT REVISION(6, 1))
Q_MOC_INCLUDE("qvirtualkeyboardinputengine.h")
Q_MOC_INCLUDE("qvirtualkeyboardinputcontext_p.h")
+ // The QML macros are unused for now, until we can move the QML_NAMED_ELEMENT back here.
+ // QML_SINGLETON generates some code that might or might not emit symbols on some platforms.
+ QML_SINGLETON
+ QML_ADDED_IN_VERSION(1, 0)
+ QML_EXTRA_VERSION(2, 0)
+
public:
explicit QVirtualKeyboardInputContext(QObject *parent = nullptr);
~QVirtualKeyboardInputContext();
@@ -100,6 +83,7 @@ public:
bool anchorRectIntersectsClipRect() const;
bool cursorRectIntersectsClipRect() const;
QVirtualKeyboardInputContextPrivate *priv() const;
+ QVirtualKeyboardObserver *keyboardObserver() const;
Q_INVOKABLE void sendKeyClick(int key, const QString &text, int modifiers = 0);
Q_INVOKABLE void commit();