Go to most recent revision | Details | 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" |
||
32 | |||
33 | #include "../Defines.h" |
||
34 | #include "../TypeDefs.h" |
||
35 | |||
36 | #include "../Classes/cSettings.h" |
||
37 | |||
38 | #include "../../Global/Kopter.h" |
||
39 | #include "../../Global/MK_Datatypes.h" |
||
40 | #include "../../Global/Class_Input/Input.h" |
||
41 | #include "../../Global/Class_Input/Input_TCP.h" |
||
42 | #include "../../Global/Class_Input/Input_TTY.h" |
||
43 | #include "../../Global/Class_HandlerIP/HandlerIP.h" |
||
44 | #include "../../Global/Class_HandlerMK/HandlerMK.h" |
||
45 | |||
46 | class dlg_Main : public QMainWindow, public Ui::dlg_Main_UI |
||
47 | { |
||
48 | Q_OBJECT |
||
49 | |||
50 | public: |
||
51 | dlg_Main(); |
||
52 | ~dlg_Main(); |
||
53 | |||
54 | private: |
||
55 | QTimer *o_Timer; |
||
56 | |||
57 | // Input Device. |
||
58 | Input *o_Input; |
||
59 | |||
60 | // Info über die Hardware |
||
61 | s_Hardware VersionInfo; |
||
62 | |||
63 | // Settings-Object |
||
64 | cSettings *o_Settings; |
||
65 | |||
66 | // MotorMixer GUI |
||
67 | dlg_MotorMixer *f_MotorMixer; |
||
68 | |||
69 | char c_Data[150]; |
||
70 | |||
71 | // Programm-Initialisirungen |
||
72 | void init_GUI(); |
||
73 | void init_Connections(); |
||
74 | |||
75 | void init_Directorys(); |
||
76 | s_Directorys s_Dir; |
||
77 | |||
78 | // Einkommende Datenpackete zerlegen. |
||
79 | void parse_MK_Data(QString t_Data); |
||
80 | void parse_IP_Data(QString t_Data); |
||
81 | |||
82 | void set_LED(QToolButton *ToolButton, bool On = false); |
||
83 | int get_Value(QComboBox *Combo); |
||
84 | QComboBox *setCombo(QComboBox *Combo, int Wert); |
||
85 | |||
86 | void show_MK_Settings(s_MK_Settings t_Set); |
||
87 | s_MK_Settings get_MK_Settings(); |
||
88 | |||
89 | private slots: |
||
90 | void slot_Timer(); |
||
91 | |||
92 | void slot_ac_About(); |
||
93 | |||
94 | void slot_ac_Connect(); |
||
95 | |||
96 | void slot_ac_Write(); |
||
97 | void slot_ac_Read(); |
||
98 | void slot_ac_Save(); |
||
99 | void slot_ac_Load(); |
||
100 | |||
101 | void slot_ac_MotorMixer(); |
||
102 | |||
103 | void slot_PageChange(int Page); |
||
104 | |||
105 | // Einkommende Datenpackete. |
||
106 | void slot_Input_Data(QString t_Data); |
||
107 | void slot_Input_Disconnected(int Error); |
||
108 | void slot_Input_Connected(); |
||
109 | |||
110 | void slot_LEDtoValue(); |
||
111 | void slot_ValuetoLED16(int Wert); |
||
112 | void slot_ValuetoLED17(int Wert); |
||
113 | void slot_ValuetoLED16A(int Wert); |
||
114 | void slot_ValuetoLED17A(int Wert); |
||
115 | |||
116 | void slot_tbUp(); |
||
117 | void slot_tbDown(); |
||
118 | void slot_tbLeft(); |
||
119 | void slot_tbRight(); |
||
120 | }; |
||
121 | |||
122 | #endif // DLG_MAIN_H |