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

Method setBoxPlots

src/frontend/dockwidgets/BoxPlotDock.cpp:131–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131void BoxPlotDock::setBoxPlots(QList<BoxPlot*> list) {
132 CONDITIONAL_LOCK_RETURN;
133 m_boxPlots = list;
134 m_boxPlot = list.first();
135 setAspects(list);
136 Q_ASSERT(m_boxPlot);
137 setModel();
138
139 QList<Background*> backgrounds;
140 QList<Line*> borderLines;
141 QList<Line*> medianLines;
142 QList<Line*> whiskersLines;
143 QList<Line*> whiskersCapLines;
144 for (auto* plot : m_boxPlots) {
145 backgrounds << plot->backgroundAt(0);
146 borderLines << plot->borderLineAt(0);
147 medianLines << plot->medianLineAt(0);
148 whiskersLines << plot->whiskersLine();
149 whiskersCapLines << plot->whiskersCapLine();
150 }
151 backgroundWidget->setBackgrounds(backgrounds);
152 borderLineWidget->setLines(borderLines);
153 medianLineWidget->setLines(medianLines);
154 whiskersLineWidget->setLines(whiskersLines);
155 whiskersCapLineWidget->setLines(whiskersCapLines);
156
157 // show the properties of the first box plot
158 ui.chkLegendVisible->setChecked(m_boxPlot->legendVisible());
159 ui.chkVisible->setChecked(m_boxPlot->isVisible());
160 load();
161 loadDataColumns();
162
163 updatePlotRangeList();
164
165 // SIGNALs/SLOTs
166 // general
167 connect(m_boxPlot, &BoxPlot::orientationChanged, this, &BoxPlotDock::plotOrientationChanged);
168 connect(m_boxPlot, &BoxPlot::variableWidthChanged, this, &BoxPlotDock::plotVariableWidthChanged);
169 connect(m_boxPlot, &BoxPlot::notchesEnabledChanged, this, &BoxPlotDock::plotNotchesEnabledChanged);
170 connect(m_boxPlot, &BoxPlot::dataColumnsChanged, this, &BoxPlotDock::plotDataColumnsChanged);
171 connect(m_boxPlot, &BoxPlot::widthFactorChanged, this, &BoxPlotDock::plotWidthFactorChanged);
172
173 // symbols
174 connect(m_boxPlot, &BoxPlot::jitteringEnabledChanged, this, &BoxPlotDock::plotJitteringEnabledChanged);
175
176 // whiskers
177 connect(m_boxPlot, &BoxPlot::whiskersTypeChanged, this, &BoxPlotDock::plotWhiskersTypeChanged);
178 connect(m_boxPlot, &BoxPlot::whiskersRangeParameterChanged, this, &BoxPlotDock::plotWhiskersRangeParameterChanged);
179 connect(m_boxPlot, &BoxPlot::whiskersCapSizeChanged, this, &BoxPlotDock::plotWhiskersCapSizeChanged);
180
181 //"Margin Plots"-Tab
182 connect(m_boxPlot, &BoxPlot::rugEnabledChanged, this, &BoxPlotDock::plotRugEnabledChanged);
183 connect(m_boxPlot, &BoxPlot::rugLengthChanged, this, &BoxPlotDock::plotRugLengthChanged);
184 connect(m_boxPlot, &BoxPlot::rugWidthChanged, this, &BoxPlotDock::plotRugWidthChanged);
185 connect(m_boxPlot, &BoxPlot::rugOffsetChanged, this, &BoxPlotDock::plotRugOffsetChanged);
186}
187
188void BoxPlotDock::setModel() {

Callers 1

Calls 8

borderLineAtMethod · 0.80
medianLineAtMethod · 0.80
whiskersLineMethod · 0.80
whiskersCapLineMethod · 0.80
setBackgroundsMethod · 0.80
setLinesMethod · 0.80
backgroundAtMethod · 0.45
isVisibleMethod · 0.45

Tested by

no test coverage detected