1 | // Copyright (C) 2016 The Qt Company Ltd. |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
3 | |
4 | #ifndef OPENWNNINPUTMETHOD_P_H |
5 | #define OPENWNNINPUTMETHOD_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 <QtVirtualKeyboard/qvirtualkeyboardabstractinputmethod.h> |
19 | |
20 | QT_BEGIN_NAMESPACE |
21 | namespace QtVirtualKeyboard { |
22 | |
23 | class OpenWnnInputMethodPrivate; |
24 | |
25 | class OpenWnnInputMethod : public QVirtualKeyboardAbstractInputMethod |
26 | { |
27 | Q_OBJECT |
28 | Q_DECLARE_PRIVATE(OpenWnnInputMethod) |
29 | QML_NAMED_ELEMENT(JapaneseInputMethod) |
30 | |
31 | public: |
32 | explicit OpenWnnInputMethod(QObject *parent = nullptr); |
33 | ~OpenWnnInputMethod(); |
34 | |
35 | QList<QVirtualKeyboardInputEngine::InputMode> inputModes(const QString &locale) override; |
36 | bool setInputMode(const QString &locale, QVirtualKeyboardInputEngine::InputMode inputMode) override; |
37 | bool setTextCase(QVirtualKeyboardInputEngine::TextCase textCase) override; |
38 | |
39 | bool keyEvent(Qt::Key key, const QString &text, Qt::KeyboardModifiers modifiers) override; |
40 | |
41 | QList<QVirtualKeyboardSelectionListModel::Type> selectionLists() override; |
42 | int selectionListItemCount(QVirtualKeyboardSelectionListModel::Type type) override; |
43 | QVariant selectionListData(QVirtualKeyboardSelectionListModel::Type type, int index, |
44 | QVirtualKeyboardSelectionListModel::Role role) override; |
45 | void selectionListItemSelected(QVirtualKeyboardSelectionListModel::Type type, int index) override; |
46 | |
47 | void reset() override; |
48 | void update() override; |
49 | |
50 | private: |
51 | QScopedPointer<OpenWnnInputMethodPrivate> d_ptr; |
52 | }; |
53 | |
54 | } // namespace QtVirtualKeyboard |
55 | QT_END_NAMESPACE |
56 | |
57 | #endif |
58 |