MCPcopy Create free account
hub / github.com/KDE/labplot / processResize

Method processResize

src/frontend/worksheet/WorksheetView.cpp:1166–1174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1164}
1165
1166void WorksheetView::processResize() {
1167 if (size() != sceneRect().size()) {
1168 static const float hscale = GuiTools::dpi(this).first / (Worksheet::convertToSceneUnits(1, Worksheet::Unit::Inch));
1169 static const float vscale = GuiTools::dpi(this).second / (Worksheet::convertToSceneUnits(1, Worksheet::Unit::Inch));
1170 m_worksheet->setUndoAware(false);
1171 m_worksheet->setPageRect(QRectF(0.0, 0.0, width() / hscale, height() / vscale));
1172 m_worksheet->setUndoAware(true);
1173 }
1174}
1175
1176void WorksheetView::changeZoom(QAction* action) {
1177 zoomFitNoneAction->setChecked(true);

Callers 4

resizeEventMethod · 0.95
useViewSizeChangedMethod · 0.95
~PresenterWidgetMethod · 0.80
TestResizeWindowsMethod · 0.80

Calls 5

sizeFunction · 0.85
QRectFClass · 0.85
setUndoAwareMethod · 0.80
setPageRectMethod · 0.80
sizeMethod · 0.45

Tested by 1

TestResizeWindowsMethod · 0.64