forked from berndporr/qwt-example
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwindow.h
More file actions
52 lines (37 loc) · 1.05 KB
/
window.h
File metadata and controls
52 lines (37 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef WINDOW_H
#define WINDOW_H
#include <qwt/qwt_thermo.h>
#include <qwt/qwt_knob.h>
#include <qwt/qwt_plot.h>
#include <qwt/qwt_plot_curve.h>
#include <QBoxLayout>
// #include "adcreader.h"
// class definition 'Window'
class Window : public QWidget
{
// must include the Q_OBJECT macro for for the Qt signals/slots framework to work with this class
Q_OBJECT
public:
Window(); // default constructor - called when a Window is declared without arguments
~Window();
void timerEvent( QTimerEvent * );
public slots:
void setGain(double gain);
// internal variables for the window class
private:
QwtKnob *knob;
QwtThermo *thermo;
QwtPlot *plot;
QwtPlotCurve *curve;
// layout elements from Qt itself http://qt-project.org/doc/qt-4.8/classes.html
QVBoxLayout *vLayout; // vertical layout
QHBoxLayout *hLayout; // horizontal layout
static const int plotDataSize = 100;
// data arrays for the plot
double xData[plotDataSize];
double yData[plotDataSize];
double gain;
int count;
// ADCreader *adcreader;
};
#endif // WINDOW_H