Line | Source | Count |
1 | | - |
2 | | - |
3 | | - |
4 | QPlatformInputContext::QPlatformInputContext() | - |
5 | : QObject(*(new QPlatformInputContextPrivate)) | - |
6 | { | - |
7 | } | - |
8 | | - |
9 | | - |
10 | | - |
11 | | - |
12 | QPlatformInputContext::~QPlatformInputContext() | - |
13 | { | - |
14 | } | - |
15 | | - |
16 | | - |
17 | | - |
18 | | - |
19 | bool QPlatformInputContext::isValid() const | - |
20 | { | - |
21 | return false; | - |
22 | } | - |
23 | | - |
24 | | - |
25 | | - |
26 | | - |
27 | | - |
28 | | - |
29 | bool QPlatformInputContext::hasCapability(Capability capability) const | - |
30 | { | - |
31 | (void)capability; | - |
32 | return true; | - |
33 | } | - |
34 | | - |
35 | | - |
36 | | - |
37 | | - |
38 | | - |
39 | void QPlatformInputContext::reset() | - |
40 | { | - |
41 | } | - |
42 | | - |
43 | void QPlatformInputContext::commit() | - |
44 | { | - |
45 | } | - |
46 | | - |
47 | | - |
48 | | - |
49 | | - |
50 | void QPlatformInputContext::update(Qt::InputMethodQueries) | - |
51 | { | - |
52 | } | - |
53 | | - |
54 | | - |
55 | | - |
56 | | - |
57 | | - |
58 | | - |
59 | void QPlatformInputContext::invokeAction(QInputMethod::Action action, int cursorPosition) | - |
60 | { | - |
61 | (void)cursorPosition; | - |
62 | | - |
63 | | - |
64 | if (action == QInputMethod::Click) | - |
65 | reset(); | - |
66 | } | - |
67 | | - |
68 | | - |
69 | | - |
70 | | - |
71 | | - |
72 | | - |
73 | | - |
74 | bool QPlatformInputContext::filterEvent(const QEvent *event) | - |
75 | { | - |
76 | (void)event; | - |
77 | return false; | - |
78 | } | - |
79 | | - |
80 | | - |
81 | | - |
82 | | - |
83 | | - |
84 | QRectF QPlatformInputContext::keyboardRect() const | - |
85 | { | - |
86 | return QRectF(); | - |
87 | } | - |
88 | | - |
89 | | - |
90 | | - |
91 | | - |
92 | | - |
93 | | - |
94 | void QPlatformInputContext::emitKeyboardRectChanged() | - |
95 | { | - |
96 | QGuiApplication::inputMethod()->keyboardRectangleChanged(); | - |
97 | } | - |
98 | | - |
99 | | - |
100 | | - |
101 | | - |
102 | | - |
103 | bool QPlatformInputContext::isAnimating() const | - |
104 | { | - |
105 | return false; | - |
106 | } | - |
107 | | - |
108 | | - |
109 | | - |
110 | | - |
111 | | - |
112 | | - |
113 | void QPlatformInputContext::emitAnimatingChanged() | - |
114 | { | - |
115 | QGuiApplication::inputMethod()->animatingChanged(); | - |
116 | } | - |
117 | | - |
118 | | - |
119 | | - |
120 | | - |
121 | void QPlatformInputContext::showInputPanel() | - |
122 | { | - |
123 | } | - |
124 | | - |
125 | | - |
126 | | - |
127 | | - |
128 | void QPlatformInputContext::hideInputPanel() | - |
129 | { | - |
130 | } | - |
131 | | - |
132 | | - |
133 | | - |
134 | | - |
135 | bool QPlatformInputContext::isInputPanelVisible() const | - |
136 | { | - |
137 | return false; | - |
138 | } | - |
139 | | - |
140 | | - |
141 | | - |
142 | | - |
143 | | - |
144 | | - |
145 | void QPlatformInputContext::emitInputPanelVisibleChanged() | - |
146 | { | - |
147 | QGuiApplication::inputMethod()->visibleChanged(); | - |
148 | } | - |
149 | | - |
150 | QLocale QPlatformInputContext::locale() const | - |
151 | { | - |
152 | return qt_keymapper_private()->keyboardInputLocale; | - |
153 | } | - |
154 | | - |
155 | void QPlatformInputContext::emitLocaleChanged() | - |
156 | { | - |
157 | QGuiApplication::inputMethod()->localeChanged(); | - |
158 | } | - |
159 | | - |
160 | Qt::LayoutDirection QPlatformInputContext::inputDirection() const | - |
161 | { | - |
162 | return qt_keymapper_private()->keyboardInputDirection; | - |
163 | } | - |
164 | | - |
165 | void QPlatformInputContext::emitInputDirectionChanged(Qt::LayoutDirection newDirection) | - |
166 | { | - |
167 | QGuiApplication::inputMethod()->inputDirectionChanged(newDirection); | - |
168 | } | - |
169 | | - |
170 | | - |
171 | | - |
172 | | - |
173 | | - |
174 | void QPlatformInputContext::setFocusObject(QObject *object) | - |
175 | { | - |
176 | (void)object; | - |
177 | } | - |
178 | | - |
179 | | - |
180 | | - |
181 | | - |
182 | bool QPlatformInputContext::inputMethodAccepted() const | - |
183 | { | - |
184 | return QPlatformInputContextPrivate::s_inputMethodAccepted; | - |
185 | } | - |
186 | | - |
187 | bool QPlatformInputContextPrivate::s_inputMethodAccepted = false; | - |
188 | | - |
189 | void QPlatformInputContextPrivate::setInputMethodAccepted(bool accepted) | - |
190 | { | - |
191 | QPlatformInputContextPrivate::s_inputMethodAccepted = accepted; | - |
192 | } | - |
193 | | - |
194 | | - |
195 | | - |
196 | | - |
197 | | - |
198 | | - |
199 | void QPlatformInputContext::setSelectionOnFocusObject(const QPointF &anchorPos, const QPointF &cursorPos) | - |
200 | { | - |
201 | QObject *focus = (static_cast<QGuiApplication *>(QCoreApplication::instance()))->focusObject(); | - |
202 | if (!focusTRUE | never evaluated | FALSE | never evaluated |
) | 0 |
203 | return; never executed: return; | 0 |
204 | | - |
205 | QInputMethod *im = QGuiApplication::inputMethod(); | - |
206 | const QTransform mapToLocal = im->inputItemTransform().inverted(); | - |
207 | bool success; | - |
208 | int anchor = QInputMethod::queryFocusObject(Qt::ImCursorPosition, anchorPos * mapToLocal).toInt(&success); | - |
209 | if (successTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
210 | int cursor = QInputMethod::queryFocusObject(Qt::ImCursorPosition, cursorPos * mapToLocal).toInt(&success); | - |
211 | if (successTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
212 | QList<QInputMethodEvent::Attribute> imAttributes; | - |
213 | imAttributes.append(QInputMethodEvent::Attribute(QInputMethodEvent::Selection, anchor, cursor - anchor, QVariant())); | - |
214 | QInputMethodEvent event(QString(), imAttributes); | - |
215 | QGuiApplication::sendEvent(focus, &event); | - |
216 | } never executed: end of block | 0 |
217 | } never executed: end of block | 0 |
218 | } never executed: end of block | 0 |
219 | | - |
220 | | - |
| | |