#include "signaldisplay.h" #include #include SignalDisplay::SignalDisplay(QWidget *&parent):QWidget(parent) { colorTrace1 = Qt::blue; colorTrace2 = Qt::red; secsPerDiv = 1.0/600.0; voltsPerDiv = 20; setPointsPerPlot(10); } void SignalDisplay::setPointsPerPlot(int value) { pointsPerPlot = value; wave1 = new QPoint[pointsPerPlot]; wave2 = new QPoint[pointsPerPlot]; secsIdx1 = 0; secsIdx2 = 0; } void SignalDisplay::drawGrid(QPainter &p, QColor colorGrid, int x, int y, int w, int h, int nx, int ny){ p.setPen(colorGrid); for (int ix= 0; ix