Subversion Repositories Projects

Rev

Details | Last modification | View Log | RSS feed

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