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_P_H
5#define QINPUTMETHOD_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 <QtGui/private/qtguiglobal_p.h>
19#include <qinputmethod.h>
20#include <private/qobject_p.h>
21#include <QTransform>
22#include <qpa/qplatforminputcontext.h>
23#include <qpa/qplatformintegration.h>
24#include <private/qguiapplication_p.h>
25
26QT_BEGIN_NAMESPACE
27
28class QInputMethodPrivate : public QObjectPrivate
29{
30 Q_DECLARE_PUBLIC(QInputMethod)
31
32public:
33 inline QInputMethodPrivate() : testContext(nullptr)
34 {}
35 QPlatformInputContext *platformInputContext() const
36 {
37 return testContext ? testContext : QGuiApplicationPrivate::platformIntegration()->inputContext();
38 }
39 static inline QInputMethodPrivate *get(QInputMethod *inputMethod)
40 {
41 return inputMethod->d_func();
42 }
43
44 void _q_connectFocusObject();
45 void _q_checkFocusObject(QObject *object);
46 static bool objectAcceptsInputMethod(QObject *object);
47
48 QTransform inputItemTransform;
49 QRectF inputRectangle;
50 QPlatformInputContext *testContext;
51};
52
53QT_END_NAMESPACE
54
55#endif
56

source code of qtbase/src/gui/kernel/qinputmethod_p.h