MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / mousePressEvent

Method mousePressEvent

app/src/UI/Widgets/GPS.cpp:1202–1211  ·  view source on GitHub ↗

* @brief Records mouse position for dragging logic. */

Source from the content-addressed store, hash-verified

1200 * @brief Records mouse position for dragging logic.
1201 */
1202void Widgets::GPS::mousePressEvent(QMouseEvent* event)
1203{
1204 if (!autoCenter()) {
1205 m_lastMousePos = event->pos();
1206
1207 grabMouse();
1208 setCursor(Qt::ClosedHandCursor);
1209 event->accept();
1210 }
1211}
1212
1213/**
1214 * @brief Handles mouse release events to stop dragging and reset cursor.

Callers

nothing calls this directly

Calls 2

posMethod · 0.80
acceptMethod · 0.80

Tested by

no test coverage detected