| 172 | } |
| 173 | |
| 174 | void 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 | |
| 195 | QList<PlotChannel *> PlotWidget::getChannels() { return m_plotChannels; } |
| 196 |
no test coverage detected