Hardware Design: SIE
Sign in or create your account | Project List | Help
Hardware Design: SIE Git Source Tree
Root/
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 | |
8 | class SignalDisplay : public QWidget |
9 | { |
10 | public: |
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 | |
20 | private: |
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 |
Branches:
master