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

Method initUI

gui/src/cursorcontroller.cpp:50–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48CursorController::~CursorController() {}
49
50void 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
70void CursorController::connectSignals(CursorSettings *cursorSettings)
71{

Callers

nothing calls this directly

Calls 15

QPointClass · 0.85
getFormatterMethod · 0.80
setXUnitsMethod · 0.80
getUnitsMethod · 0.80
setYUnitsMethod · 0.80
canvasMethod · 0.80
setAnchorPosMethod · 0.80
setContentPosMethod · 0.80
setAnchorOffsetMethod · 0.80
setRelativeMethod · 0.80
setVisibleMethod · 0.45
selectedChannelMethod · 0.45

Tested by

no test coverage detected