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

Method horizontalPaddingChanged

src/frontend/dockwidgets/CartesianPlotDock.cpp:1331–1350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1329}
1330
1331void CartesianPlotDock::horizontalPaddingChanged(double value) {
1332 CONDITIONAL_RETURN_NO_LOCK;
1333
1334 double padding = Worksheet::convertToSceneUnits(value, m_worksheetUnit);
1335 for (auto* plot : m_plotList) {
1336 // if symmetric padding is active we also adjust the right padding.
1337 // start a macro in this case to only have one single entry on the undo stack.
1338 // TODO: ideally this is done in CartesianPlot and is completely transparent to CartesianPlotDock.
1339 const bool sym = m_plot->symmetricPadding();
1340 if (sym)
1341 plot->beginMacro(i18n("%1: set horizontal padding", plot->name()));
1342
1343 plot->setHorizontalPadding(padding);
1344
1345 if (sym) {
1346 plot->setRightPadding(padding);
1347 plot->endMacro();
1348 }
1349 }
1350}
1351
1352void CartesianPlotDock::rightPaddingChanged(double value) {
1353 CONDITIONAL_RETURN_NO_LOCK;

Callers

nothing calls this directly

Calls 5

beginMacroMethod · 0.80
setHorizontalPaddingMethod · 0.80
setRightPaddingMethod · 0.80
endMacroMethod · 0.80
nameMethod · 0.45

Tested by

no test coverage detected