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}
never executed: end of block
0
8-
9-
10-
11-
12QPlatformInputContext::~QPlatformInputContext()-
13{-
14}-
15-
16-
17-
18-
19bool QPlatformInputContext::isValid() const-
20{-
21 return
never executed: return false;
false;
never executed: return false;
0
22}-
23-
24-
25-
26-
27-
28-
29bool QPlatformInputContext::hasCapability(Capability capability) const-
30{-
31 (void)capability;-
32 return
never executed: return true;
true;
never executed: return true;
0
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
action == QInputMethod::ClickDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
65 reset();
never executed: reset();
0
66}
never executed: end of block
0
67-
68-
69-
70-
71-
72-
73-
74bool QPlatformInputContext::filterEvent(const QEvent *event)-
75{-
76 (void)event;-
77 return
never executed: return false;
false;
never executed: return false;
0
78}-
79-
80-
81-
82-
83-
84QRectF QPlatformInputContext::keyboardRect() const-
85{-
86 return
never executed: return QRectF();
QRectF();
never executed: return QRectF();
0
87}-
88-
89-
90-
91-
92-
93-
94void QPlatformInputContext::emitKeyboardRectChanged()-
95{-
96 QGuiApplication::inputMethod()->keyboardRectangleChanged();-
97}
never executed: end of block
0
98-
99-
100-
101-
102-
103bool QPlatformInputContext::isAnimating() const-
104{-
105 return
never executed: return false;
false;
never executed: return false;
0
106}-
107-
108-
109-
110-
111-
112-
113void QPlatformInputContext::emitAnimatingChanged()-
114{-
115 QGuiApplication::inputMethod()->animatingChanged();-
116}
never executed: end of block
0
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
never executed: return false;
false;
never executed: return false;
0
138}-
139-
140-
141-
142-
143-
144-
145void QPlatformInputContext::emitInputPanelVisibleChanged()-
146{-
147 QGuiApplication::inputMethod()->visibleChanged();-
148}
never executed: end of block
0
149-
150QLocale QPlatformInputContext::locale() const-
151{-
152 return
never executed: return qt_keymapper_private()->keyboardInputLocale;
qt_keymapper_private()->keyboardInputLocale;
never executed: return qt_keymapper_private()->keyboardInputLocale;
0
153}-
154-
155void QPlatformInputContext::emitLocaleChanged()-
156{-
157 QGuiApplication::inputMethod()->localeChanged();-
158}
never executed: end of block
0
159-
160Qt::LayoutDirection QPlatformInputContext::inputDirection() const-
161{-
162 return
never executed: return qt_keymapper_private()->keyboardInputDirection;
qt_keymapper_private()->keyboardInputDirection;
never executed: return qt_keymapper_private()->keyboardInputDirection;
0
163}-
164-
165void QPlatformInputContext::emitInputDirectionChanged(Qt::LayoutDirection newDirection)-
166{-
167 QGuiApplication::inputMethod()->inputDirectionChanged(newDirection);-
168}
never executed: end of block
0
169-
170-
171-
172-
173-
174void QPlatformInputContext::setFocusObject(QObject *object)-
175{-
176 (void)object;-
177}
never executed: end of block
0
178-
179-
180-
181-
182bool QPlatformInputContext::inputMethodAccepted() const-
183{-
184 return
never executed: return QPlatformInputContextPrivate::s_inputMethodAccepted;
QPlatformInputContextPrivate::s_inputMethodAccepted;
never executed: return QPlatformInputContextPrivate::s_inputMethodAccepted;
0
185}-
186-
187bool QPlatformInputContextPrivate::s_inputMethodAccepted = false;-
188-
189void QPlatformInputContextPrivate::setInputMethodAccepted(bool accepted)-
190{-
191 QPlatformInputContextPrivate::s_inputMethodAccepted = accepted;-
192}
never executed: end of block
0
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