| 55 | using namespace scopy; |
| 56 | |
| 57 | PlotWidget::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 | |
| 86 | void PlotWidget::setupNavigator() |
| 87 | { |
nothing calls this directly
no test coverage detected