| 940 | } |
| 941 | |
| 942 | void 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 | |
| 954 | void RemoteViewWidget::resizeEvent(QResizeEvent *event) |
| 955 | { |