Add X3 simulator
This commit is contained in:
@@ -39,7 +39,7 @@ AppPreferencesDialog::AppPreferencesDialog(QWidget * parent) :
|
||||
setWindowIcon(CompanionIcon("apppreferences.png"));
|
||||
|
||||
initSettings();
|
||||
connect(ui->downloadVerCB, SIGNAL(currentIndexChanged(int)), this, SLOT(onBaseFirmwareChanged()));
|
||||
connect(ui->boardCB, SIGNAL(currentIndexChanged(int)), this, SLOT(onBaseFirmwareChanged()));
|
||||
connect(ui->opt_appDebugLog, &QCheckBox::toggled, this, &AppPreferencesDialog::toggleAppLogSettings);
|
||||
connect(ui->opt_fwTraceLog, &QCheckBox::toggled, this, &AppPreferencesDialog::toggleAppLogSettings);
|
||||
|
||||
@@ -282,9 +282,9 @@ void AppPreferencesDialog::initSettings()
|
||||
|
||||
QString currType = QStringList(profile.fwType().split('-').mid(0, 2)).join('-');
|
||||
foreach(Firmware * firmware, Firmware::getRegisteredFirmwares()) {
|
||||
ui->downloadVerCB->addItem(firmware->getName(), firmware->getId());
|
||||
ui->boardCB->addItem(firmware->getName(), firmware->getId());
|
||||
if (currType == firmware->getId()) {
|
||||
ui->downloadVerCB->setCurrentIndex(ui->downloadVerCB->count() - 1);
|
||||
ui->boardCB->setCurrentIndex(ui->boardCB->count() - 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -442,12 +442,12 @@ void AppPreferencesDialog::onBaseFirmwareChanged()
|
||||
|
||||
Firmware *AppPreferencesDialog::getBaseFirmware() const
|
||||
{
|
||||
return Firmware::getFirmwareForId(ui->downloadVerCB->currentData().toString());
|
||||
return Firmware::getFirmwareForId(ui->boardCB->currentData().toString());
|
||||
}
|
||||
|
||||
Firmware * AppPreferencesDialog::getFirmwareVariant() const
|
||||
{
|
||||
QString id = ui->downloadVerCB->currentData().toString();
|
||||
QString id = ui->boardCB->currentData().toString();
|
||||
|
||||
foreach(QCheckBox *cb, optionsCheckBoxes.values()) {
|
||||
if (cb->isChecked())
|
||||
|
||||
Reference in New Issue
Block a user