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

Method onSelectedChannel

gui/src/cursorcontroller.cpp:175–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173}
174
175void 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
191void CursorController::onRemovedChannel(PlotChannel *ch)
192{

Callers

nothing calls this directly

Calls 11

getFormatterMethod · 0.80
setXUnitsMethod · 0.80
getUnitsMethod · 0.80
setYUnitsMethod · 0.80
scaleDrawMethod · 0.80
xAxisMethod · 0.45
yAxisMethod · 0.45
setXFormatterMethod · 0.45
setYFormatterMethod · 0.45
setColorMethod · 0.45
getColorMethod · 0.45

Tested by

no test coverage detected