Exemplo n.º 1
0
/*
 =======================================================================================================================
 =======================================================================================================================
 */
void CDialogTextures::BuildTree() {
    CWaitCursor cursor;
    m_treeTextures.DeleteAllItems();
    bool rootItems = m_chkHideRoot.GetCheck() == 0;

    idTimer timer;

    timer.Start();

    addMaterials( rootItems );
    // _D3XP removed
    //addModels( rootItems );
    addScripts( rootItems );
    addSounds( rootItems );
    addGuis( rootItems );
    addParticles( rootItems );

    timer.Stop();

    common->Printf( "CDialogTextures::BuildTree() took %.0f milliseconds\n", timer.Milliseconds() );
}
Exemplo n.º 2
0
void MainWindow::openScenario(std::string filename) {
	clearLayout(ui->widget_seismic->layout());
	clearLayout(ui->widget_sensibilizar->layout());
	clearLayout(ui->widget_materials->layout());
	ui->generalPropertiesContainer->layout()->takeAt(0); //Save general material config
	clearLayout(ui->materialsTab->layout());
	clearLayout(ui->strengthFunctionsTab->layout()); // Strength functions
	materials_ui.clear();
	strength_functions_ui.clear();
	custom_seismic_schenarios_ui.clear();
	qcheckbox_property_index.clear();
	qcheckbox_material_scenario_index.clear();
	index_qcheckbox_material_scenario.clear();
	general_material_config.clearScenarios();
	try {
		main_scenario = EscenarioFile(filename);
		addProperties();
		addMaterials();
		addStrengthFunctions();
		scenarios_config.setScenarioFile(&main_scenario);
		result_process_ui.setEscenarioFile(main_scenario);
	}
	catch (std::exception& e) {
		std::cout << "Standard exception: " << e.what() << std::endl;
		QMessageBox messageBox;
		messageBox.critical(
			0,
			"Error trying to load SLI file",
			QString::fromStdString(
				std::string("There is a problem with the format of the file.\n") +
				std::string(e.what())
			)
		);
		messageBox.setFixedSize(500, 200);
	}
}