qplatforminputcontext.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/gui/kernel/qplatforminputcontext.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4QPlatformInputContext::QPlatformInputContext()-
5 : QObject(*(new QPlatformInputContextPrivate))-
6{-
7}-
8-
9-
10-
11-
12QPlatformInputContext::~QPlatformInputContext()-
13{-
14}-
15-
16-
17-
18-
19bool QPlatformInputContext::isValid() const-
20{-
21 return false;-
22}-
23-
24-
25-
26-
27-
28-
29bool QPlatformInputContext::hasCapability(Capability capability) const-
30{-
31 (void)capability;-
32 return true;-
33}-
34-
35-
36-
37-
38-
39void QPlatformInputContext::reset()-
40{-
41}-
42-
43void QPlatformInputContext::commit()-
44{-
45}-
46-
47-
48-
49-
50void QPlatformInputContext::update(Qt::InputMethodQueries)-
51{-
52}-
53-
54-
55-
56-
57-
58-
59void 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-
74bool QPlatformInputContext::filterEvent(const QEvent *event)-
75{-
76 (void)event;-
77 return false;-
78}-
79-
80-
81-
82-
83-
84QRectF QPlatformInputContext::keyboardRect() const-
85{-
86 return QRectF();-
87}-
88-
89-
90-
91-
92-
93-
94void QPlatformInputContext::emitKeyboardRectChanged()-
95{-
96 QGuiApplication::inputMethod()->keyboardRectangleChanged();-
97}-
98-
99-
100-
101-
102-
103bool QPlatformInputContext::isAnimating() const-
104{-
105 return false;-
106}-
107-
108-
109-
110-
111-
112-
113void QPlatformInputContext::emitAnimatingChanged()-
114{-
115 QGuiApplication::inputMethod()->animatingChanged();-
116}-
117-
118-
119-
120-
121void QPlatformInputContext::showInputPanel()-
122{-
123}-
124-
125-
126-
127-
128void QPlatformInputContext::hideInputPanel()-
129{-
130}-
131-
132-
133-
134-
135bool QPlatformInputContext::isInputPanelVisible() const-
136{-
137 return false;-
138}-
139-
140-
141-
142-
143-
144-
145void QPlatformInputContext::emitInputPanelVisibleChanged()-
146{-
147 QGuiApplication::inputMethod()->visibleChanged();-
148}-
149-
150QLocale QPlatformInputContext::locale() const-
151{-
152 return qt_keymapper_private()->keyboardInputLocale;-
153}-
154-
155void QPlatformInputContext::emitLocaleChanged()-
156{-
157 QGuiApplication::inputMethod()->localeChanged();-
158}-
159-
160Qt::LayoutDirection QPlatformInputContext::inputDirection() const-
161{-
162 return qt_keymapper_private()->keyboardInputDirection;-
163}-
164-
165void QPlatformInputContext::emitInputDirectionChanged(Qt::LayoutDirection newDirection)-
166{-
167 QGuiApplication::inputMethod()->inputDirectionChanged(newDirection);-
168}-
169-
170-
171-
172-
173-
174void QPlatformInputContext::setFocusObject(QObject *object)-
175{-
176 (void)object;-
177}-
178-
179-
180-
181-
182bool QPlatformInputContext::inputMethodAccepted() const-
183{-
184 return QPlatformInputContextPrivate::s_inputMethodAccepted;-
185}-
186-
187bool QPlatformInputContextPrivate::s_inputMethodAccepted = false;-
188-
189void QPlatformInputContextPrivate::setInputMethodAccepted(bool accepted)-
190{-
191 QPlatformInputContextPrivate::s_inputMethodAccepted = accepted;-
192}-
193-
194-
195-
196-
197-
198-
199void QPlatformInputContext::setSelectionOnFocusObject(const QPointF &anchorPos, const QPointF &cursorPos)-
200{-
201 QObject *focus = (static_cast<QGuiApplication *>(QCoreApplication::instance()))->focusObject();-
202 if (!focus
!focusDescription
TRUEnever evaluated
FALSEnever 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 (success
successDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
210 int cursor = QInputMethod::queryFocusObject(Qt::ImCursorPosition, cursorPos * mapToLocal).toInt(&success);-
211 if (success
successDescription
TRUEnever evaluated
FALSEnever 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-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9