Wizard merged with next.

Wizard turned off by hard coding.
Fixes #897
This commit is contained in:
Kjell Kernen
2014-03-31 13:28:19 +02:00
parent 8059daccaf
commit 31a5fc2e63
4 changed files with 51 additions and 43 deletions
-3
View File
@@ -159,7 +159,6 @@ set(companion_SRCS
splashlibrary.cpp splashlibrary.cpp
mainwindow.cpp mainwindow.cpp
companion.cpp companion.cpp
modelconfigdialog.cpp
taranisnotfound.cpp taranisnotfound.cpp
qcustomplot.cpp qcustomplot.cpp
wizarddata.cpp wizarddata.cpp
@@ -185,7 +184,6 @@ set(companion_MOC_HDRS
modelslist.h modelslist.h
mdichild.h mdichild.h
mainwindow.h mainwindow.h
modelconfigdialog.h
taranisnotfound.h taranisnotfound.h
qcustomplot.h qcustomplot.h
helpers.h helpers.h
@@ -208,7 +206,6 @@ set(companion_UIS
customizesplashdialog.ui customizesplashdialog.ui
splashlibrary.ui splashlibrary.ui
burndialog.ui burndialog.ui
modelconfigdialog.ui
taranisnotfound.ui taranisnotfound.ui
) )
+2
View File
@@ -104,6 +104,8 @@ void appPreferencesDialog::initSettings()
ui->showSplash->setChecked(g.showSplash()); ui->showSplash->setChecked(g.showSplash());
ui->historySize->setValue(g.historySize()); ui->historySize->setValue(g.historySize());
ui->backLightColor->setCurrentIndex(g.backLight()); ui->backLightColor->setCurrentIndex(g.backLight());
if (getRadioType(g.profile[g.id()].fwType())==6) // TODO - NOT AT ALL OK. THERE SHOULD BE A COMMON RADIO DEFINITION.
ui->backLightColor->setEnabled(false);
ui->simuSW->setChecked(g.simuSW()); ui->simuSW->setChecked(g.simuSW());
ui->libraryPath->setText(g.libDir()); ui->libraryPath->setText(g.libDir());
ui->ge_lineedit->setText(g.gePath()); ui->ge_lineedit->setText(g.gePath());
+46 -38
View File
@@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>685</width> <width>685</width>
<height>462</height> <height>514</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@@ -26,21 +26,12 @@
<string>Edit Settings</string> <string>Edit Settings</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
<number>6</number>
</property>
<property name="topMargin">
<number>6</number>
</property>
<property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>6</number>
</property>
<property name="verticalSpacing"> <property name="verticalSpacing">
<number>2</number> <number>2</number>
</property> </property>
<property name="margin">
<number>6</number>
</property>
<item row="2" column="0" colspan="2"> <item row="2" column="0" colspan="2">
<widget class="QDialogButtonBox" name="buttonBox"> <widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation"> <property name="orientation">
@@ -61,7 +52,14 @@
<string>Radio Profile</string> <string>Radio Profile</string>
</attribute> </attribute>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<item row="10" column="1" colspan="3"> <item row="10" column="1" colspan="5">
<widget class="Line" name="line_6">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="11" column="1" colspan="3">
<widget class="QComboBox" name="stickmodeCB"> <widget class="QComboBox" name="stickmodeCB">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
@@ -115,7 +113,7 @@ Mode 4:
</item> </item>
</widget> </widget>
</item> </item>
<item row="12" column="1" colspan="3"> <item row="13" column="1" colspan="3">
<widget class="QComboBox" name="channelorderCB"> <widget class="QComboBox" name="channelorderCB">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
@@ -265,7 +263,7 @@ This is used by the templated to determine which channel goes to what number out
</item> </item>
</widget> </widget>
</item> </item>
<item row="10" column="0"> <item row="11" column="0">
<widget class="QLabel" name="label_14"> <widget class="QLabel" name="label_14">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum"> <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
@@ -285,7 +283,7 @@ This is used by the templated to determine which channel goes to what number out
</property> </property>
</widget> </widget>
</item> </item>
<item row="15" column="1"> <item row="16" column="1">
<spacer name="verticalSpacer_3"> <spacer name="verticalSpacer_3">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
@@ -298,7 +296,7 @@ This is used by the templated to determine which channel goes to what number out
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="4" column="0"> <item row="5" column="0">
<widget class="QLabel" name="label_8"> <widget class="QLabel" name="label_8">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum"> <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
@@ -311,7 +309,7 @@ This is used by the templated to determine which channel goes to what number out
</property> </property>
</widget> </widget>
</item> </item>
<item row="12" column="0"> <item row="13" column="0">
<widget class="QLabel" name="label_13"> <widget class="QLabel" name="label_13">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
@@ -327,14 +325,14 @@ This is used by the templated to determine which channel goes to what number out
</property> </property>
</widget> </widget>
</item> </item>
<item row="13" column="1" colspan="3"> <item row="14" column="1" colspan="3">
<widget class="QCheckBox" name="renameFirmware"> <widget class="QCheckBox" name="renameFirmware">
<property name="text"> <property name="text">
<string>Append version number to FW file name</string> <string>Append version number to FW file name</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0"> <item row="3" column="0">
<widget class="QLabel" name="sdPathLabel"> <widget class="QLabel" name="sdPathLabel">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum"> <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
@@ -350,7 +348,7 @@ This is used by the templated to determine which channel goes to what number out
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="1" colspan="2"> <item row="3" column="1" colspan="2">
<widget class="QLineEdit" name="sdPath"> <widget class="QLineEdit" name="sdPath">
<property name="enabled"> <property name="enabled">
<bool>true</bool> <bool>true</bool>
@@ -372,7 +370,7 @@ This is used by the templated to determine which channel goes to what number out
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="4"> <item row="3" column="4">
<spacer name="horizontalSpacer"> <spacer name="horizontalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
@@ -385,35 +383,28 @@ This is used by the templated to determine which channel goes to what number out
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="14" column="1" colspan="3"> <item row="15" column="1" colspan="3">
<widget class="QCheckBox" name="burnFirmware"> <widget class="QCheckBox" name="burnFirmware">
<property name="text"> <property name="text">
<string>Offer to write FW to Tx after download</string> <string>Offer to write FW to Tx after download</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="14" column="5"> <item row="15" column="5">
<widget class="QPushButton" name="removeProfileButton"> <widget class="QPushButton" name="removeProfileButton">
<property name="text"> <property name="text">
<string>Remove Profile</string> <string>Remove Profile</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="5"> <item row="3" column="5">
<widget class="QPushButton" name="sdPathButton"> <widget class="QPushButton" name="sdPathButton">
<property name="text"> <property name="text">
<string>Open Folder</string> <string>Open Folder</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="9" column="1" colspan="5"> <item row="5" column="1" colspan="2">
<widget class="Line" name="line_6">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="4" column="1" colspan="2">
<widget class="QLineEdit" name="SplashFileName"> <widget class="QLineEdit" name="SplashFileName">
<property name="enabled"> <property name="enabled">
<bool>true</bool> <bool>true</bool>
@@ -435,7 +426,7 @@ This is used by the templated to determine which channel goes to what number out
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="5"> <item row="5" column="5">
<widget class="QPushButton" name="SplashSelect"> <widget class="QPushButton" name="SplashSelect">
<property name="text"> <property name="text">
<string>Select Image</string> <string>Select Image</string>
@@ -449,14 +440,14 @@ This is used by the templated to determine which channel goes to what number out
</property> </property>
</widget> </widget>
</item> </item>
<item row="7" column="5"> <item row="8" column="5">
<widget class="QPushButton" name="clearImageButton"> <widget class="QPushButton" name="clearImageButton">
<property name="text"> <property name="text">
<string>Clear Image</string> <string>Clear Image</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="1" colspan="5"> <item row="4" column="1" colspan="5">
<widget class="Line" name="line_3"> <widget class="Line" name="line_3">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
@@ -479,7 +470,7 @@ This is used by the templated to determine which channel goes to what number out
</property> </property>
</widget> </widget>
</item> </item>
<item row="7" column="1"> <item row="8" column="1">
<widget class="QLabel" name="imageLabel"> <widget class="QLabel" name="imageLabel">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
@@ -555,6 +546,23 @@ This is used by the templated to determine which channel goes to what number out
</item> </item>
</widget> </widget>
</item> </item>
<item row="2" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>General Settings</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="lblGeneralSettings">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>General Settings Label</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="applicationTab"> <widget class="QWidget" name="applicationTab">
+3 -2
View File
@@ -173,17 +173,20 @@ void MdiChild::modelEdit()
generalEdit(); generalEdit();
} }
else { else {
QApplication::setOverrideCursor(Qt::WaitCursor);
checkAndInitModel( row ); checkAndInitModel( row );
ModelData &model = radioData.models[row - 1]; ModelData &model = radioData.models[row - 1];
ModelEdit *t = new ModelEdit(radioData, (row - 1), false, this); ModelEdit *t = new ModelEdit(radioData, (row - 1), false, this);
t->setWindowTitle(tr("Editing model %1: ").arg(row) + model.name); t->setWindowTitle(tr("Editing model %1: ").arg(row) + model.name);
connect(t, SIGNAL(modified()), this, SLOT(setModified())); connect(t, SIGNAL(modified()), this, SLOT(setModified()));
t->show(); t->show();
QApplication::restoreOverrideCursor();
} }
} }
void MdiChild::wizardEdit() void MdiChild::wizardEdit()
{ {
return modelEdit(); // TODO FOR BERTRAND- REMOVE THIS LINE TO TURN THE WIZARD BACK ON
int row = ui->modelsList->currentRow(); int row = ui->modelsList->currentRow();
if (row > 0) { if (row > 0) {
checkAndInitModel(row); checkAndInitModel(row);
@@ -198,7 +201,6 @@ void MdiChild::wizardEdit()
void MdiChild::openEditWindow() void MdiChild::openEditWindow()
{ {
QApplication::setOverrideCursor(Qt::WaitCursor);
int row = ui->modelsList->currentRow(); int row = ui->modelsList->currentRow();
if (row == 0){ if (row == 0){
generalEdit(); generalEdit();
@@ -212,7 +214,6 @@ void MdiChild::openEditWindow()
modelEdit(); modelEdit();
} }
} }
QApplication::restoreOverrideCursor();
} }
void MdiChild::newFile() void MdiChild::newFile()