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
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#ifndef QCOMPOSEPLATFORMINPUTCONTEXT_H
4#define QCOMPOSEPLATFORMINPUTCONTEXT_H
5
6#include <QtCore/QLoggingCategory>
7
8#include <qpa/qplatforminputcontext.h>
9
10#include <xkbcommon/xkbcommon-compose.h>
11
12Q_DECLARE_OPAQUE_POINTER(xkb_context *)
14
16
17class QEvent;
18
20{
22public:
25
26 bool isValid() const override;
27 void setFocusObject(QObject *object) override;
28 void reset() override;
29 void update(Qt::InputMethodQueries) override;
30
31 bool filterEvent(const QEvent *event) override;
32
33 // This invokable is called from QXkbCommon::setXkbContext().
34 Q_INVOKABLE void setXkbContext(struct xkb_context *context) { m_XkbContext = context; }
35
36protected:
37 void ensureInitialized();
38
39private:
40 bool m_initialized = false;
41 xkb_compose_table *m_composeTable = nullptr;
42 xkb_compose_state *m_composeState = nullptr;
43 QObject *m_focusObject = nullptr;
44 struct xkb_context *m_XkbContext = nullptr;
45};
46
48
49#endif // QCOMPOSEPLATFORMINPUTCONTEXT_H
void reset() override
Method to be called when input method needs to be reset.
bool filterEvent(const QEvent *event) override
This function can be reimplemented to filter input events.
void setFocusObject(QObject *object) override
This virtual method gets called to notify updated focus to object.
Q_INVOKABLE void setXkbContext(struct xkb_context *context)
bool isValid() const override
Returns input context validity.
void update(Qt::InputMethodQueries) override
Notification on editor updates.
\inmodule QtCore
Definition qcoreevent.h:45
\inmodule QtCore
Definition qobject.h:103
The QPlatformInputContext class abstracts the input method dependent data and composing state.
Combined button and popup list for selecting options.
static void * context
#define Q_DECLARE_LOGGING_CATEGORY(name)
#define Q_DECLARE_OPAQUE_POINTER(POINTER)
Definition qmetatype.h:1517
struct _cl_event * event
#define Q_OBJECT
#define Q_INVOKABLE