Cosmetcs. (editor save removes trailing spaces)

This commit is contained in:
Grieb
2015-08-15 11:13:57 -03:00
parent b8c51c9bf0
commit 71706d5e93
2 changed files with 40 additions and 40 deletions
+15 -15
View File
@@ -1,6 +1,6 @@
/* /*
* Author - Kjell Kernen * Author - Kjell Kernen
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as * it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation. * published by the Free Software Foundation.
@@ -214,7 +214,7 @@ bool StandardPage::bookChannel(QComboBox * cb, Input input1, int weight1, Input
{ {
int channel = cb->itemData(cb->currentIndex()).toInt(); int channel = cb->itemData(cb->currentIndex()).toInt();
if (channel<0 || channel>=WIZ_MAX_CHANNELS) if (channel<0 || channel>=WIZ_MAX_CHANNELS)
return false; return false;
if (wizDlg->mix.channel[channel].page != Page_None) if (wizDlg->mix.channel[channel].page != Page_None)
return false; return false;
@@ -231,7 +231,7 @@ void StandardPage::releaseBookings()
{ {
for (int i=0; i<WIZ_MAX_CHANNELS; i++) { for (int i=0; i<WIZ_MAX_CHANNELS; i++) {
if (wizDlg->mix.channel[i].page == pageCurrent) { if (wizDlg->mix.channel[i].page == pageCurrent) {
wizDlg->mix.channel[i].clear(); wizDlg->mix.channel[i].clear();
} }
} }
} }
@@ -298,7 +298,7 @@ bool ModelSelectionPage::validatePage()
return true; return true;
} }
int ModelSelectionPage::nextId() const int ModelSelectionPage::nextId() const
{ {
if (helicopterRB->isChecked()) if (helicopterRB->isChecked())
return Page_Cyclic; return Page_Cyclic;
@@ -432,7 +432,7 @@ AileronsPage::AileronsPage(WizardDialog *dlg, QString image, QString title, QStr
l->addWidget(aileron1CB); l->addWidget(aileron1CB);
l->addWidget(new QLabel(tr("Second Aileron Channel:"))); l->addWidget(new QLabel(tr("Second Aileron Channel:")));
l->addWidget(aileron2CB); l->addWidget(aileron2CB);
connect(noAileronsRB, SIGNAL(toggled(bool)), this, SLOT(noAileronChannel())); connect(noAileronsRB, SIGNAL(toggled(bool)), this, SLOT(noAileronChannel()));
connect(oneAileronRB, SIGNAL(toggled(bool)), this, SLOT(oneAileronChannel())); connect(oneAileronRB, SIGNAL(toggled(bool)), this, SLOT(oneAileronChannel()));
connect(twoAileronsRB, SIGNAL(toggled(bool)), this, SLOT(twoAileronChannels())); connect(twoAileronsRB, SIGNAL(toggled(bool)), this, SLOT(twoAileronChannels()));
@@ -448,10 +448,10 @@ void AileronsPage::initializePage()
bool AileronsPage::validatePage() bool AileronsPage::validatePage()
{ {
releaseBookings(); releaseBookings();
if (noAileronsRB->isChecked()) { if (noAileronsRB->isChecked()) {
return true; return true;
} }
if (oneAileronRB->isChecked()) { if (oneAileronRB->isChecked()) {
return (bookChannel(aileron1CB, AILERONS_INPUT, 100 )); return (bookChannel(aileron1CB, AILERONS_INPUT, 100 ));
} }
return( bookChannel(aileron1CB, AILERONS_INPUT, 100 ) && return( bookChannel(aileron1CB, AILERONS_INPUT, 100 ) &&
@@ -497,7 +497,7 @@ FlapsPage::FlapsPage(WizardDialog *dlg, QString image, QString title, QString te
l->addWidget(flap1CB); l->addWidget(flap1CB);
l->addWidget(new QLabel(tr("Second Flap Channel:"))); l->addWidget(new QLabel(tr("Second Flap Channel:")));
l->addWidget(flap2CB); l->addWidget(flap2CB);
connect(noFlapsRB, SIGNAL(toggled(bool)), this, SLOT(noFlapChannel())); connect(noFlapsRB, SIGNAL(toggled(bool)), this, SLOT(noFlapChannel()));
connect(oneFlapRB, SIGNAL(toggled(bool)), this, SLOT(oneFlapChannel())); connect(oneFlapRB, SIGNAL(toggled(bool)), this, SLOT(oneFlapChannel()));
connect(twoFlapsRB, SIGNAL(toggled(bool)), this, SLOT(twoFlapChannels())); connect(twoFlapsRB, SIGNAL(toggled(bool)), this, SLOT(twoFlapChannels()));
@@ -512,10 +512,10 @@ void FlapsPage::initializePage()
bool FlapsPage::validatePage() { bool FlapsPage::validatePage() {
releaseBookings(); releaseBookings();
if (noFlapsRB->isChecked()) { if (noFlapsRB->isChecked()) {
return true; return true;
} }
if (oneFlapRB->isChecked()) { if (oneFlapRB->isChecked()) {
return (bookChannel(flap1CB, FLAPS_INPUT, 100 )); return (bookChannel(flap1CB, FLAPS_INPUT, 100 ));
} }
return( bookChannel(flap1CB, FLAPS_INPUT, 100 ) && return( bookChannel(flap1CB, FLAPS_INPUT, 100 ) &&
@@ -561,7 +561,7 @@ AirbrakesPage::AirbrakesPage(WizardDialog *dlg, QString image, QString title, QS
l->addWidget(airbrake1CB); l->addWidget(airbrake1CB);
l->addWidget(new QLabel(tr("Second Airbrake Channel:"))); l->addWidget(new QLabel(tr("Second Airbrake Channel:")));
l->addWidget(airbrake2CB); l->addWidget(airbrake2CB);
connect(noAirbrakesRB, SIGNAL(toggled(bool)), this, SLOT(noAirbrakeChannel())); connect(noAirbrakesRB, SIGNAL(toggled(bool)), this, SLOT(noAirbrakeChannel()));
connect(oneAirbrakeRB, SIGNAL(toggled(bool)), this, SLOT(oneAirbrakeChannel())); connect(oneAirbrakeRB, SIGNAL(toggled(bool)), this, SLOT(oneAirbrakeChannel()));
connect(twoAirbrakesRB, SIGNAL(toggled(bool)), this, SLOT(twoAirbrakeChannels())); connect(twoAirbrakesRB, SIGNAL(toggled(bool)), this, SLOT(twoAirbrakeChannels()));
@@ -577,10 +577,10 @@ void AirbrakesPage::initializePage()
bool AirbrakesPage::validatePage() bool AirbrakesPage::validatePage()
{ {
releaseBookings(); releaseBookings();
if (noAirbrakesRB->isChecked()) { if (noAirbrakesRB->isChecked()) {
return true; return true;
} }
if (oneAirbrakeRB->isChecked()) { if (oneAirbrakeRB->isChecked()) {
return (bookChannel(airbrake1CB, AIRBRAKES_INPUT, 100 )); return (bookChannel(airbrake1CB, AIRBRAKES_INPUT, 100 ));
} }
return( bookChannel(airbrake1CB, AIRBRAKES_INPUT, 100 ) && return( bookChannel(airbrake1CB, AIRBRAKES_INPUT, 100 ) &&
@@ -731,7 +731,7 @@ bool TailPage::validatePage()
SimpleTailPage::SimpleTailPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage) SimpleTailPage::SimpleTailPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage)
: StandardPage(Page_Simpletail, dlg, image, title, text, nextPage) : StandardPage(Page_Simpletail, dlg, image, title, text, nextPage)
{ {
elevatorCB = new QComboBox(); elevatorCB = new QComboBox();
QLayout *l = layout(); QLayout *l = layout();
@@ -1001,7 +1001,7 @@ WizardPrinter::WizardPrinter(WizMix *wizMix)
{ {
mix = wizMix; mix = wizMix;
} }
QString WizardPrinter::printChannel( Input input1, int weight1, Input input2, int weight2 ) QString WizardPrinter::printChannel( Input input1, int weight1, Input input2, int weight2 )
{ {
QString str; QString str;
+25 -25
View File
@@ -1,6 +1,6 @@
/* /*
* Author - Kjell Kernen * Author - Kjell Kernen
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as * it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation. * published by the Free Software Foundation.
@@ -15,7 +15,7 @@
#ifndef WIZARDDIALOG_H #ifndef WIZARDDIALOG_H
#define WIZARDDIALOG_H #define WIZARDDIALOG_H
#include <QWizard> #include <QWizard>
#include "wizarddata.h" #include "wizarddata.h"
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QCheckBox; class QCheckBox;
@@ -46,7 +46,7 @@ class StandardPage: public QWizardPage
StandardPage(WizardPage curPage, WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1); StandardPage(WizardPage curPage, WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1);
WizardDialog *wizDlg; WizardDialog *wizDlg;
protected: protected:
void releaseBookings(); void releaseBookings();
void releasePreBookings(); void releasePreBookings();
void initializePage(); void initializePage();
@@ -67,48 +67,48 @@ class ModelSelectionPage: public StandardPage
{ {
Q_OBJECT Q_OBJECT
public: public:
ModelSelectionPage(WizardDialog *dlg, QString image, QString title, QString text); ModelSelectionPage(WizardDialog *dlg, QString image, QString title, QString text);
private: private:
QLineEdit *nameLineEdit; QLineEdit *nameLineEdit;
QRadioButton *planeRB; QRadioButton *planeRB;
QRadioButton *multirotorRB; QRadioButton *multirotorRB;
QRadioButton *helicopterRB; QRadioButton *helicopterRB;
bool validatePage(); bool validatePage();
int nextId() const; int nextId() const;
}; };
class WingtypeSelectionPage: public StandardPage class WingtypeSelectionPage: public StandardPage
{ {
Q_OBJECT Q_OBJECT
public: public:
WingtypeSelectionPage(WizardDialog *dlg, QString image, QString title, QString text); WingtypeSelectionPage(WizardDialog *dlg, QString image, QString title, QString text);
private: private:
QRadioButton *deltaWingRB; QRadioButton *deltaWingRB;
QRadioButton *standardWingRB; QRadioButton *standardWingRB;
int nextId() const; int nextId() const;
}; };
class TailSelectionPage: public StandardPage class TailSelectionPage: public StandardPage
{ {
Q_OBJECT Q_OBJECT
public: public:
TailSelectionPage(WizardDialog *dlg, QString image, QString title, QString text); TailSelectionPage(WizardDialog *dlg, QString image, QString title, QString text);
private: private:
QRadioButton *vTailRB; QRadioButton *vTailRB;
QRadioButton *standardTailRB; QRadioButton *standardTailRB;
QRadioButton *simpleTailRB; QRadioButton *simpleTailRB;
int nextId() const; int nextId() const;
}; };
class FlybarSelectionPage: public StandardPage class FlybarSelectionPage: public StandardPage
{ {
Q_OBJECT Q_OBJECT
public: public:
FlybarSelectionPage(WizardDialog *dlg, QString image, QString title, QString text); FlybarSelectionPage(WizardDialog *dlg, QString image, QString title, QString text);
private: private:
QRadioButton *flybarRB; QRadioButton *flybarRB;
QRadioButton *noFlybarRB; QRadioButton *noFlybarRB;
int nextId() const; int nextId() const;
}; };
class ThrottlePage: public StandardPage class ThrottlePage: public StandardPage
@@ -133,10 +133,10 @@ class AileronsPage: public StandardPage
{ {
Q_OBJECT Q_OBJECT
public: public:
AileronsPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1); AileronsPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1);
void initializePage(); void initializePage();
bool validatePage(); bool validatePage();
protected slots: protected slots:
void noAileronChannel(); void noAileronChannel();
void oneAileronChannel(); void oneAileronChannel();
@@ -154,7 +154,7 @@ class FlapsPage: public StandardPage
{ {
Q_OBJECT Q_OBJECT
public: public:
FlapsPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1); FlapsPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1);
void initializePage(); void initializePage();
bool validatePage(); bool validatePage();
@@ -175,7 +175,7 @@ class AirbrakesPage: public StandardPage
{ {
Q_OBJECT Q_OBJECT
public: public:
AirbrakesPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1); AirbrakesPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1);
void initializePage(); void initializePage();
bool validatePage(); bool validatePage();
@@ -229,7 +229,7 @@ class TailPage: public StandardPage
{ {
Q_OBJECT Q_OBJECT
public: public:
TailPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1); TailPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1);
void initializePage(); void initializePage();
bool validatePage(); bool validatePage();
private: private:
@@ -241,7 +241,7 @@ class VTailPage: public StandardPage
{ {
Q_OBJECT Q_OBJECT
public: public:
VTailPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1); VTailPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1);
void initializePage(); void initializePage();
bool validatePage(); bool validatePage();
private: private:
@@ -253,7 +253,7 @@ class SimpleTailPage: public StandardPage
{ {
Q_OBJECT Q_OBJECT
public: public:
SimpleTailPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1); SimpleTailPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1);
void initializePage(); void initializePage();
bool validatePage(); bool validatePage();
private: private:
@@ -264,7 +264,7 @@ class CyclicPage: public StandardPage
{ {
Q_OBJECT Q_OBJECT
public: public:
CyclicPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1); CyclicPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1);
void initializePage(); void initializePage();
bool validatePage(); bool validatePage();
private: private:
@@ -278,7 +278,7 @@ class GyroPage: public StandardPage
{ {
Q_OBJECT Q_OBJECT
public: public:
GyroPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1); GyroPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1);
void initializePage(); void initializePage();
bool validatePage(); bool validatePage();
private: private:
@@ -291,7 +291,7 @@ class FblPage: public StandardPage
{ {
Q_OBJECT Q_OBJECT
public: public:
FblPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1); FblPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1);
void initializePage(); void initializePage();
bool validatePage(); bool validatePage();
private: private:
@@ -305,7 +305,7 @@ class HeliPage: public StandardPage
{ {
Q_OBJECT Q_OBJECT
public: public:
HeliPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1); HeliPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1);
void initializePage(); void initializePage();
bool validatePage(); bool validatePage();
private: private:
@@ -319,7 +319,7 @@ class MultirotorPage: public StandardPage
{ {
Q_OBJECT Q_OBJECT
public: public:
MultirotorPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1); MultirotorPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1);
void initializePage(); void initializePage();
bool validatePage(); bool validatePage();
private: private:
@@ -333,7 +333,7 @@ class OptionsPage: public StandardPage
{ {
Q_OBJECT Q_OBJECT
public: public:
OptionsPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1); OptionsPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1);
void initializePage(); void initializePage();
bool validatePage(); bool validatePage();
private: private:
@@ -346,7 +346,7 @@ class ConclusionPage: public StandardPage
{ {
Q_OBJECT Q_OBJECT
public: public:
ConclusionPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1); ConclusionPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1);
void initializePage(); void initializePage();
bool validatePage(); bool validatePage();
private: private: