Exemple #1
0
void MdiChild::wizardEdit()
{
  int row = ui->modelsList->currentRow();
  if (row > 0) {
    checkAndInitModel(row);
    WizardDialog * wizard = new WizardDialog(radioData.generalSettings, row, this);
    wizard->exec();
    if (wizard->mix.complete /*TODO rather test the exec() result?*/) {
      radioData.models[row - 1] = wizard->mix;
      setModified();
    }
  }
}
Exemple #2
0
void MdiChild::modelEdit()
{
  int row = ui->modelsList->currentRow();

  if (row == 0){
    generalEdit();
  } 
  else {
    QApplication::setOverrideCursor(Qt::WaitCursor);
    checkAndInitModel( row );
    ModelData &model = radioData.models[row - 1];
    ModelEdit *t = new ModelEdit(this, radioData, (row - 1), GetCurrentFirmware()/*firmware*/);
    t->setWindowTitle(tr("Editing model %1: ").arg(row) + model.name);
    connect(t, SIGNAL(modified()), this, SLOT(setModified()));
    t->show();
    QApplication::restoreOverrideCursor();
  }
}
Exemple #3
0
void MdiChild::modelEdit()
{
  int row = getCurrentRow();

  if (row == 0){
    generalEdit();
  }
  else {
    QApplication::setOverrideCursor(Qt::WaitCursor);
    checkAndInitModel( row );
    ModelData &model = radioData.models[row - 1];
    gStopwatch.restart();
    gStopwatch.report("ModelEdit creation");
    ModelEdit *t = new ModelEdit(this, radioData, (row - 1), GetCurrentFirmware()/*firmware*/);
    gStopwatch.report("ModelEdit created");
    t->setWindowTitle(tr("Editing model %1: ").arg(row) + model.name);
    connect(t, SIGNAL(modified()), this, SLOT(setModified()));
    gStopwatch.report("STARTING MODEL EDIT");
    t->show();
    QApplication::restoreOverrideCursor();
    gStopwatch.report("ModelEdit shown");
  }
}