2108 |
paro |
1 |
#ifndef SCOPE_H |
|
|
2 |
#define SCOPE_H |
|
|
3 |
|
|
|
4 |
#include <QWidget> |
|
|
5 |
#include <QTimer> |
|
|
6 |
#include <QSlider> |
|
|
7 |
#include <stdint.h> |
|
|
8 |
|
|
|
9 |
class Scope : public QWidget |
|
|
10 |
{ |
|
|
11 |
Q_OBJECT |
|
|
12 |
|
|
|
13 |
public: |
|
|
14 |
Scope(QWidget *parent = 0); |
|
|
15 |
~Scope(); |
|
|
16 |
|
|
|
17 |
public slots: |
|
|
18 |
void getData(); |
|
|
19 |
void setScale(int val); |
|
|
20 |
void setShift(int val); |
|
|
21 |
|
|
|
22 |
protected: |
|
|
23 |
void paintEvent(QPaintEvent *event); |
|
|
24 |
|
|
|
25 |
private: |
|
|
26 |
int * data; |
|
|
27 |
char dataAquired; |
|
|
28 |
int head; |
|
|
29 |
|
|
|
30 |
long shift, scale; |
|
|
31 |
|
|
|
32 |
QTimer *updateTimer; |
|
|
33 |
QSlider *shiftSlider; |
|
|
34 |
QSlider *scaleSlider; |
|
|
35 |
}; |
|
|
36 |
|
|
|
37 |
#endif |