MCPcopy Create free account
hub / github.com/KDE/kwin / pointerMotion

Method pointerMotion

src/debug_console.cpp:188–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186DebugConsoleFilter::~DebugConsoleFilter() = default;
187
188void DebugConsoleFilter::pointerMotion(PointerMotionEvent *event)
189{
190 QString text = s_hr;
191 const QString timestamp = timestampRow(event->timestamp);
192
193 text.append(s_tableStart);
194 text.append(tableHeaderRow(i18nc("A mouse pointer motion event", "Pointer Motion")));
195 text.append(deviceRow(event->device));
196 text.append(timestamp);
197 text.append(timestampRowUsec(event->timestamp));
198 if (!event->delta.isNull()) {
199 text.append(tableRow(i18nc("The relative mouse movement", "Delta"),
200 QStringLiteral("%1/%2").arg(event->delta.x()).arg(event->delta.y())));
201 }
202 if (!event->deltaUnaccelerated.isNull()) {
203 text.append(tableRow(i18nc("The relative mouse movement", "Delta (not accelerated)"),
204 QStringLiteral("%1/%2").arg(event->deltaUnaccelerated.x()).arg(event->deltaUnaccelerated.y())));
205 }
206 text.append(tableRow(i18nc("The global mouse pointer position", "Global Position"), QStringLiteral("%1/%2").arg(event->position.x()).arg(event->position.y())));
207 text.append(s_tableEnd);
208
209 m_textEdit->insertHtml(text);
210 m_textEdit->ensureCursorVisible();
211}
212
213void DebugConsoleFilter::pointerButton(PointerButtonEvent *event)
214{

Callers

nothing calls this directly

Calls 9

timestampRowFunction · 0.85
tableHeaderRowFunction · 0.85
deviceRowFunction · 0.85
timestampRowUsecFunction · 0.85
tableRowFunction · 0.85
appendMethod · 0.80
isNullMethod · 0.45
xMethod · 0.45
yMethod · 0.45

Tested by

no test coverage detected