| 157 | } |
| 158 | |
| 159 | void PlotWidget::addPlotChannel(PlotChannel *ch) |
| 160 | { |
| 161 | ch->init(); |
| 162 | m_plotChannels.append(ch); |
| 163 | if(m_selectedChannel == nullptr) { |
| 164 | selectChannel(ch); |
| 165 | } |
| 166 | |
| 167 | connect(ch, &PlotChannel::doReplot, this, &PlotWidget::replot); |
| 168 | connect(ch, &PlotChannel::attachCurve, this, [=](QwtPlotCurve *curve) { curve->attach(m_plot); }); |
| 169 | m_navigator->addChannel(ch); |
| 170 | m_tracker->addChannel(ch); |
| 171 | Q_EMIT addedChannel(ch); |
| 172 | } |
| 173 | |
| 174 | void PlotWidget::removePlotChannel(PlotChannel *ch) |
| 175 | { |
no test coverage detected