introducing Expert mode

master
adrido 2015-05-31 10:25:13 +02:00
parent e661870355
commit a1a1fba90e
2 changed files with 36 additions and 5 deletions

View File

@ -289,11 +289,20 @@ void MainWindow::on_button_generate_clicked()
arguments<<"map";
}
}
//myProcess->setProcessChannelMode(QProcess::MergedChannels);
//myProcess->setReadChannel(QProcess::StandardOutput);
//myProcess->setReadChannel(QProcess::StandardError);
myProcess->setArguments(arguments);
if(ui->actionExpert_Mode->isChecked()){
bool ok;
QString parameters = QInputDialog::getMultiLineText(this,
tr("Expert Mode"),//title
tr("MinetestMapper will be executed using this arguments. \n"
"The arguments can be removed, modified, or new arguments can be added."),//label
arguments.join("\n"),//text
&ok,0);
if(ok) myProcess->setArguments(parameters.split("\n"));
}
qDebug()<<myProcess->arguments();
progressBar->show();
progressBar->setMaximum(100);
@ -477,6 +486,7 @@ void MainWindow::writeSettings()
}
settings.setValue("help", ui->actionHelp->isChecked());
settings.setValue("profile", currentProfile);
settings.setValue("expertMode",ui->actionExpert_Mode->isChecked());
settings.endGroup();
}
@ -546,7 +556,7 @@ void MainWindow::readSettings()
ui->dockHelp->close();
}
currentProfile = settings.value("profile","default").toString();
ui->actionExpert_Mode->setChecked(settings.value("expertMode",false).toBool());
settings.endGroup();
}

View File

@ -2167,8 +2167,15 @@
<string>Language</string>
</property>
</widget>
<widget class="QMenu" name="menuExtras">
<property name="title">
<string>Extras</string>
</property>
<addaction name="actionExpert_Mode"/>
</widget>
<addaction name="menuFile"/>
<addaction name="menuEdit"/>
<addaction name="menuExtras"/>
<addaction name="menuHelp"/>
<addaction name="menuLanguage"/>
</widget>
@ -2376,6 +2383,20 @@ p, li { white-space: pre-wrap; }
<string>New Profile</string>
</property>
</action>
<action name="actionExpert_Mode">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Expert Mode</string>
</property>
<property name="toolTip">
<string>In the Expert Mode it shows you the parameters, that you can modify it.</string>
</property>
<property name="statusTip">
<string>Expert Mode shows the parameters, that you can modify it.</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources>