-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathploter.h
62 lines (49 loc) · 1.4 KB
/
ploter.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef PLOTER_H
#define PLOTER_H
#include <qframe.h>
#include <qwt_plot.h>
#include <qwt_plot_curve.h>
#include <qwt_series_data.h>
#include <qwt_plot_zoomer.h>
typedef struct complex_float
{
float re;
float im;
}complex_float;
class Ploter //: public QwtPlot
{
public:
int mode;
bool autoscale;
bool interpolate;
QwtPlot* plot;
enum Mode { IMAG, REAL, ABS };
QColor* pal;
#define MAX_POINTS 2000
double x[MAX_POINTS], y1[MAX_POINTS], y2[MAX_POINTS]; // x and y values
long curve[16];
QwtPlotCurve* d_curves[16];
//SignalData* d_data[16];
QVector< double > vx[16];
QVector< double > vy[16];
static Ploter* instance;
static Ploter* getInstance();
QwtPlotZoomer* zoomer;
Ploter(QWidget* parent);
void setZoomer();
void setXY(int n, double px, double py);
void setXYonly(int n, double px, double py);
void clearvals(int n);
void set_mode(int m) { mode = m; }
void set_curves_count(int N);
void set_interpolation(bool flag);
void set_autoscale(bool flag);
void rand_test();
void update_data();
void reset();
void magnitude(double level);
void title(char* name);
void out_complex(complex_float** s_in, int Ndd, int j);
void out_complex2(complex_float*** s_in, int Ndd, int Nl, int j);
};
#endif