Subversion Repositories Projects

Rev

Rev 750 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 750 Rev 801
1
/***************************************************************************
1
/***************************************************************************
2
 *   Copyright (C) 2009 by Manuel Schrape                                  *
2
 *   Copyright (C) 2009 by Manuel Schrape                                  *
3
 *   manuel.schrape@gmx.de                                                 *
3
 *   manuel.schrape@gmx.de                                                 *
4
 *                                                                         *
4
 *                                                                         *
5
 *   This program is free software; you can redistribute it and/or modify  *
5
 *   This program is free software; you can redistribute it and/or modify  *
6
 *   it under the terms of the GNU General Public License as published by  *
6
 *   it under the terms of the GNU General Public License as published by  *
7
 *   the Free Software Foundation; either version 2 of the License.        *
7
 *   the Free Software Foundation; either version 2 of the License.        *
8
 *                                                                         *
8
 *                                                                         *
9
 *   This program is distributed in the hope that it will be useful,       *
9
 *   This program is distributed in the hope that it will be useful,       *
10
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
10
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
11
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
11
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
12
 *   GNU General Public License for more details.                          *
12
 *   GNU General Public License for more details.                          *
13
 *                                                                         *
13
 *                                                                         *
14
 *   You should have received a copy of the GNU General Public License     *
14
 *   You should have received a copy of the GNU General Public License     *
15
 *   along with this program; if not, write to the                         *
15
 *   along with this program; if not, write to the                         *
16
 *   Free Software Foundation, Inc.,                                       *
16
 *   Free Software Foundation, Inc.,                                       *
17
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
17
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
18
 ***************************************************************************/
18
 ***************************************************************************/
19
#ifndef DLG_MAIN_H
19
#ifndef DLG_MAIN_H
20
#define DLG_MAIN_H
20
#define DLG_MAIN_H
21
 
21
 
22
#include <QtGui/QMainWindow>
22
#include <QtGui/QMainWindow>
23
#include <QtGui/QLineEdit>
23
#include <QtGui/QLineEdit>
24
#include <QtGui/QCheckBox>
24
#include <QtGui/QCheckBox>
25
#include <QtGui/QLabel>
25
#include <QtGui/QLabel>
26
#include <QtGui/QFont>
26
#include <QtGui/QFont>
27
 
27
 
28
#include <QTcpServer>
28
#include <QTcpServer>
29
#include <QTcpSocket>
29
#include <QTcpSocket>
30
 
30
 
31
#include <qwt_plot_curve.h>
31
#include <qwt_plot_curve.h>
32
#include <qwt_plot_grid.h>
32
#include <qwt_plot_grid.h>
33
#include <qwt_legend.h>
33
#include <qwt_legend.h>
34
#include <qwt_plot.h>
34
#include <qwt_plot.h>
35
 
35
 
36
#include "ui_dlg_Main.h"
36
#include "ui_dlg_Main.h"
37
 
37
 
-
 
38
#include "wgt_Index.h"
-
 
39
 
38
#include "../Defines.h"
40
#include "../Defines.h"
39
#include "../TypeDefs.h"
41
#include "../TypeDefs.h"
40
 
42
 
41
#include "../Classes/cSettings.h"
43
#include "../Classes/cSettings.h"
42
 
44
 
-
 
45
 
43
class dlg_Main : public QMainWindow, public Ui::dlg_Main_UI
46
class dlg_Main : public QMainWindow, public Ui::dlg_Main_UI
44
{
47
{
45
    Q_OBJECT
48
    Q_OBJECT
46
 
49
 
47
    public:
50
    public:
48
        dlg_Main();
51
        dlg_Main();
49
        ~dlg_Main();
52
        ~dlg_Main();
50
 
53
 
51
    private:
54
    private:
52
        // Settings-Object
55
        // Settings-Object
53
        cSettings *o_Settings;
56
        cSettings *o_Settings;
54
 
57
 
55
        QLabel    *lb_Debug[MAX_DebugData];
-
 
56
        QLineEdit *le_Debug[MAX_DebugData];
-
 
57
        QCheckBox *cb_Debug[MAX_DebugData];
58
        wgt_Index *wg_Index[MAX_DebugData];
58
        QFont      Font_1;
-
 
59
 
59
 
60
        // Info über die Hardware
60
        // Info über die Hardware
61
        s_Hardware gs_Version;
61
        s_Hardware gs_Version;
62
 
62
 
63
        // Datenspeicher zum Senden.
63
        // Datenspeicher zum Senden.
64
        char c_Data[150];
64
        char c_Data[150];
65
 
65
 
66
        s_MK_Debug gs_Debug;
66
        s_MK_Debug gs_Debug;
67
 
67
 
68
        int Debug_Data[MAX_DebugData];
68
        int Debug_Data[MAX_DebugData];
69
 
69
 
70
        // Plots für die Analogwerte
70
        // Plots für die Analogwerte
71
        QwtPlotCurve *Plot[MAX_DebugData];
71
        QwtPlotCurve *Plot[MAX_DebugData];
72
 
72
 
73
        // Datenspeicher für die Plots
73
        // Datenspeicher für die Plots
74
        double pl_Data[MAX_DebugData][50000];
74
        double pl_Data[MAX_DebugData][50000];
75
        double pl_ID[50000];
75
        double pl_ID[50000];
76
        int NextPlot;
76
        int NextPlot;
77
 
77
 
78
        // Programm-Initialisirungen
78
        // Programm-Initialisirungen
79
        void init_GUI();
79
        void init_GUI();
80
        void init_Connections();
80
        void init_Connections();
81
        void init_Plotter();
81
        void init_Plotter();
82
 
82
 
83
        void update_Plotter();
83
        void update_Plotter();
84
        void config_Plotter();
84
        void config_Plotter();
85
 
85
 
86
    private slots:
86
    private slots:
87
        void slot_ac_About();
87
        void slot_ac_About();
88
 
88
 
89
        void slot_ConnectionStatus(int li_Status);
89
        void slot_ConnectionStatus(int li_Status);
90
        void slot_MK_Version(s_Hardware ls_Version);
90
        void slot_MK_Version(s_Hardware ls_Version);
91
        void slot_MK_Debug(s_MK_Debug ls_Debug);
91
        void slot_MK_Debug(s_MK_Debug ls_Debug);
92
        void slot_MK_DebugLabels(s_MK_DebugLabels MK_DebugLabels);
92
        void slot_MK_DebugLabels(s_MK_DebugLabels MK_DebugLabels);
93
 
93
 
94
        void slot_ac_Plotter();
94
//        void slot_ac_Plotter();
95
        void slot_ac_Debug();
95
//        void slot_ac_Debug();
96
        void slot_ac_Chose();
96
//        void slot_ac_Chose();
97
 
97
 
98
        void slot_ac_ReadLabels();
98
        void slot_ac_ReadLabels();
99
 
99
 
100
        void slot_btn_ChoseOK();
100
        void slot_btn_ChoseOK();
101
 
101
 
102
        void slot_Plotter_Start();
102
        void slot_Plotter_Start();
103
        void slot_Plotter_Scroll(int Position);
103
        void slot_Plotter_Scroll(int Position);
104
};
104
};
105
 
105
 
106
#endif // DLG_MAIN_H
106
#endif // DLG_MAIN_H
107
 
107