2 * Author - Kjell Kernen
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
15 #ifndef WIZARDDIALOG_H
16 #define WIZARDDIALOG_H
18 #include "wizarddata.h"
28 class WizardDialog
: public QWizard
34 WizardDialog(const GeneralSettings
& settings
, const unsigned int modelId
, QWidget
*parent
= 0);
35 const GeneralSettings
& settings
;
41 class StandardPage
: public QWizardPage
46 StandardPage(WizardPage curPage
, WizardDialog
*dlg
, QString image
, QString title
, QString text
, int nextPage
=-1);
50 void releaseBookings();
51 void releasePreBookings();
52 void initializePage();
54 int getDefaultChannel(const Input input
);
55 int nextFreeChannel(int channel
= 0);
56 void populateCB(QComboBox
* cb
, int preferred
=-1);
57 bool bookChannel(QComboBox
* cb
, Input input1
, int weight1
, Input input2
=NO_INPUT
, int weight2
=0);
61 WizardPage pageCurrent
;
66 class ModelSelectionPage
: public StandardPage
70 ModelSelectionPage(WizardDialog
*dlg
, QString image
, QString title
, QString text
);
72 QLineEdit
*nameLineEdit
;
73 QRadioButton
*planeRB
;
74 QRadioButton
*multirotorRB
;
75 QRadioButton
*helicopterRB
;
80 class WingtypeSelectionPage
: public StandardPage
84 WingtypeSelectionPage(WizardDialog
*dlg
, QString image
, QString title
, QString text
);
86 QRadioButton
*deltaWingRB
;
87 QRadioButton
*standardWingRB
;
91 class TailSelectionPage
: public StandardPage
95 TailSelectionPage(WizardDialog
*dlg
, QString image
, QString title
, QString text
);
97 QRadioButton
*vTailRB
;
98 QRadioButton
*standardTailRB
;
99 QRadioButton
*simpleTailRB
;
103 class FlybarSelectionPage
: public StandardPage
107 FlybarSelectionPage(WizardDialog
*dlg
, QString image
, QString title
, QString text
);
109 QRadioButton
*flybarRB
;
110 QRadioButton
*noFlybarRB
;
114 class ThrottlePage
: public StandardPage
119 ThrottlePage(WizardDialog
*dlg
, QString image
, QString title
, QString text
, int nextPage
=-1);
120 void initializePage();
124 void onMotorStateChanged(bool toggled
);
127 QRadioButton
*motorRB
;
128 QRadioButton
*noMotorRB
;
129 QComboBox
*throttleCB
;
132 class AileronsPage
: public StandardPage
136 AileronsPage(WizardDialog
*dlg
, QString image
, QString title
, QString text
, int nextPage
=-1);
137 void initializePage();
141 void noAileronChannel();
142 void oneAileronChannel();
143 void twoAileronChannels();
146 QRadioButton
*oneAileronRB
;
147 QRadioButton
*twoAileronsRB
;
148 QRadioButton
*noAileronsRB
;
149 QComboBox
*aileron1CB
;
150 QComboBox
*aileron2CB
;
153 class FlapsPage
: public StandardPage
157 FlapsPage(WizardDialog
*dlg
, QString image
, QString title
, QString text
, int nextPage
=-1);
158 void initializePage();
162 void noFlapChannel();
163 void oneFlapChannel();
164 void twoFlapChannels();
167 QRadioButton
*oneFlapRB
;
168 QRadioButton
*twoFlapsRB
;
169 QRadioButton
*noFlapsRB
;
174 class AirbrakesPage
: public StandardPage
178 AirbrakesPage(WizardDialog
*dlg
, QString image
, QString title
, QString text
, int nextPage
=-1);
179 void initializePage();
183 void noAirbrakeChannel();
184 void oneAirbrakeChannel();
185 void twoAirbrakeChannels();
188 QRadioButton
*oneAirbrakeRB
;
189 QRadioButton
*twoAirbrakesRB
;
190 QRadioButton
*noAirbrakesRB
;
191 QComboBox
*airbrake1CB
;
192 QComboBox
*airbrake2CB
;
195 class ElevonsPage
: public StandardPage
200 ElevonsPage(WizardDialog
*dlg
, QString image
, QString title
, QString text
, int nextPage
=-1);
201 void initializePage();
205 QComboBox
*elevon1CB
;
206 QComboBox
*elevon2CB
;
209 class RudderPage
: public StandardPage
214 RudderPage(WizardDialog
*dlg
, QString image
, QString title
, QString text
, int nextPage
=-1);
215 void initializePage();
223 QRadioButton
*noRudderRB
;
224 QRadioButton
*hasRudderRB
;
228 class TailPage
: public StandardPage
232 TailPage(WizardDialog
*dlg
, QString image
, QString title
, QString text
, int nextPage
=-1);
233 void initializePage();
236 QComboBox
*elevatorCB
;
240 class VTailPage
: public StandardPage
244 VTailPage(WizardDialog
*dlg
, QString image
, QString title
, QString text
, int nextPage
=-1);
245 void initializePage();
252 class SimpleTailPage
: public StandardPage
256 SimpleTailPage(WizardDialog
*dlg
, QString image
, QString title
, QString text
, int nextPage
=-1);
257 void initializePage();
260 QComboBox
*elevatorCB
;
263 class CyclicPage
: public StandardPage
267 CyclicPage(WizardDialog
*dlg
, QString image
, QString title
, QString text
, int nextPage
=-1);
268 void initializePage();
271 QRadioButton
*cyclic90RB
;
272 QRadioButton
*cyclic120RB
;
273 QRadioButton
*cyclic120XRB
;
274 QRadioButton
*cyclic140RB
;
277 class GyroPage
: public StandardPage
281 GyroPage(WizardDialog
*dlg
, QString image
, QString title
, QString text
, int nextPage
=-1);
282 void initializePage();
285 QRadioButton
*noGyroRB
;
286 QRadioButton
*switchGyroRB
;
287 QRadioButton
*potGyroRB
;
290 class FblPage
: public StandardPage
294 FblPage(WizardDialog
*dlg
, QString image
, QString title
, QString text
, int nextPage
=-1);
295 void initializePage();
298 QComboBox
*throttleCB
;
304 class HeliPage
: public StandardPage
308 HeliPage(WizardDialog
*dlg
, QString image
, QString title
, QString text
, int nextPage
=-1);
309 void initializePage();
312 QComboBox
*throttleCB
;
318 class MultirotorPage
: public StandardPage
322 MultirotorPage(WizardDialog
*dlg
, QString image
, QString title
, QString text
, int nextPage
=-1);
323 void initializePage();
326 QComboBox
*throttleCB
;
332 class OptionsPage
: public StandardPage
336 OptionsPage(WizardDialog
*dlg
, QString image
, QString title
, QString text
, int nextPage
=-1);
337 void initializePage();
340 QCheckBox
*throttleCutRB
;
341 QCheckBox
*flightTimerRB
;
342 QCheckBox
*throttleTimerRB
;
345 class ConclusionPage
: public StandardPage
349 ConclusionPage(WizardDialog
*dlg
, QString image
, QString title
, QString text
, int nextPage
=-1);
350 void initializePage();
353 QCheckBox
*proceedCB
;
357 class WizardPrinter
:QObject
361 WizardPrinter( WizMix
* );
365 QString
inputName( Input
);
366 QString
vehicleName( Vehicle
);
367 QString
printChannel( Input
, int, Input
, int );
369 #endif // WIZARDDIALOG_H