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

Method PlotWidget

gui/src/plotwidget.cpp:57–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55using namespace scopy;
56
57PlotWidget::PlotWidget(QWidget *parent)
58 : QWidget(parent)
59{
60
61 m_selectedChannel = nullptr;
62 setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
63 m_plot = new QwtPlot(this);
64 m_plot->canvas()->setContentsMargins(0, 0, 0, 0);
65 m_layout = new QGridLayout(this);
66 m_layout->addWidget(m_plot, 1, 0);
67 m_layout->setSpacing(0);
68 m_layout->setMargin(0);
69 setLayout(m_layout);
70
71 m_plot->plotLayout()->setAlignCanvasToScales(true);
72 m_plot->plotLayout()->setCanvasMargin(0);
73 m_plot->plotLayout()->setSpacing(0);
74
75 setupAxes();
76 setupOpenGLCanvas();
77 setupNavigator();
78 setupPlotInfo();
79 setupPlotScales();
80 setupPlotButtonManager();
81
82 m_plot->canvas()->installEventFilter(this);
83 Style::setBackgroundColor(m_plot->canvas(), json::theme::background_plot, true);
84}
85
86void PlotWidget::setupNavigator()
87{

Callers

nothing calls this directly

Calls 4

canvasMethod · 0.80
addWidgetMethod · 0.45
setSpacingMethod · 0.45

Tested by

no test coverage detected