1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef THAIINPUTMETHOD_H
5#define THAIINPUTMETHOD_H
6
7#ifdef QT_HUNSPELLINPUTMETHOD_LIB
8#include <QtHunspellInputMethod/private/hunspellinputmethod_p.h>
9#define ThaiInputMethodBase HunspellInputMethod
10#else
11#include <QtVirtualKeyboard/qvirtualkeyboardabstractinputmethod.h>
12#define ThaiInputMethodBase QVirtualKeyboardAbstractInputMethod
13#endif
14
15QT_BEGIN_NAMESPACE
16namespace QtVirtualKeyboard {
17
18class ThaiInputMethodPrivate;
19
20class ThaiInputMethod : public ThaiInputMethodBase
21{
22 Q_OBJECT
23 Q_DECLARE_PRIVATE(ThaiInputMethod)
24 QML_ELEMENT
25public:
26 explicit ThaiInputMethod(QObject *parent = nullptr);
27
28#ifndef QT_HUNSPELLINPUTMETHOD_LIB
29 QList<QVirtualKeyboardInputEngine::InputMode> inputModes(const QString &locale) override;
30 bool setInputMode(const QString &locale, QVirtualKeyboardInputEngine::InputMode inputMode) override;
31 bool setTextCase(QVirtualKeyboardInputEngine::TextCase textCase) override;
32#endif
33
34 bool keyEvent(Qt::Key key, const QString &text, Qt::KeyboardModifiers modifiers) override;
35};
36
37} // namespace QtVirtualKeyboard
38QT_END_NAMESPACE
39
40#endif
41

source code of qtvirtualkeyboard/src/plugins/thai/thaiinputmethod_p.h