MCPcopy Create free account
hub / github.com/KDAB/GammaRay / clampPanPosition

Method clampPanPosition

ui/remoteviewwidget.cpp:942–952  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

940}
941
942void RemoteViewWidget::clampPanPosition()
943{
944 if (m_x > width() / 2)
945 m_x = width() / 2;
946 else if (m_x + m_frame.sceneRect().width() * m_zoom < width() / 2.0)
947 m_x = width() / 2 - m_frame.sceneRect().width() * m_zoom;
948 if (m_y > height() / 2)
949 m_y = height() / 2;
950 else if (m_y + m_frame.sceneRect().height() * m_zoom < height() / 2.0)
951 m_y = height() / 2 - m_frame.sceneRect().height() * m_zoom;
952}
953
954void RemoteViewWidget::resizeEvent(QResizeEvent *event)
955{

Callers

nothing calls this directly

Calls 1

sceneRectMethod · 0.80

Tested by

no test coverage detected