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

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