| 173 | } |
| 174 | |
| 175 | void CursorController::onSelectedChannel(PlotChannel *ch) |
| 176 | { |
| 177 | PlotAxis *xAxis = m_plot->xAxis(); |
| 178 | PlotAxis *yAxis = m_plot->yAxis(); |
| 179 | if(ch != nullptr) { |
| 180 | xAxis = ch->xAxis(); |
| 181 | yAxis = ch->yAxis(); |
| 182 | } |
| 183 | |
| 184 | plotCursorReadouts->setXFormatter(xAxis->getFormatter()); |
| 185 | plotCursorReadouts->setYFormatter(yAxis->getFormatter()); |
| 186 | plotCursorReadouts->setXUnits(xAxis->getUnits()); |
| 187 | plotCursorReadouts->setYUnits(yAxis->getUnits()); |
| 188 | plotCursorReadouts->setColor(yAxis->scaleDraw()->getColor()); |
| 189 | } |
| 190 | |
| 191 | void CursorController::onRemovedChannel(PlotChannel *ch) |
| 192 | { |
nothing calls this directly
no test coverage detected