| 48 | CursorController::~CursorController() {} |
| 49 | |
| 50 | void CursorController::initUI() |
| 51 | { |
| 52 | plotCursors = new PlotCursors(m_plot, this); |
| 53 | plotCursors->setVisible(false); |
| 54 | |
| 55 | plotCursorReadouts = new PlotCursorReadouts(m_plot); |
| 56 | PlotChannel *ch = m_plot->selectedChannel(); |
| 57 | if(ch != nullptr) { |
| 58 | plotCursorReadouts->setXFormatter(ch->xAxis()->getFormatter()); |
| 59 | plotCursorReadouts->setYFormatter(ch->yAxis()->getFormatter()); |
| 60 | plotCursorReadouts->setXUnits(ch->xAxis()->getUnits()); |
| 61 | plotCursorReadouts->setYUnits(ch->yAxis()->getUnits()); |
| 62 | } |
| 63 | hoverReadouts = new HoverWidget(plotCursorReadouts, m_plot->plot()->canvas(), m_plot); |
| 64 | hoverReadouts->setAnchorPos(HoverPosition::HP_BOTTOMRIGHT); |
| 65 | hoverReadouts->setContentPos(HoverPosition::HP_TOPLEFT); |
| 66 | hoverReadouts->setAnchorOffset(QPoint(-10, -10)); |
| 67 | hoverReadouts->setRelative(true); |
| 68 | } |
| 69 | |
| 70 | void CursorController::connectSignals(CursorSettings *cursorSettings) |
| 71 | { |
nothing calls this directly
no test coverage detected