~arcachofo/simulide/trunk

« back to all changes in this revision

Viewing changes to src/gui/dataplotwidget/plotdisplay.h

  • Committer: arcachofo
  • Date: 2021-03-02 17:54:55 UTC
  • Revision ID: arcachofo@simulide.com-20210302175455-0rvxfhloaeeyb3px
Added Logic Analizer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#ifndef PLOTDISPLAY_H
21
21
#define PLOTDISPLAY_H
22
22
 
 
23
#include <QPixmap>
23
24
#include <QtWidgets>
24
25
 
25
26
class PlotDisplay : public QWidget
26
27
{
 
28
    friend class DataPlotWidget;
 
29
    friend class PlotBase;
 
30
 
27
31
    Q_OBJECT
28
32
 
29
33
    public:
30
34
        PlotDisplay( QWidget* parent = 0 );
31
35
 
32
36
        void setExpand( bool expand ) { m_expand = expand; }
33
 
        void hideChannel( int ch, bool hide ) { m_hideCh[ch] = hide; }
 
37
         void hideChannel( int ch, bool hide ) { m_hideCh[ch] = hide; }
34
38
        int tracks() { return m_tracks; }
 
39
        void setChannels( int ch );
35
40
        void setTracks( int tracks );
36
41
        void setColor( int ch, QColor color );
37
42
        void setData( int ch, QList<QPointF>* data );
45
50
        void updateValues();
46
51
 
47
52
    protected:
48
 
        virtual void paintEvent( QPaintEvent* event );
 
53
        virtual void paintEvent( QPaintEvent *event );
49
54
 
50
55
    private:
51
56
        void drawBackground( QPainter *p );
52
57
 
53
 
        QList<QPointF>* m_data[4];
 
58
        QList<QPointF>* m_data[8];
54
59
 
55
60
        bool m_expand;
56
61
 
 
62
        int m_channels;
57
63
        int m_tracks;
58
64
        int m_trackScl;
59
65
 
60
66
        double m_sizeX;
61
67
        double m_sizeY;
 
68
 
62
69
        double m_hCenter;
63
70
        double m_vCenter;
64
71
        double m_marginX;
65
72
        double m_marginY;
66
 
        double m_scaleY[4];
 
73
        //double m_scaleY[8];
67
74
        double m_scaleX;
68
75
 
69
 
        double m_volt[4];
70
 
        double m_vMaxVal[4];
71
 
        double m_vMinVal[4];
72
 
        double m_vMin[4];
73
 
        double m_ampli[4];
74
 
        double m_vTick[4];
75
 
        double m_vPos[4];
76
 
        int64_t m_hPos[4];
77
 
        bool   m_hideCh[4];
 
76
        double m_volt[8];
 
77
        double m_vMaxVal[8];
 
78
        double m_vMinVal[8];
 
79
        double m_vMin[8];
 
80
        double m_ampli[8];
 
81
        double m_vTick[8];
 
82
        double m_vPos[8];
 
83
        int64_t m_hPos[8];
 
84
        bool   m_hideCh[8];
78
85
 
79
86
        double m_ceroX ;
80
87
        double m_endX;
82
89
        double m_endS;
83
90
        double m_lineX;
84
91
 
85
 
        double m_sclY[4];
86
 
        double m_posY[4];
87
 
        double m_vMaxPos[4];
88
 
        double m_vMinPos[4];
 
92
        double m_sclY[8];
 
93
        double m_posY[8];
 
94
        double m_vMaxPos[8];
 
95
        double m_vMinPos[8];
89
96
 
90
97
        QFont m_fontB;
91
98
        QFont m_fontS;
92
 
        QColor m_color[5];
 
99
        QColor m_color[8];
93
100
        QColor m_dark[2];
94
101
        QColor m_scaleColor[3];
95
102
};