From b5196ea52adfdcc54c6fde7f5dd8e7c9b9e3b059 Mon Sep 17 00:00:00 2001 From: stv Date: Fri, 10 Oct 2008 12:49:10 +0000 Subject: [PATCH] *** empty log message *** --- src/VISUGUI/VisuGUI.cxx | 51 ++++++++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/src/VISUGUI/VisuGUI.cxx b/src/VISUGUI/VisuGUI.cxx index 5c07f191..ebe2c5c3 100644 --- a/src/VISUGUI/VisuGUI.cxx +++ b/src/VISUGUI/VisuGUI.cxx @@ -214,7 +214,7 @@ VisuGUI SalomeApp_CheckFileDlg fd( GetDesktop(this), true, tr("USE_BUILD_PROGRESS") ); fd.setWindowTitle( tr( "IMPORT_FROM_FILE" ) ); - fd.setFileMode( SalomeApp_CheckFileDlg::ExistingFiles ); + fd.setFileMode( SalomeApp_CheckFileDlg::ExistingFiles ); fd.setFilters( aFilter ); fd.SetChecked( toUseBuildProgress ); if ( SalomeApp_CheckFileDlg::getLastVisitedPath().isEmpty() ) @@ -235,7 +235,7 @@ VisuGUI for ( QStringList::ConstIterator it = fileNames.begin(); it != fileNames.end(); ++it ) { QFileInfo aFileInfo( *it ); - + if ( !aFileInfo.exists() ) { // file not exist errors.append( QString( "%1 :\n\t%2" ).arg( aFileInfo.filePath() ). @@ -250,12 +250,12 @@ VisuGUI bool toBuildGroups = aResourceMgr->booleanValue( "VISU", "build_groups", true ); bool toBuildAll = aResourceMgr->booleanValue( "VISU", "full_med_loading", false ); bool toBuildAtOnce = aResourceMgr->booleanValue( "VISU", "build_at_once", false ); - - QString anInfo( tr( "IMPORT_FROM_FILE" ) + " " + aFileInfo.filePath() + " ... " ); + + QString anInfo( tr( "IMPORT_FROM_FILE" ) + " " + aFileInfo.filePath() + " ... " ); application()->putInfo( anInfo ); - + VISU::Result_var aResult = GetVisuGen( this )->CreateResult( aFileInfo.filePath().toLatin1().constData() ); - + if ( CORBA::is_nil( aResult.in() ) ) { errors.append( QString( "%1 :\n\t%2" ).arg( aFileInfo.filePath() ). arg( tr( "ERR_ERROR_IN_THE_FILE" ) ) ); @@ -326,15 +326,15 @@ VisuGUI } else { try { - QString anInfo( tr("TLT_IMPORT_TABLE") + " " + aFileInfo.filePath() + " ..." ); + QString anInfo( tr("TLT_IMPORT_TABLE") + " " + aFileInfo.filePath() + " ..." ); application()->putInfo( anInfo ); - + CORBA::Object_var anObject = GetVisuGen(this)->ImportTables(aFileInfo.filePath().toLatin1().constData()); - + if (CORBA::is_nil(anObject.in())) { errors.append( QString( "%1 :\n\t%2" ).arg( aFileInfo.filePath() ). arg( tr( "ERR_ERROR_IN_THE_FILE" ) ) ); - } + } else { application()->putInfo( anInfo + tr("INF_DONE") ); } @@ -1299,7 +1299,7 @@ VisuGUI VISU::TSelectionInfo aSelectionInfo = VISU::GetSelectedObjects(this); if(aSelectionInfo.empty()) return; - + VISU::TSelectionItem aSelectionItem = aSelectionInfo.front(); Handle(SALOME_InteractiveObject) anIO = aSelectionItem.myIO; VISU::Base_i* aBase = aSelectionItem.myObjectInfo.myBase; @@ -1779,7 +1779,7 @@ VisuGUI case VISU::TPOINTMAP3D: { // Table object if (VISU::PointMap3d_i* aTable3d = dynamic_cast(aBase)) { aTable3d->SetTitle(Name.toLatin1().constData()); - aTable3d->UpdateActors(); + aTable3d->UpdateActors(); } break; } @@ -3357,8 +3357,11 @@ void VisuGUI::createPreferences() addPreference( tr( "VISU_LABELS_FORMAT" ), colorsLabelsGr, LightApp_Preferences::String, "VISU", "scalar_bar_label_format" ); + int frame = addPreference( "", sbarTab, LightApp_Preferences::Frame, "", "" ); + setPreferenceProperty( frame, "orientation", "horizontal" ); + // group: "Orientation" - int orientGr = addPreference( tr( "VISU_ORIENTATION" ), sbarTab ); + int orientGr = addPreference( tr( "VISU_ORIENTATION" ), frame, LightApp_Preferences::GroupBox ); setPreferenceProperty( orientGr, "columns", 2 ); int orient = addPreference( tr( "VISU_ORIENTATION" ), orientGr, LightApp_Preferences::Selector, "VISU", "scalar_bar_orientation" ); @@ -3371,8 +3374,17 @@ void VisuGUI::createPreferences() setPreferenceProperty( orient, "strings", orients ); setPreferenceProperty( orient, "indexes", indices ); + // group: "Scalar bars default position" + int scalarBarGr = addPreference( tr( "Scalar bars default position" ), frame, LightApp_Preferences::GroupBox ); + addPreference( tr( "Arrange Scalar Bars" ), scalarBarGr, LightApp_Preferences::Bool, "VISU", "scalar_bars_default_position" ); + + // group: "Origin & Size Vertical" - int posVSizeGr = addPreference( tr( "VISU_ORIGIN_AND_SIZE" ) + " " + tr( "VISU_VERTICAL" ), sbarTab ); + int psSzFrame = addPreference( "", sbarTab, LightApp_Preferences::Frame, "", "" ); + setPreferenceProperty( psSzFrame, "orientation", "horizontal" ); + + int posVSizeGr = addPreference( tr( "VISU_ORIGIN_AND_SIZE" ) + " " + tr( "VISU_VERTICAL" ), + psSzFrame, LightApp_Preferences::GroupBox ); setPreferenceProperty( posVSizeGr, "columns", 2 ); int xv = addPreference( tr( "VISU_X" ), posVSizeGr, LightApp_Preferences::DblSpin, "VISU", "scalar_bar_vertical_x" ); @@ -3431,7 +3443,8 @@ void VisuGUI::createPreferences() setPreferenceProperty( bhv, "max", 100 ); // group: "Origin & Size Horizontal" - int posHSizeGr = addPreference( tr( "VISU_ORIGIN_AND_SIZE" ) + " " + tr( "VISU_HORIZONTAL" ), sbarTab ); + int posHSizeGr = addPreference( tr( "VISU_ORIGIN_AND_SIZE" ) + " " + tr( "VISU_HORIZONTAL" ), + psSzFrame, LightApp_Preferences::GroupBox ); setPreferenceProperty( posHSizeGr, "columns", 2 ); int xh = addPreference( tr( "VISU_X" ), posHSizeGr, @@ -3490,10 +3503,6 @@ void VisuGUI::createPreferences() setPreferenceProperty( bwh, "max", 100 ); setPreferenceProperty( bhh, "max", 100 ); - // group: "Scalar bars default position" - int scalarBarGr = addPreference( tr( "Scalar bars default position" ), sbarTab ); - addPreference( tr( "Arrange Scalar Bars" ), scalarBarGr, LightApp_Preferences::Bool, "VISU", "scalar_bars_default_position" ); - // TAB: "CutLines" int cutLineTab = addPreference( tr( "CutLines" ) ); @@ -4049,7 +4058,7 @@ void VisuGUI::OnExportMED() SUIT_ResourceMgr* aResourceMgr = GetResourceMgr(); QString aDir = aResourceMgr->stringValue("VISU","OutputDir",""); - + // get name for the file QStringList aFilter; aFilter.append("MED Files (*.med)"); @@ -4059,7 +4068,7 @@ void VisuGUI::OnExportMED() QString aBaseName = anInitFileInfo.fileName(); QString aPath = Qtx::addSlash(aDir) + aBaseName; - + QFileInfo aFileInfo = SUIT_FileDlg::getFileName(GetDesktop(this), aPath, -- 2.39.2