Subversion Repositories Projects

Rev

Rev 674 | 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 <QTcpServer>
24
#include <QTcpSocket>
25
#include <QComboBox>
26
#include <QToolButton>
27
#include <QTimer>
28
 
29
#include "ui_dlg_Main.h"
30
 
31
#include "dlg_MotorMixer.h"
750 KeyOz 32
#include "dlg_MotorTest.h"
674 KeyOz 33
 
34
#include "../Defines.h"
35
#include "../TypeDefs.h"
36
 
37
#include "../Classes/cSettings.h"
38
 
39
class dlg_Main : public QMainWindow, public Ui::dlg_Main_UI
40
{
41
    Q_OBJECT
42
 
43
    public:
44
        dlg_Main();
45
        ~dlg_Main();
46
 
47
    private:
48
        QTimer *o_Timer;
49
 
50
        // Info ├╝ber die Hardware
750 KeyOz 51
        s_Hardware gs_Version;
674 KeyOz 52
 
53
        // Settings-Object
54
        cSettings *o_Settings;
55
 
56
        // MotorMixer GUI
57
        dlg_MotorMixer *f_MotorMixer;
58
 
750 KeyOz 59
        // MotorTest GUI
60
        dlg_MotorTest *f_MotorTest;
61
 
674 KeyOz 62
        char c_Data[150];
63
 
64
        // Programm-Initialisirungen
65
        void init_GUI();
66
        void init_Connections();
67
 
68
        void init_Directorys();
69
        s_Directorys s_Dir;
70
 
71
        void set_LED(QToolButton *ToolButton, bool On = false);
72
        int get_Value(QComboBox *Combo);
73
        QComboBox *setCombo(QComboBox *Combo, int Wert);
74
 
75
        void show_MK_Settings(s_MK_Settings t_Set);
76
        s_MK_Settings get_MK_Settings();
77
 
78
    private slots:
79
        void slot_Timer();
80
 
81
        void slot_ac_About();
750 KeyOz 82
        void slot_ac_Toolbar();
674 KeyOz 83
 
750 KeyOz 84
        void slot_ConnectionStatus(int li_Status);
85
        void slot_MK_Version(s_Hardware ls_Version);
86
        void slot_MK_ReadSettings(s_MK_Settings ps_MK_Settings);
87
        void slot_MK_WriteSettings(int pi_ID);
88
        void slot_MK_ReadMotorMixer(s_MK_Mixer ps_MK_MotorMixer);
89
        void slot_MK_WriteMotorMixer(int pi_ID);
90
        void slot_MK_PPMData(s_MK_PPM_Data ps_PPMData);
674 KeyOz 91
 
92
        void slot_ac_Write();
93
        void slot_ac_Read();
94
        void slot_ac_Save();
95
        void slot_ac_Load();
96
 
97
        void slot_ac_MotorMixer();
750 KeyOz 98
        void slot_ac_MotorTest();
674 KeyOz 99
 
100
        void slot_PageChange(int Page);
101
 
102
        void slot_LEDtoValue();
103
        void slot_ValuetoLED16(int Wert);
104
        void slot_ValuetoLED17(int Wert);
105
        void slot_ValuetoLED16A(int Wert);
106
        void slot_ValuetoLED17A(int Wert);
107
 
108
        void slot_tbUp();
109
        void slot_tbDown();
110
        void slot_tbLeft();
111
        void slot_tbRight();
112
};
113
 
114
#endif // DLG_MAIN_H