Now we are able to have Model windows with different transmitter types!

This commit is contained in:
bsongis
2014-04-18 17:34:41 +02:00
parent a5085cf7e2
commit 5de6f4dc94
3 changed files with 22 additions and 19 deletions
+5 -4
View File
@@ -66,6 +66,7 @@
MdiChild::MdiChild():
QWidget(),
ui(new Ui::mdiChild),
firmware(GetCurrentFirmware()),
isUntitled(true),
fileChanged(false)
{
@@ -103,7 +104,7 @@ void MdiChild::qSleep(int ms)
void MdiChild::eepromInterfaceChanged()
{
ui->modelsList->refreshList();
ui->SimulateTxButton->setEnabled(GetCurrentFirmware()->getCapability(Simulation));
ui->SimulateTxButton->setEnabled(firmware->getCapability(Simulation));
updateTitle();
}
@@ -181,7 +182,7 @@ void MdiChild::modelEdit()
QApplication::setOverrideCursor(Qt::WaitCursor);
checkAndInitModel( row );
ModelData &model = radioData.models[row - 1];
ModelEdit *t = new ModelEdit(this, radioData, (row - 1), GetCurrentFirmware());
ModelEdit *t = new ModelEdit(this, radioData, (row - 1), firmware);
t->setWindowTitle(tr("Editing model %1: ").arg(row) + model.name);
connect(t, SIGNAL(modified()), this, SLOT(setModified()));
t->show();
@@ -666,10 +667,10 @@ void MdiChild::print(int model, QString filename)
PrintDialog * pd = NULL;
if (model>=0 && !filename.isEmpty()) {
pd = new PrintDialog(this, GetCurrentFirmware(), &radioData.generalSettings, &radioData.models[model], filename);
pd = new PrintDialog(this, firmware, &radioData.generalSettings, &radioData.models[model], filename);
}
else if (ui->modelsList->currentRow() > 0) {
pd = new PrintDialog(this, GetCurrentFirmware(), &radioData.generalSettings, &radioData.models[ui->modelsList->currentRow()-1]);
pd = new PrintDialog(this, firmware, &radioData.generalSettings, &radioData.models[ui->modelsList->currentRow()-1]);
}
if (pd) {