MCPcopy Create free account
hub / github.com/analogdevicesinc/scopy / removePlotChannel

Method removePlotChannel

gui/src/plotwidget.cpp:174–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172}
173
174void PlotWidget::removePlotChannel(PlotChannel *ch)
175{
176
177 m_plotChannels.removeAll(ch);
178 m_navigator->removeChannel(ch);
179 m_tracker->removeChannel(ch);
180
181 // QwtAxisId cannot be removed from QwtPlot
182 ch->yAxis()->setVisible(false);
183 if(m_selectedChannel == ch) {
184 if(m_plotChannels.size() > 0) {
185 selectChannel(m_plotChannels[0]);
186 } else {
187 selectChannel(nullptr);
188 }
189 }
190
191 ch->deinit();
192 Q_EMIT removedChannel(ch);
193}
194
195QList<PlotChannel *> PlotWidget::getChannels() { return m_plotChannels; }
196

Callers 4

deinitPlotComponentMethod · 0.45
deinitPlotComponentMethod · 0.45
~MonitorPlotCurveMethod · 0.45
clearPlotChannelsMethod · 0.45

Calls 4

removeChannelMethod · 0.45
setVisibleMethod · 0.45
yAxisMethod · 0.45
deinitMethod · 0.45

Tested by

no test coverage detected