OpenCores
URL https://opencores.org/ocsvn/modular_oscilloscope/modular_oscilloscope/trunk

Subversion Repositories modular_oscilloscope

[/] [modular_oscilloscope/] [trunk/] [sw/] [src/] [data_plot.h] - Blame information for rev 60

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 60 budinero
#ifndef _DATA_PLOT_H
2
#define _DATA_PLOT_H 1
3
 
4
#include <qwt_plot.h>
5
#include <qwt_plot_curve.h>
6
#include <qwt_plot_grid.h>
7
#include <qwt_plot_marker.h>
8
//#include <qwt_picker.h>
9
#include <qwt_plot_picker.h>
10
#include <qwt_plot_rescaler.h>
11
 
12
//const int PLOT_SIZE = 600;      // 0 to 200
13
 
14
class DataPlot : public QwtPlot
15
{
16
    Q_OBJECT
17
 
18
 
19
    public:
20
        DataPlot(QWidget* = NULL);
21
        void updateDivs();
22
 
23
 
24
    public slots:
25
        //  void setTimerInterval(double interval);
26
        void enableTriggerLine(const bool &on, const  int &channel);
27
        void setTriggerLineValue(double val);
28
 
29
        void setCurveAColor(const QColor &color);
30
        void setCurveBColor(const QColor &color);
31
        void setPaused(const bool &pause);
32
        void curveAShow(const bool &show);
33
        void curveBShow(const bool &show);
34
        void curveAUpdate(QVector<double> time, QVector<double> chA);
35
        void curveBUpdate(QVector<double> time, QVector<double> chB);
36
 
37
        void curveASetLimits(const double &down, const double &up);
38
        void curveAZoom(const int &value);
39
        void curveAMove(const int &value);
40
        void curveAResetPos();
41
        void curveBSetLimits(const double &down, const double &up);
42
        void curveBZoom(const int &value);
43
        void curveBMove(const int &value);
44
        void curveBResetPos();
45
        void timeSetLimits(const double &min, const double &max);
46
        void timeZoom(const int &value);
47
        void timeMove(const int &value);
48
 
49
        void curveAShowGrid(const bool &on);
50
        void curveBShowGrid(const bool &on);
51
        void timeShowGrid(const bool &on);
52
 
53
 
54
 
55
 
56
    private:
57
        void alignScales();
58
        void elementZoom(const int &axisId, const int &value, const bool &move = 0);
59
        void elementSetLimits(const int &axisId, const double &min, const double &max);
60
        void elementShowGrid(const int &axisId, const bool &on);
61
 
62
        QwtPlotGrid *gridA;
63
        QwtPlotGrid *gridB;
64
 
65
        // QwtPlotGrid *gridB;
66
        bool paused;
67
        double aDiv;
68
        double bDiv;
69
        double tDiv;
70
 
71
        QwtPlotCurve *curveA;
72
        QwtPlotCurve *curveB;
73
        QwtPlotMarker *triggerLine;
74
        QwtPlotRescaler *aRescaler;
75
        QwtPlotRescaler *bRescaler;
76
        QwtPlotRescaler *tRescaler;
77
 
78
 
79
    signals:
80
        void tScaleDivChanged(double );
81
        void aScaleDivChanged(double );
82
        void bScaleDivChanged(double );
83
};
84
 
85
#endif
86
 
87
 
88
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.