Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qinputmethod.h
Go to the documentation of this file.
1// Copyright (C) 2016 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
4#ifndef QINPUTMETHOD_H
5#define QINPUTMETHOD_H
6
7#include <QtGui/qtguiglobal.h>
8#include <QtCore/qobject.h>
9
11
13class QWindow;
14class QRectF;
15class QTransform;
17
18class Q_GUI_EXPORT QInputMethod : public QObject
19{
21 Q_DECLARE_PRIVATE(QInputMethod)
22 Q_PROPERTY(QRectF cursorRectangle READ cursorRectangle NOTIFY cursorRectangleChanged)
23 Q_PROPERTY(QRectF anchorRectangle READ anchorRectangle NOTIFY anchorRectangleChanged)
24 Q_PROPERTY(QRectF keyboardRectangle READ keyboardRectangle NOTIFY keyboardRectangleChanged)
25 Q_PROPERTY(QRectF inputItemClipRectangle READ inputItemClipRectangle
26 NOTIFY inputItemClipRectangleChanged)
27 Q_PROPERTY(bool visible READ isVisible NOTIFY visibleChanged)
28 Q_PROPERTY(bool animating READ isAnimating NOTIFY animatingChanged)
29 Q_PROPERTY(QLocale locale READ locale NOTIFY localeChanged)
30 Q_PROPERTY(Qt::LayoutDirection inputDirection READ inputDirection NOTIFY inputDirectionChanged)
31
32public:
33 QTransform inputItemTransform() const;
34 void setInputItemTransform(const QTransform &transform);
35
36 QRectF inputItemRectangle() const;
37 void setInputItemRectangle(const QRectF &rect);
38
39 // in window coordinates
40 QRectF cursorRectangle() const; // ### what if we have rotations for the item?
41 QRectF anchorRectangle() const; // ### ditto
42
43 // keyboard geometry in window coords
44 QRectF keyboardRectangle() const;
45
46 QRectF inputItemClipRectangle() const;
47
48 enum Action {
50 ContextMenu
51 };
52 Q_ENUM(Action)
53
54 bool isVisible() const;
55 void setVisible(bool visible);
56
57 bool isAnimating() const;
58
59 QLocale locale() const;
60 Qt::LayoutDirection inputDirection() const;
61
62 static QVariant queryFocusObject(Qt::InputMethodQuery query, const QVariant &argument);
63
64public Q_SLOTS:
65 void show();
66 void hide();
67
68 void update(Qt::InputMethodQueries queries);
69 void reset();
70 void commit();
71
72 void invokeAction(Action a, int cursorPosition);
73
83
84private:
85 friend class QGuiApplication;
90};
91
93
94#endif
\macro qGuiApp
The QInputMethodQueryEvent class provides an event sent by the input context to input objects.
Definition qevent.h:679
The QInputMethod class provides access to the active text input method.
Action
Indicates the kind of action performed by the user.
void animatingChanged()
void anchorRectangleChanged()
void inputDirectionChanged(Qt::LayoutDirection newDirection)
void inputItemClipRectangleChanged()
void visibleChanged()
void keyboardRectangleChanged()
void localeChanged()
void cursorRectangleChanged()
\inmodule QtCore
Definition qobject.h:103
The QPlatformInputContext class abstracts the input method dependent data and composing state.
\inmodule QtCore\reentrant
Definition qrect.h:484
The QTransform class specifies 2D transformations of a coordinate system.
Definition qtransform.h:20
\inmodule QtCore
Definition qvariant.h:65
\inmodule QtGui
Definition qwindow.h:63
rect
[4]
Combined button and popup list for selecting options.
Definition qcompare.h:63
InputMethodQuery
LayoutDirection
GLboolean GLboolean GLboolean GLboolean a
[7]
GLint GLint GLint GLint GLsizei GLsizei GLsizei GLboolean commit
GLuint GLenum GLenum transform
GLboolean reset
GLenum query
#define Q_ENUM(x)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SLOTS
#define Q_SIGNALS
view show()
[18] //! [19]
edit hide()
edit isVisible()
QDBusArgument argument