-
Notifications
You must be signed in to change notification settings - Fork 84
/
Copy pathScatterWidget.h
executable file
·47 lines (37 loc) · 1.03 KB
/
ScatterWidget.h
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
#ifndef SCATTERWIDGET_H
#define SCATTERWIDGET_H
#include <qapplication.h>
#include <qwidget.h>
#include <qframe.h>
#include <complex>
class ComplexDataEvent;
class Pointplot;
class ScatterWidget
: public QFrame
{
Q_OBJECT
public:
ScatterWidget(QWidget* parent = 0);
virtual ~ScatterWidget();
public slots:
void customEvent( QEvent * e );
void setWidgetTitle(QString title);
void setWidgetAxisLabels(QString xLabel, QString yLabel);
void setWidgetXAxisScale(double xMin, double xMax);
void setWidgetYAxisScale(double yMin, double yMax);
void setWidgetXAxisAutoScale(bool on);
void setWidgetYAxisAutoScale(bool on);
protected:
virtual void timerEvent(QTimerEvent *event);
private:
void setData(ComplexDataEvent* e);
Pointplot* plot_;
struct opReal{double operator()(std::complex<double> i) const{return real(i);}};
struct opImag{double operator()(std::complex<double> i) const{return imag(i);}};
double* iData_;
double* qData_;
int numPoints_;
int timerId_;
bool haveNewData_;
};
#endif // SCATTERWIDGET_H