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

Method bindingChanged

src/frontend/dockwidgets/CartesianPlotLegendDock.cpp:464–497  ·  view source on GitHub ↗

! * \brief CartesianPlotLegendDock::bindingChanged * Bind CartesianPlotLegend to the cartesian plot coords or not * \param checked */

Source from the content-addressed store, hash-verified

462 * \param checked
463 */
464void CartesianPlotLegendDock::bindingChanged(bool checked) {
465 // widgets for positioning using absolute plot distances
466 ui.lPositionX->setVisible(!checked);
467 ui.cbPositionX->setVisible(!checked);
468 ui.sbPositionX->setVisible(!checked);
469
470 ui.lPositionY->setVisible(!checked);
471 ui.cbPositionY->setVisible(!checked);
472 ui.sbPositionY->setVisible(!checked);
473
474 // widgets for positioning using logical plot coordinates
475 const auto* plot = static_cast<const CartesianPlot*>(m_legend->parent(AspectType::CartesianPlot));
476 if (plot && plot->xRangeFormatDefault() == RangeT::Format::DateTime) {
477 ui.lPositionXLogicalDateTime->setVisible(checked);
478 ui.dtePositionXLogical->setVisible(checked);
479
480 ui.lPositionXLogical->setVisible(false);
481 ui.sbPositionXLogical->setVisible(false);
482 } else {
483 ui.lPositionXLogicalDateTime->setVisible(false);
484 ui.dtePositionXLogical->setVisible(false);
485
486 ui.lPositionXLogical->setVisible(checked);
487 ui.sbPositionXLogical->setVisible(checked);
488 }
489
490 ui.lPositionYLogical->setVisible(checked);
491 ui.sbPositionYLogical->setVisible(checked);
492
493 CONDITIONAL_LOCK_RETURN;
494
495 for (auto* legend : m_legendList)
496 legend->setCoordinateBindingEnabled(checked);
497}
498
499// "Border"-tab
500void CartesianPlotLegendDock::borderCornerRadiusChanged(double value) {

Callers

nothing calls this directly

Calls 4

xRangeFormatDefaultMethod · 0.80
setVisibleMethod · 0.45
parentMethod · 0.45

Tested by

no test coverage detected