blob: 12df80a1eedf5a63ecc5088a9c08d8b18d7abf26 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef XT9CPINPUTMETHOD_P_H
#define XT9CPINPUTMETHOD_P_H
#include "xt9inputmethod_p.h"
QT_BEGIN_NAMESPACE
namespace QtVirtualKeyboard {
class Xt9CpInputMethodPrivate;
class Xt9CpInputMethod : public Xt9InputMethod
{
Q_OBJECT
Q_DECLARE_PRIVATE(Xt9CpInputMethod)
QML_NAMED_ELEMENT(PinyinInputMethod)
public:
explicit Xt9CpInputMethod(QObject *parent = nullptr);
QList<QVirtualKeyboardInputEngine::InputMode> inputModes(const QString &locale);
bool setInputMode(const QString &locale, QVirtualKeyboardInputEngine::InputMode inputMode);
bool setTextCase(QVirtualKeyboardInputEngine::TextCase textCase);
bool keyEvent(Qt::Key key, const QString &text, Qt::KeyboardModifiers modifiers);
QList<QVirtualKeyboardSelectionListModel::Type> selectionLists();
int selectionListItemCount(QVirtualKeyboardSelectionListModel::Type type);
QVariant selectionListData(QVirtualKeyboardSelectionListModel::Type type, int index, QVirtualKeyboardSelectionListModel::Role role);
void selectionListItemSelected(QVirtualKeyboardSelectionListModel::Type type, int index);
void reset();
void update();
};
class CangjieInputMethod : public Xt9CpInputMethod
{
Q_OBJECT
QML_NAMED_ELEMENT(CangjieInputMethod)
public:
explicit CangjieInputMethod(QObject *parent = nullptr);
};
class StrokeInputMethod : public Xt9CpInputMethod
{
Q_OBJECT
QML_NAMED_ELEMENT(StrokeInputMethod)
public:
explicit StrokeInputMethod(QObject *parent = nullptr);
};
} // namespace QtVirtualKeyboard
QT_END_NAMESPACE
#endif
|