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

Subversion Repositories modular_oscilloscope

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 60 budinero
#ifndef RVIBOARDTOOLS_H
2
#define RVIBOARDTOOLS_H
3
 
4
 
5
#include <QtGui/QWidget>
6
#include <QString>
7
#include <QTimer>
8
#include <QVector>
9
#include <QString>
10
//#include <qwt_array.h> // ??
11
#include "rvicommthread.h"
12
 
13
 
14
 
15
namespace Ui
16
{
17
    class RVIBoardTools;
18
}
19
 
20
class RVIBoardTools : public QWidget
21
{
22
    Q_OBJECT
23
 
24
public:
25
 
26
    enum VariableType
27
    {
28
        Time = 0,
29
        ChannelA = 1,
30
        ChannelB = 2
31
    };
32
 
33
    RVIBoardTools(QWidget *parent = 0);
34
    ~RVIBoardTools();
35
    void setDefaultValues();
36
 
37
    QVector<double> getData(VariableType var = Time);
38
 
39
 
40
signals:
41
    // ch A
42
    void channelAEnabled(bool set);
43
    void channelAData(QVector<double> time, QVector<double> chA);
44
    void channelAColorChanged(QColor );
45
    void channelAChangeDiv(int value);
46
    void channelAMove(int value);
47
    void channelAResetPos();
48
    // ch B
49
    void channelBEnabled(bool set);
50
    void channelBData(QVector<double> time, QVector<double> chB);
51
    void channelBColorChanged(QColor );
52
    void channelBChangeDiv(int value);
53
    void channelBMove(int value);
54
    void channelBResetPos();
55
    // time
56
    void timeChangeDiv(int value);
57
    void timeMove(int value);
58
    void timeChangeLimits(double, double);
59
     // trigger
60
    void showTriggerLine(bool, int);
61
    void changeTriggerValue(double);
62
    // adq
63
    void statusChanged(QString);
64
    void stopAcquistion();
65
 
66
 
67
private:
68
    Ui::RVIBoardTools *ui;
69
 
70
 
71
    RVICommThread *board;
72
    QTimer *slidersTimer;
73
    QTimer *dataTimer;
74
 
75
    QVector<double> *dataAVec;
76
    QVector<double> *dataBVec;
77
    QVector<double> *timeVec;
78
    QList<int> data;
79
 
80
    short int confTScal;
81
    bool confTScalEn;
82
 
83
    bool paused;
84
 
85
    double chAVoltMultiplier;
86
    double chBVoltMultiplier;
87
    double chAOffset;
88
    double chBOffset;
89
 
90
 
91
public slots:
92
     void setChannelADiv(double div);
93
     void setChannelBDiv(double div);
94
     void setTimeDiv(double div);
95
     void setPaused(const bool &on);
96
 
97
private slots:
98
    // Actions from UI
99
    // chA
100
    void on_trigBox_toggled(bool );
101
    void on_sampleTimeCombo_currentIndexChanged(int index);
102
    void on_trigLevelSpinBox_valueChanged(int );
103
    void on_trigOffsetSpinBox_valueChanged(int );
104
    void on_trigSlopeCombo_currentIndexChanged(int index);
105
    void on_channelAColorButton_clicked();
106
    void on_channelABox_toggled(bool set);
107
    void on_channelAZoomSlider_valueChanged(int value);
108
    void on_channelAZoomSlider_sliderReleased();
109
    void on_channelAResetButton_pressed();
110
    void on_channelAPosSlider_sliderReleased();
111
    void on_channelAPosSlider_valueChanged(int value);
112
    void on_channelAAutoButton_toggled(bool checked);
113
    // chB
114
    void on_channelBColorButton_clicked();
115
    void on_channelBBox_toggled(bool set);
116
    void on_channelBPosSlider_sliderReleased();
117
    void on_channelBResetButton_pressed();
118
    void on_channelBAutoButton_toggled(bool checked);
119
    void on_channelBZoomSlider_sliderReleased();
120
    void on_channelBZoomSlider_valueChanged(int value);
121
    void on_channelBPosSlider_valueChanged(int value);
122
    // Trigg
123
    void on_trigSouceCombo_currentIndexChanged(int index);
124
    void on_trigLineCheck_toggled(bool checked);
125
    void on_timeAutoButton_toggled(bool checked);
126
    void on_trigLevelSlider_valueChanged(int value);
127
    // Time
128
    void on_timePosSlider_valueChanged(int value);
129
    void on_timePosSlider_sliderReleased();
130
    void on_timeZoomSlider_sliderReleased();
131
    void on_adcSampleButton_clicked();
132
    void on_timeZoomSlider_valueChanged(int value);
133
    void on_bufferSpinBox_valueChanged(int value);
134
    // aqc
135
    void on_singleButton_toggled(bool checked);
136
    void on_runButton_toggled(bool checked);
137
 
138
 
139
 
140
    void setVoltMultipliers();
141
    void updateSlidersValues();
142
    void uncheckRunButtons();
143
 
144
    void startAcquisition(const bool &continuous = true);
145
    void stop();
146
    void showResults();
147
    void sendStatusMessage(const QString &status);
148
    void updateTimeVec();
149
    void fillTriggerCombo();
150
    void fillSampleTimeCombo();
151
 
152
 
153
};
154
 
155
#endif // RVIBOARDTOOLS_H

powered by: WebSVN 2.1.0

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