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

Method customPositionXChanged

src/frontend/dockwidgets/CartesianPlotLegendDock.cpp:413–424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

411}
412
413void CartesianPlotLegendDock::customPositionXChanged(double value) {
414 CONDITIONAL_RETURN_NO_LOCK;
415
416 for (auto* legend : m_legendList) {
417 auto position = legend->position();
418 if (position.horizontalPosition == WorksheetElement::HorizontalPosition::Relative)
419 position.point.setX(value / 100.);
420 else
421 position.point.setX(Worksheet::convertToSceneUnits(value, m_worksheetUnit));
422 legend->setPosition(position);
423 }
424}
425
426void CartesianPlotLegendDock::customPositionYChanged(double value) {
427 CONDITIONAL_RETURN_NO_LOCK;

Callers

nothing calls this directly

Calls 3

positionMethod · 0.80
setXMethod · 0.80
setPositionMethod · 0.45

Tested by

no test coverage detected