Root/Examples/ADC/Test-QT-src/signaldisplay.h

Source at commit 9d578912b727722b22319832985451a79ec35747 created 13 years 27 days ago.
By Juan64Bits, Updating prototype of SIE code generator.
1#ifndef SIGNALDISPLAY_H
2#define SIGNALDISPLAY_H
3
4#include <QWidget>
5#include <cmath>
6#include <QtGui>
7
8class SignalDisplay : public QWidget
9{
10public:
11    SignalDisplay(QWidget *&parent);
12    void addPoints(int idx, int value);
13    void setSecsPerDiv( float value ){ secsPerDiv = fabs(value);}
14    void setVoltsPerDiv( float value ){ voltsPerDiv = fabs(value);}
15    float getSecsPerDiv(){ return secsPerDiv; }
16    void setPointsPerPlot(int value);
17    void setColorTraces(QColor color, int idx){colorTraces[idx]=color;}
18    void setNumSig(int value);
19
20private:
21    void paintEvent(QPaintEvent *event);
22    void drawGrid(QPainter &p, QColor colorGrid, int x, int y, int w, int h, int nx, int ny);
23    QPoint **waves;
24    float voltsPerDiv;
25    float secsPerDiv;
26    QColor *colorTraces;
27    int *secsIdx;
28    int w, h, ox, oy;
29    int pointsPerPlot;
30    int numSig;
31};
32
33#endif // SIGNALDISPLAY_H
34

Archive Download this file

Branches:
master



interactive