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