Subversion Repositories Projects

Rev

Rev 674 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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