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

Method customPositionYChanged

src/frontend/dockwidgets/CartesianPlotLegendDock.cpp:426–437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

424}
425
426void CartesianPlotLegendDock::customPositionYChanged(double value) {
427 CONDITIONAL_RETURN_NO_LOCK;
428
429 for (auto* legend : m_legendList) {
430 auto position = legend->position();
431 if (position.verticalPosition == WorksheetElement::VerticalPosition::Relative)
432 position.point.setY(value / 100.);
433 else
434 position.point.setY(Worksheet::convertToSceneUnits(value, m_worksheetUnit));
435 legend->setPosition(position);
436 }
437}
438void CartesianPlotLegendDock::horizontalAlignmentChanged(int index) {
439 CONDITIONAL_LOCK_RETURN;
440

Callers

nothing calls this directly

Calls 3

positionMethod · 0.80
setYMethod · 0.80
setPositionMethod · 0.45

Tested by

no test coverage detected