Example #1
0
void EditorMainWindow::openRequested() {
	//TODO: check if we have something else open and ask if we should save it, free everything and all
	QString fileName = QFileDialog::getOpenFileName(this, tr("Open Scenario"));
	if(fileName.length()) {
		openScenario(fileName.toAscii().data());
	}
}
Example #2
0
void MainWindow::openScenarioPromp()
{
	QString filename = QFileDialog::getOpenFileName(this,
													("Abrir Escenario (.sli)"), "",
													"Scenarios (*.sli);;Todos los archivos (*)");
	if(filename.size() == 0)
		return; // cancel
	openScenario(filename.toStdString());
	result_process_ui.resetFiles();
	ui->statusBar->showMessage("Archivo cargado: " + filename, 20000);
}