mirror of
https://github.com/opentx/opentx.git
synced 2025-07-23 08:15:17 +03:00
Added status information for wixard mix data.
This commit is contained in:
parent
0a867bcc22
commit
898496a85d
5 changed files with 26 additions and 8 deletions
|
@ -186,7 +186,10 @@ void MdiChild::wizardEdit()
|
|||
if (row > 0) {
|
||||
checkAndInitModel(row);
|
||||
WizardDialog *wizard = new WizardDialog(this);
|
||||
wizard->show();
|
||||
wizard->exec();
|
||||
if (wizard->mix.complete){
|
||||
//TODO Save data accessible in wizard->mix.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -65,11 +65,18 @@ QString Channel::toString()
|
|||
return str;
|
||||
}
|
||||
|
||||
Mix::Mix()
|
||||
{
|
||||
complete = false;
|
||||
name = "";
|
||||
vehicle = NOVEHICLE;
|
||||
}
|
||||
|
||||
QString Mix::toString()
|
||||
{
|
||||
QString str;
|
||||
str = QString(tr("Model Name: ")) + name + "\n";
|
||||
str += QString(tr("Model Type: ")) + vehicleName(vehicleType) + "\n";
|
||||
str += QString(tr("Model Type: ")) + vehicleName(vehicle) + "\n";
|
||||
for (int i=0; i<MAX_CHANNELS; i++){
|
||||
if (!channel[i].isEmpty()){
|
||||
str += QString(tr("Channel %1: ").arg(i+1));
|
||||
|
@ -78,4 +85,4 @@ QString Mix::toString()
|
|||
}
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,11 +43,13 @@ class Mix:QObject
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
bool complete;
|
||||
QString name;
|
||||
Vehicle vehicleType;
|
||||
Vehicle vehicle;
|
||||
Channel channel[MAX_CHANNELS];
|
||||
|
||||
Mix();
|
||||
QString toString();
|
||||
};
|
||||
|
||||
#endif // WIZARDDATA_H
|
||||
#endif // WIZARDDATA_H
|
||||
|
|
|
@ -213,11 +213,11 @@ bool ModelSelectionPage::validatePage()
|
|||
{
|
||||
wizDlg->mix.name = nameLineEdit->text();
|
||||
if (multirotorRB->isChecked())
|
||||
wizDlg->mix.vehicleType = MULTICOPTER;
|
||||
wizDlg->mix.vehicle = MULTICOPTER;
|
||||
else if (helicopterRB->isChecked())
|
||||
wizDlg->mix.vehicleType = HELICOPTER;
|
||||
wizDlg->mix.vehicle = HELICOPTER;
|
||||
else
|
||||
wizDlg->mix.vehicleType = PLANE;
|
||||
wizDlg->mix.vehicle = PLANE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -723,4 +723,9 @@ void ConclusionPage::initializePage(){
|
|||
textLabel->setText(wizDlg->mix.toString());
|
||||
}
|
||||
|
||||
bool ConclusionPage::validatePage() {
|
||||
wizDlg->mix.complete = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -302,6 +302,7 @@ class ConclusionPage: public StandardPage
|
|||
public:
|
||||
ConclusionPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1);
|
||||
void initializePage();
|
||||
bool validatePage();
|
||||
private:
|
||||
QCheckBox *proceedCB;
|
||||
QLabel *textLabel;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue