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

Method setReferenceRanges

src/frontend/dockwidgets/ReferenceRangeDock.cpp:45–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45void ReferenceRangeDock::setReferenceRanges(QList<ReferenceRange*> list) {
46 CONDITIONAL_LOCK_RETURN;
47 m_rangeList = list;
48 m_range = list.first();
49 setAspects(list);
50 Q_ASSERT(m_range);
51
52 // initialize widgets for common properties
53 QList<Line*> lines;
54 QList<Background*> backgrounds;
55 for (auto* range : m_rangeList) {
56 lines << range->line();
57 backgrounds << range->background();
58 }
59 lineWidget->setLines(lines);
60 backgroundWidget->setBackgrounds(backgrounds);
61
62 // show the properties of the first reference range
63 this->load();
64
65 updatePlotRangeList();
66
67 // SIGNALs/SLOTs
68 connect(m_range, &ReferenceRange::orientationChanged, this, &ReferenceRangeDock::rangeOrientationChanged);
69 connect(m_range, &ReferenceRange::positionLogicalStartChanged, this, &ReferenceRangeDock::rangePositionLogicalStartChanged);
70 connect(m_range, &ReferenceRange::positionLogicalEndChanged, this, &ReferenceRangeDock::rangePositionLogicalEndChanged);
71}
72
73/*
74 * updates the locale in the widgets. called when the application settings are changed.

Callers 1

Calls 5

loadMethod · 0.95
setLinesMethod · 0.80
setBackgroundsMethod · 0.80
lineMethod · 0.45
backgroundMethod · 0.45

Tested by

no test coverage detected