MCPcopy Create free account
hub / github.com/KDE/gwenview / cursorPosition

Method cursorPosition

lib/documentview/documentview.cpp:432–444  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

430 }
431
432 QPointF cursorPosition()
433 {
434 const QGraphicsScene *sc = q->scene();
435 if (sc) {
436 const auto views = sc->views();
437 for (const QGraphicsView *view : views) {
438 if (view->underMouse()) {
439 return q->mapFromScene(view->mapFromGlobal(QCursor::pos()));
440 }
441 }
442 }
443 return QPointF(-1, -1);
444 }
445};
446
447DocumentView::DocumentView(QGraphicsScene *scene)

Callers 9

DocumentViewMethod · 0.80
toggleZoomToFitMethod · 0.80
setZoomToFillMethod · 0.80
toggleZoomToFillMethod · 0.80
zoomActualSizeMethod · 0.80
zoomInMethod · 0.80
zoomContinuousMethod · 0.80
zoomOutMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected