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
platforminputcontext_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef PLATFORMINPUTCONTEXT_P_H
5#define PLATFORMINPUTCONTEXT_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <qpa/qplatforminputcontext.h>
19#include <QtGui/QInputMethod>
20#include <QtCore/private/qglobal_p.h>
21
23
25{
26public:
33
34 void showInputPanel() override
35 {
36 m_visible = true;
38 }
39 void hideInputPanel() override
40 {
41 m_visible = false;
43 }
44 bool isInputPanelVisible() const override
45 {
46 return m_visible;
47 }
48 void invokeAction(QInputMethod::Action action, int cursorPosition) override
49 {
51 m_action = action;
52 m_cursorPosition = cursorPosition;
53 }
54 void update(Qt::InputMethodQueries) override
55 {
57 }
58
59 QLocale locale() const override
60 {
63 else
65 }
66
68 {
69 return m_direction;
70 }
71
77
86
95};
96
98
99#endif // PLATFORMINPUTCONTEXT_P_H
void setInputDirection(Qt::LayoutDirection direction)
QInputMethod::Action m_action
QLocale locale() const override
void showInputPanel() override
Request to show input panel.
bool isInputPanelVisible() const override
Returns input panel visibility status.
void invokeAction(QInputMethod::Action action, int cursorPosition) override
Called when the word currently being composed in the input item is tapped by the user.
Qt::LayoutDirection m_direction
Qt::LayoutDirection inputDirection() const override
void hideInputPanel() override
Request to hide input panel.
void update(Qt::InputMethodQueries) override
Notification on editor updates.
The QInputMethod class provides access to the active text input method.
Action
Indicates the kind of action performed by the user.
@ Arabic
Definition qlocale.h:58
@ English
Definition qlocale.h:119
The QPlatformInputContext class abstracts the input method dependent data and composing state.
void emitInputDirectionChanged(Qt::LayoutDirection newDirection)
direction
Combined button and popup list for selecting options.
Definition qcompare.h:63
LayoutDirection
@ RightToLeft