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
qquickinputmethod_p.h
Go to the documentation of this file.
1// Copyright (C) 2022 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QQUICKINPUTMETHOD_P_H
6#define QQUICKINPUTMETHOD_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtCore/qobject.h>
20#include <QtCore/qlocale.h>
21#include <QtCore/qrect.h>
22#include <QtGui/qtransform.h>
23#include <QtGui/qinputmethod.h>
24#include <QtQml/qqml.h>
25
26#include <private/qtquickglobal_p.h>
27
29class Q_QUICK_EXPORT QQuickInputMethod : public QObject
30{
31 Q_OBJECT
32 QML_NAMED_ELEMENT(InputMethod)
33 QML_ADDED_IN_VERSION(6, 4)
34 QML_SINGLETON
35
36 Q_PROPERTY(QRectF cursorRectangle READ cursorRectangle NOTIFY cursorRectangleChanged FINAL)
37 Q_PROPERTY(QRectF anchorRectangle READ anchorRectangle NOTIFY anchorRectangleChanged FINAL)
38 Q_PROPERTY(QRectF keyboardRectangle READ keyboardRectangle NOTIFY keyboardRectangleChanged FINAL)
39 Q_PROPERTY(QRectF inputItemClipRectangle READ inputItemClipRectangle NOTIFY
40 inputItemClipRectangleChanged FINAL)
41 Q_PROPERTY(bool visible READ isVisible NOTIFY visibleChanged FINAL)
42 Q_PROPERTY(bool animating READ isAnimating NOTIFY animatingChanged FINAL)
43 Q_PROPERTY(QLocale locale READ locale NOTIFY localeChanged FINAL)
44 Q_PROPERTY(Qt::LayoutDirection inputDirection READ inputDirection NOTIFY inputDirectionChanged FINAL)
45public:
46 explicit QQuickInputMethod(QObject *parent = nullptr);
47
48 QRectF anchorRectangle() const;
49 QRectF cursorRectangle() const;
50 Qt::LayoutDirection inputDirection() const;
51 QRectF inputItemClipRectangle() const;
52
53 QRectF inputItemRectangle() const;
54 void setInputItemRectangle(const QRectF &rect);
55
56 QTransform inputItemTransform() const;
57 void setInputItemTransform(const QTransform &transform);
58
59 bool isAnimating() const;
60
61 bool isVisible() const;
62 void setVisible(bool visible);
63
64 QRectF keyboardRectangle() const;
65 QLocale locale() const;
66Q_SIGNALS:
67 void anchorRectangleChanged();
68 void animatingChanged();
69 void cursorRectangleChanged();
70 void inputDirectionChanged(Qt::LayoutDirection newDirection);
71 void inputItemClipRectangleChanged();
72 void keyboardRectangleChanged();
73 void localeChanged();
74 void visibleChanged();
75
76public Q_SLOTS:
77 void commit();
78 void hide();
79 void invokeAction(QInputMethod::Action a, int cursorPosition);
80 void reset();
81 void show();
82 void update(Qt::InputMethodQueries queries);
83};
84
85QT_END_NAMESPACE
86
87#endif // QQUICKINPUTMETHOD_P_H