Root/Examples/ADC/Scope-QT-src/mainwindow.h

1#ifndef MAINWINDOW_H
2#define MAINWINDOW_H
3
4#include <QtGui/QMainWindow>
5#include "ADCw.h"
6
7#define PI 3.14159265
8#define VrmsC 0.017
9#define VmC 0.4999
10
11namespace Ui
12{
13    class MainWindow;
14}
15
16class MainWindow : public QMainWindow
17{
18    Q_OBJECT
19
20public:
21    MainWindow(QWidget *parent = 0);
22    ~MainWindow();
23
24    bool getSign(int val){if(val<0) return 0; else return 1;}
25
26public slots:
27    void updateGraph();
28
29signals:
30    void refresh();
31
32private:
33    Ui::MainWindow *ui;
34    QTimer *timer1;
35    ADCw *ADC1;
36    bool CHANNEL;
37
38    bool sign1_CH1, sign2_CH1; ;
39    bool sign1_CH2, sign2_CH2;
40    int deltaCountCH1, deltaCountCH2;
41    int idxCH1, idxCH2;
42    double valCH1[200], valCH2[200];
43};
44
45#endif // MAINWINDOW_H
46

Archive Download this file

Branches:
master



interactive