Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qcomposeplatforminputcontext.h
Go to the documentation of this file.
1
// Copyright (C) 2019 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
QCOMPOSEPLATFORMINPUTCONTEXT_H
6
#
define
QCOMPOSEPLATFORMINPUTCONTEXT_H
7
8
#
include
<
QtCore
/
QLoggingCategory
>
9
10
#
include
<
qpa
/
qplatforminputcontext
.
h
>
11
12
#
include
<
xkbcommon
/
xkbcommon
-
compose
.
h
>
13
14
Q_DECLARE_OPAQUE_POINTER(xkb_context *)
15
QT_BEGIN_NAMESPACE
16
17
Q_DECLARE_LOGGING_CATEGORY(lcXkbCompose)
18
19
class
QEvent;
20
21
class
QComposeInputContext
:
public
QPlatformInputContext
22
{
23
Q_OBJECT
24
public
:
25
QComposeInputContext
();
26
~
QComposeInputContext
();
27
28
bool
isValid
()
const
override
;
29
void
setFocusObject
(QObject *object)
override
;
30
void
reset
()
override
;
31
void
update
(
Qt
::
InputMethodQueries
)
override
;
32
33
bool
filterEvent
(
const
QEvent *event)
override
;
34
35
// This invokable is called from QXkbCommon::setXkbContext().
36
Q_INVOKABLE
void
setXkbContext
(
struct
xkb_context *context) { m_XkbContext = context; }
37
38
protected
:
39
void
ensureInitialized
();
40
41
private
:
42
bool
m_initialized =
false
;
43
xkb_compose_table *m_composeTable =
nullptr
;
44
xkb_compose_state *m_composeState =
nullptr
;
45
QObject *m_focusObject =
nullptr
;
46
struct
xkb_context *m_XkbContext =
nullptr
;
47
};
48
49
QT_END_NAMESPACE
50
51
#
endif
// QCOMPOSEPLATFORMINPUTCONTEXT_H
QComposeInputContext
Definition
qcomposeplatforminputcontext.h:22
QComposeInputContext::reset
void reset() override
Method to be called when input method needs to be reset.
Definition
qcomposeplatforminputcontext.cpp:127
QComposeInputContext::filterEvent
bool filterEvent(const QEvent *event) override
This function can be reimplemented to filter input events.
Definition
qcomposeplatforminputcontext.cpp:66
QComposeInputContext::setFocusObject
void setFocusObject(QObject *object) override
This virtual method gets called to notify updated focus to object.
Definition
qcomposeplatforminputcontext.cpp:122
QComposeInputContext::ensureInitialized
void ensureInitialized()
Definition
qcomposeplatforminputcontext.cpp:30
QComposeInputContext::~QComposeInputContext
~QComposeInputContext()
Definition
qcomposeplatforminputcontext.cpp:24
QComposeInputContext::setXkbContext
Q_INVOKABLE void setXkbContext(struct xkb_context *context)
Definition
qcomposeplatforminputcontext.h:36
QComposeInputContext::isValid
bool isValid() const override
Returns input context validity.
Definition
qcomposeplatforminputcontext.cpp:117
QComposeInputContext::update
void update(Qt::InputMethodQueries) override
Notification on editor updates.
Definition
qcomposeplatforminputcontext.cpp:133
Q_LOGGING_CATEGORY
Q_LOGGING_CATEGORY(lcEventDispatcher, "qt.eventdispatcher")
qtbase
src
plugins
platforminputcontexts
compose
qcomposeplatforminputcontext.h
Generated on
for Qt by
1.18.0