MCPcopy Create free account
hub / github.com/XRay3D/GERBER_X3 / getViewRect

Method getViewRect

static_libs/graphicsview/graphicsview.cpp:272–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270}
271
272QRectF GraphicsView::getViewRect()
273{
274 QPointF topLeft(horizontalScrollBar()->value(), verticalScrollBar()->value());
275 QPointF bottomRight(topLeft + viewport()->rect().bottomRight());
276
277#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
278 QRectF visible_scene_rect(matrix().inverted().mapRect({ topLeft, bottomRight }));
279#else
280 QRectF visible_scene_rect(transform().inverted().mapRect({ topLeft, bottomRight }));
281#endif
282
283 return visible_scene_rect;
284}
285
286void GraphicsView::wheelEvent(QWheelEvent* event)
287{

Callers

nothing calls this directly

Calls 2

rectMethod · 0.80
valueMethod · 0.45

Tested by

no test coverage detected