From adb85bb90a9e2c22a04b5e744ee337ef8db748c7 Mon Sep 17 00:00:00 2001 From: stv Date: Thu, 17 Jul 2008 11:20:24 +0000 Subject: [PATCH] *** empty log message *** --- src/VISUGUI/VisuGUI.cxx | 114 +++++++++------- src/VISUGUI/VisuGUI_Module.cxx | 232 ++++++++++++++++----------------- 2 files changed, 181 insertions(+), 165 deletions(-) diff --git a/src/VISUGUI/VisuGUI.cxx b/src/VISUGUI/VisuGUI.cxx index a802ab00..d7784739 100644 --- a/src/VISUGUI/VisuGUI.cxx +++ b/src/VISUGUI/VisuGUI.cxx @@ -489,7 +489,7 @@ void VisuGUI::OnLoadComponentData() CORBA::String_var aCompDataType = aSComp->ComponentDataType(); QString anInfo ("Loading "); - anInfo = anInfo + aCompDataType.in() + " Component Data ..."; + anInfo = anInfo + aCompDataType.in() + " Component Data ..."; application()->putInfo( anInfo ); // obtain a driver by a component data type @@ -1788,11 +1788,11 @@ VisuGUI _PTR(Study) aCStudy = GetCStudy(GetAppStudy(this)); _PTR(SObject) aSObj = aCStudy->FindObjectID(anIO->getEntry()); - if (!aSObj) + if (!aSObj) return; VISU::VISUType aType = VISU::Storable::SObject2Type( aSObj ); - if (aType != VISU::TANIMATION) + if (aType != VISU::TANIMATION) return; VisuGUI_TimeAnimationDlg* aAnimationDlg = @@ -2551,7 +2551,7 @@ VisuGUI mgr->insert( action( VISU_MULTIPR_MED_RES ), -1, -1, -1 ); mgr->insert( action( VISU_MULTIPR_LOW_RES ), -1, -1, -1 ); mgr->insert( action( VISU_MULTIPR_HIDE ), -1, -1, -1 ); - + // Rules QString aPrsAll ("'VISU::TSCALARMAP' 'VISU::TISOSURFACES' 'VISU::TDEFORMEDSHAPE' 'VISU::TCUTPLANES' " @@ -2725,7 +2725,7 @@ VisuGUI //aRule = "client='ObjectBrowser' and type='MEDFIELD'"; //mgr->setRule( action( VISU_IMPORT_MED ), aRule, true ); - + aRule = "client='ObjectBrowser' and selcount>=1 and $type in {'VISU::TPART'} and "; { QString aCustomRule = aRule + "fullResolution=1 and resolutionState!='F'"; @@ -2767,7 +2767,7 @@ void VisuGUI::contextMenuPopup( const QString& theClient, QMenu* theMenu, QStrin SALOME_ListIteratorOfListIO It (aListIO); for (; It.More(); It.Next()) { Handle(SALOME_InteractiveObject)& anIO = It.Value(); - + if (!anIO.IsNull() && anIO->hasEntry()) { _PTR(SObject) aSObject = aCStudy->FindObjectID(anIO->getEntry()); if ( !aSObject ) @@ -2780,7 +2780,7 @@ void VisuGUI::contextMenuPopup( const QString& theClient, QMenu* theMenu, QStrin _PTR(SObject) aPrs; for (; anIter->More(); anIter->Next()) { aPrs = anIter->Value(); - if (!aPrs) + if (!aPrs) continue; std::vector aSubList = GetPrs3dList(this, aPrs); nbPrs += aSubList.size(); @@ -3051,15 +3051,12 @@ void VisuGUI::createPreferences() // group: "Font" int fontGr = addPreference( tr( "VISU_FONT" ), sbarTab ); - setPreferenceProperty( fontGr, "columns", 4 ); - int tfont = addPreference( tr( "VISU_TITLE" ), fontGr, - LightApp_Preferences::Font, "VISU", "scalar_bar_title_font" ); - addPreference( tr( "VISU_TITLE" ), fontGr, - LightApp_Preferences::Color, "VISU", "scalar_bar_title_color" ); - int lfont = addPreference( tr( "VISU_LABELS" ), fontGr, - LightApp_Preferences::Font, "VISU", "scalar_bar_label_font" ); - addPreference( tr( "VISU_LABELS" ), fontGr, - LightApp_Preferences::Color, "VISU", "scalar_bar_label_color" ); + setPreferenceProperty( fontGr, "columns", 2 ); + + int tfont = addPreference( tr( "VISU_TITLE" ), fontGr, LightApp_Preferences::Font, "VISU", "scalar_bar_title_font" ); + addPreference( tr( "VISU_TITLE" ), fontGr, LightApp_Preferences::Color, "VISU", "scalar_bar_title_color" ); + int lfont = addPreference( tr( "VISU_LABELS" ), fontGr, LightApp_Preferences::Font, "VISU", "scalar_bar_label_font" ); + addPreference( tr( "VISU_LABELS" ), fontGr, LightApp_Preferences::Color, "VISU", "scalar_bar_label_color" ); QStringList fam; fam.append( tr( "VISU_FONT_ARIAL" ) ); @@ -3110,28 +3107,32 @@ void VisuGUI::createPreferences() // group: "Origin & Size Vertical" int posVSizeGr = addPreference( tr( "VISU_ORIGIN_AND_SIZE" ) + " " + tr( "VISU_VERTICAL" ), sbarTab ); - setPreferenceProperty( posVSizeGr, "columns", 10 ); + setPreferenceProperty( posVSizeGr, "columns", 2 ); int xv = addPreference( tr( "VISU_X" ), posVSizeGr, LightApp_Preferences::DblSpin, "VISU", "scalar_bar_vertical_x" ); - int wv = addPreference( tr( "VISU_WIDTH" ), posVSizeGr, - LightApp_Preferences::DblSpin, "VISU", "scalar_bar_vertical_width" ); - int twv = addPreference( tr( "VISU_TITLE_WIDTH" ), posVSizeGr, - LightApp_Preferences::IntSpin, "VISU", "scalar_bar_vertical_title_width" ); - int lwv = addPreference( tr( "VISU_LABEL_WIDTH" ), posVSizeGr, - LightApp_Preferences::IntSpin, "VISU", "scalar_bar_vertical_label_width" ); - int bwv = addPreference( tr( "VISU_BAR_WIDTH" ), posVSizeGr, - LightApp_Preferences::IntSpin, "VISU", "scalar_bar_vertical_bar_width" ); - int yv = addPreference( tr( "VISU_Y" ), posVSizeGr, LightApp_Preferences::DblSpin, "VISU", "scalar_bar_vertical_y" ); + + int wv = addPreference( tr( "VISU_WIDTH" ), posVSizeGr, + LightApp_Preferences::DblSpin, "VISU", "scalar_bar_vertical_width" ); int hv = addPreference( tr( "VISU_HEIGHT" ), posVSizeGr, LightApp_Preferences::DblSpin, "VISU", "scalar_bar_vertical_height" ); + + int twv = addPreference( tr( "VISU_TITLE_WIDTH" ), posVSizeGr, + LightApp_Preferences::IntSpin, "VISU", "scalar_bar_vertical_title_width" ); int thv = addPreference( tr( "VISU_TITLE_HEIGHT" ), posVSizeGr, LightApp_Preferences::IntSpin, "VISU", "scalar_bar_vertical_title_height" ); + + int lwv = addPreference( tr( "VISU_LABEL_WIDTH" ), posVSizeGr, + LightApp_Preferences::IntSpin, "VISU", "scalar_bar_vertical_label_width" ); int lhv = addPreference( tr( "VISU_LABEL_HEIGHT" ), posVSizeGr, LightApp_Preferences::IntSpin, "VISU", "scalar_bar_vertical_label_height" ); + + int bwv = addPreference( tr( "VISU_BAR_WIDTH" ), posVSizeGr, + LightApp_Preferences::IntSpin, "VISU", "scalar_bar_vertical_bar_width" ); int bhv = addPreference( tr( "VISU_BAR_HEIGHT" ), posVSizeGr, LightApp_Preferences::IntSpin, "VISU", "scalar_bar_vertical_bar_height" ); + setPreferenceProperty( xv, "step", 0.1 ); setPreferenceProperty( yv, "step", 0.1 ); setPreferenceProperty( wv, "step", 0.1 ); @@ -3165,28 +3166,33 @@ void VisuGUI::createPreferences() // group: "Origin & Size Horizontal" int posHSizeGr = addPreference( tr( "VISU_ORIGIN_AND_SIZE" ) + " " + tr( "VISU_HORIZONTAL" ), sbarTab ); - setPreferenceProperty( posHSizeGr, "columns", 10 ); + setPreferenceProperty( posHSizeGr, "columns", 2 ); + int xh = addPreference( tr( "VISU_X" ), posHSizeGr, LightApp_Preferences::DblSpin, "VISU", "scalar_bar_horizontal_x" ); - int wh = addPreference( tr( "VISU_WIDTH" ), posHSizeGr, - LightApp_Preferences::DblSpin, "VISU", "scalar_bar_horizontal_width" ); - int twh = addPreference( tr( "Title width (%)" ), posHSizeGr, - LightApp_Preferences::IntSpin, "VISU", "scalar_bar_horizontal_title_width" ); - int lwh = addPreference( tr( "Label width (%)" ), posHSizeGr, - LightApp_Preferences::IntSpin, "VISU", "scalar_bar_horizontal_label_width" ); - int bwh = addPreference( tr( "Bar width (%)" ), posHSizeGr, - LightApp_Preferences::IntSpin, "VISU", "scalar_bar_horizontal_bar_width" ); - int yh = addPreference( tr( "VISU_Y" ), posHSizeGr, LightApp_Preferences::DblSpin, "VISU", "scalar_bar_horizontal_y" ); + + int wh = addPreference( tr( "VISU_WIDTH" ), posHSizeGr, + LightApp_Preferences::DblSpin, "VISU", "scalar_bar_horizontal_width" ); int hh = addPreference( tr( "VISU_HEIGHT" ), posHSizeGr, LightApp_Preferences::DblSpin, "VISU", "scalar_bar_horizontal_height" ); + + int twh = addPreference( tr( "Title width (%)" ), posHSizeGr, + LightApp_Preferences::IntSpin, "VISU", "scalar_bar_horizontal_title_width" ); int thh = addPreference( tr( "Title height (%)" ), posHSizeGr, LightApp_Preferences::IntSpin, "VISU", "scalar_bar_horizontal_title_height" ); + + int lwh = addPreference( tr( "Label width (%)" ), posHSizeGr, + LightApp_Preferences::IntSpin, "VISU", "scalar_bar_horizontal_label_width" ); int lhh = addPreference( tr( "Label height (%)" ), posHSizeGr, LightApp_Preferences::IntSpin, "VISU", "scalar_bar_horizontal_label_height" ); + + int bwh = addPreference( tr( "Bar width (%)" ), posHSizeGr, + LightApp_Preferences::IntSpin, "VISU", "scalar_bar_horizontal_bar_width" ); int bhh = addPreference( tr( "Bar height (%)" ), posHSizeGr, LightApp_Preferences::IntSpin, "VISU", "scalar_bar_horizontal_bar_height" ); + setPreferenceProperty( xh, "step", 0.1 ); setPreferenceProperty( yh, "step", 0.1 ); setPreferenceProperty( wh, "step", 0.1 ); @@ -3335,7 +3341,9 @@ void VisuGUI::createPreferences() int iso_surfaces_represent = addPreference( tr( "VISU_ISO_SURFACES" ), representGr, LightApp_Preferences::Selector, "VISU", "iso_surfaces_represent" ); setPreferenceProperty( iso_surfaces_represent, "strings", modes2 ); setPreferenceProperty( iso_surfaces_represent, "indexes", indices2 ); - addPreference( "", representGr, LightApp_Preferences::Space ); + int sp = addPreference( "", representGr, LightApp_Preferences::Space ); + setPreferenceProperty( sp, "hstretch", 0 ); + setPreferenceProperty( sp, "vstretch", 0 ); int cut_planes_represent = addPreference( tr( "VISU_CUT_PLANES" ), representGr, LightApp_Preferences::Selector, "VISU", "cut_planes_represent" ); setPreferenceProperty( cut_planes_represent, "strings", modes2 ); @@ -3345,7 +3353,9 @@ void VisuGUI::createPreferences() int cut_lines_represent = addPreference( tr( "VISU_CUT_LINES" ), representGr, LightApp_Preferences::Selector, "VISU", "cut_lines_represent" ); setPreferenceProperty( cut_lines_represent, "strings", modes3 ); setPreferenceProperty( cut_lines_represent, "indexes", indices3 ); - addPreference( "", representGr, LightApp_Preferences::Space ); + sp = addPreference( "", representGr, LightApp_Preferences::Space ); + setPreferenceProperty( sp, "hstretch", 0 ); + setPreferenceProperty( sp, "vstretch", 0 ); int deformed_shape_represent = addPreference( tr( "VISU_DEFORMED_SHAPE" ), representGr, LightApp_Preferences::Selector, "VISU", "deformed_shape_represent" ); setPreferenceProperty( deformed_shape_represent, "strings", mesh_modes ); @@ -3355,29 +3365,35 @@ void VisuGUI::createPreferences() int vectors_represent = addPreference( tr( "VISU_VECTORS" ), representGr, LightApp_Preferences::Selector, "VISU", "vectors_represent" ); setPreferenceProperty( vectors_represent, "strings", modes3 ); setPreferenceProperty( vectors_represent, "indexes", indices3 ); - addPreference( "", representGr, LightApp_Preferences::Space ); + sp = addPreference( "", representGr, LightApp_Preferences::Space ); + setPreferenceProperty( sp, "hstretch", 0 ); + setPreferenceProperty( sp, "vstretch", 0 ); int stream_lines_represent = addPreference( tr( "VISU_STREAM_LINES" ), representGr, LightApp_Preferences::Selector, "VISU", "stream_lines_represent" ); setPreferenceProperty( stream_lines_represent, "strings", modes3 ); setPreferenceProperty( stream_lines_represent, "indexes", indices3 ); - addPreference( "", representGr, LightApp_Preferences::Space ); + sp = addPreference( "", representGr, LightApp_Preferences::Space ); + setPreferenceProperty( sp, "hstretch", 0 ); + setPreferenceProperty( sp, "vstretch", 0 ); int plot3d_represent = addPreference( tr( "VISU_PLOT3D" ), representGr, LightApp_Preferences::Selector, "VISU", "plot3d_represent" ); setPreferenceProperty( plot3d_represent, "strings", modes2 ); setPreferenceProperty( plot3d_represent, "indexes", indices2 ); - addPreference( "", representGr, LightApp_Preferences::Space ); + sp = addPreference( "", representGr, LightApp_Preferences::Space ); + setPreferenceProperty( sp, "hstretch", 0 ); + setPreferenceProperty( sp, "vstretch", 0 ); int scalar_def_represent = addPreference( tr( "VISU_SCALAR_MAP_ON_DEFORMED_SHAPE" ), representGr, LightApp_Preferences::Selector, "VISU", "scalar_def_represent" ); setPreferenceProperty( scalar_def_represent, "strings", modes1 ); setPreferenceProperty( scalar_def_represent, "indexes", indices1 ); addPreference( tr( "VISU_SHRINK" ), representGr, LightApp_Preferences::Bool, "VISU", "scalar_def_shrink" ); - addPreference( tr( "VISU_USE_SHADING" ), representGr, - LightApp_Preferences::Bool, "VISU", "represent_shading" ); - addPreference( "", representGr, LightApp_Preferences::Space ); + addPreference( tr( "VISU_USE_SHADING" ), representGr, LightApp_Preferences::Bool, "VISU", "represent_shading" ); + sp = addPreference( "", representGr, LightApp_Preferences::Space ); + setPreferenceProperty( sp, "hstretch", 0 ); + setPreferenceProperty( sp, "vstretch", 0 ); - addPreference( tr( "VISU_DISP_ONLY" ), representGr, - LightApp_Preferences::Bool, "VISU", "display_only" ); + addPreference( tr( "VISU_DISP_ONLY" ), representGr, LightApp_Preferences::Bool, "VISU", "display_only" ); // TAB: 3D Cache ; group: "Cache properties" int cacheTab = addPreference( tr( "3D Cache" ) ); @@ -3544,7 +3560,7 @@ void VisuGUI::OnPlot3dFromCutPlane() VISU::VISUType aType = VISU::Storable::RestoringMap2Type( aRestoringMap ); if (aType != TTIMESTAMP ) return; - + QString aMeshName = aRestoringMap["myMeshName"]; QString anEntity = aRestoringMap["myEntityId"]; QString aFieldName = aRestoringMap["myFieldName"]; @@ -3679,7 +3695,7 @@ void VisuGUI::OnMultiprChangeRes(VISU::Result::Resolution theResolution) VISU::Result_var aResult = FindResult( VISU::GetSObject( aSObject ).in() ); if(CORBA::is_nil(aResult.in())) continue; - + VISU::Result_i* aCResult = dynamic_cast(VISU::GetServant(aResult).in()); if(!aCResult) continue; @@ -3689,7 +3705,7 @@ void VisuGUI::OnMultiprChangeRes(VISU::Result::Resolution theResolution) QString aMeshName = Storable::FindValue(aRestoringMap, "myMeshName", &anIsFound); if(!anIsFound) continue; - + std::string aPartName = aSObject->GetName(); aCResult->SetResolution(aMeshName.toLatin1().data(), aPartName.c_str(), theResolution); diff --git a/src/VISUGUI/VisuGUI_Module.cxx b/src/VISUGUI/VisuGUI_Module.cxx index d2a59a73..4dd635c7 100644 --- a/src/VISUGUI/VisuGUI_Module.cxx +++ b/src/VISUGUI/VisuGUI_Module.cxx @@ -182,7 +182,7 @@ namespace VISU //--------------------------------------------------------------- VisuGUI_Module:: -VisuGUI_Module() : +VisuGUI_Module() : VisuGUI() { } @@ -209,19 +209,19 @@ initialize( CAM_Application* theApp ) tr( "MEN_DESK_FILE_SAVE_GUI_STATE" ), tr( "PRP_DESK_FILE_SAVE_GUI_STATE" ), 0, getApp()->desktop(), false, getApp(), SLOT( onSaveGUIState() ) ); int fileMenu = createMenu( tr( "MEN_DESK_FILE" ), -1 ); - createMenu( SAVE_VISU_STATE, fileMenu, 9, -1 ); - + createMenu( SAVE_VISU_STATE, fileMenu, 9, -1 ); + QPixmap aPixmap; aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_GAUSS_NEW_VIEWER")); - createAction( GAUSS_NEW_VIEWER, - tr("MEN_GAUSS_NEW_VIEWER"), + createAction( GAUSS_NEW_VIEWER, + tr("MEN_GAUSS_NEW_VIEWER"), aPixmap, - tr("MEN_GAUSS_NEW_VIEWER"), + tr("MEN_GAUSS_NEW_VIEWER"), tr("MEN_GAUSS_NEW_VIEWER"), - Qt::ALT+Qt::Key_S, - this, + Qt::ALT+Qt::Key_S, + this, false, - this, + this, SLOT(onCreateViewManager())); int windowMenu = createMenu( tr( "MEN_DESK_WINDOW" ), -1, 100 ); int newWinMenu = createMenu( tr( "MEN_DESK_NEWWINDOW" ), windowMenu, -1, 0 ); @@ -258,7 +258,7 @@ initialize( CAM_Application* theApp ) tr("MEN_GAUSS_CREATE_PRS"), "", 0, this, false, this, SLOT(OnCreateGaussPoints())); mgr->insert( action( GAUSS_CREATE_PRS ), -1, 0, -1 ); - mgr->setRule( action( GAUSS_CREATE_PRS ), + mgr->setRule( action( GAUSS_CREATE_PRS ), "client='ObjectBrowser' and selcount=1 " "and type in {'VISU::TTIMESTAMP' 'VISU::TFIELD'} " "and $medEntity in {'EDGE_ENTITY' 'FACE_ENTITY' 'CELL_ENTITY'} " @@ -271,27 +271,27 @@ initialize( CAM_Application* theApp ) VisuGUI::tr("MEN_RENAME"), "", 0, this, false, this, SLOT(OnRename())); mgr->insert( action( GAUSS_RENAME ), -1, 0, -1 ); - mgr->setRule( action( GAUSS_RENAME ), + mgr->setRule( action( GAUSS_RENAME ), "selcount=1 and type='VISU::TGAUSSPOINTS'" ); createAction( GAUSS_EDIT_PRS, VisuGUI::tr("MEN_EDIT_PRS"), QIcon(), VisuGUI::tr("MEN_EDIT_PRS"), "", 0, this, false, this, SLOT(OnEditGaussPoints())); mgr->insert( action( GAUSS_EDIT_PRS ), -1, 0, -1 ); - mgr->setRule( action( GAUSS_EDIT_PRS ), + mgr->setRule( action( GAUSS_EDIT_PRS ), "selcount=1 and type='VISU::TGAUSSPOINTS'" ); createAction( GAUSS_COPY_PRS, VisuGUI::tr("MEN_COPY_PRS"), QIcon(), VisuGUI::tr("MEN_COPY_PRS"), "", 0, this, false, this, SLOT(OnCopyPresentation())); mgr->insert( action( GAUSS_COPY_PRS ), -1, 0, -1 ); - mgr->setRule( action( GAUSS_COPY_PRS ), + mgr->setRule( action( GAUSS_COPY_PRS ), "selcount=1 and type='VISU::TGAUSSPOINTS'" ); - + action( GAUSS_COPY_PRS )->setEnabled(false); QStringList viewers; - + #ifndef DISABLE_OCCVIEWER #ifndef DISABLE_SALOMEOBJECT viewers.append( SOCC_Viewer::Type() ); @@ -331,24 +331,24 @@ initialize( CAM_Application* theApp ) VisuGUI::tr("MEN_HIDE"), "", 0, this, false, this, SLOT(OnErasePrs())); mgr->insert( action( GAUSS_ERASE_PRS ), -1, -1, -1 ); // erase - mgr->setRule( action( GAUSS_ERASE_PRS ), + mgr->setRule( action( GAUSS_ERASE_PRS ), aRule + " and ({true} in $canBeDisplayed) and (isVisible=true)" ); createAction( GAUSS_DISPLAY_PRS, VisuGUI::tr("MEN_SHOW"), QIcon(), VisuGUI::tr("MEN_SHOW"), "", 0, this, false, this, SLOT(OnDisplayPrs())); mgr->insert( action( GAUSS_DISPLAY_PRS ), -1, -1, -1 ); // display - mgr->setRule( action( GAUSS_DISPLAY_PRS ), + mgr->setRule( action( GAUSS_DISPLAY_PRS ), aRule + " and ({true} in $canBeDisplayed) and (isVisible=false)" ); createAction( GAUSS_DISPLAY_ONLY_PRS, VisuGUI::tr("MEN_DISPLAY_ONLY"), QIcon(), VisuGUI::tr("MEN_DISPLAY_ONLY"), "", 0, this, false, this, SLOT(OnDisplayOnlyPrs())); mgr->insert( action( GAUSS_DISPLAY_ONLY_PRS ), -1, -1, -1 ); // display only - mgr->setRule( action( GAUSS_DISPLAY_ONLY_PRS ), + mgr->setRule( action( GAUSS_DISPLAY_ONLY_PRS ), aRule + " and ({true} in $canBeDisplayed)" ); - createAction( GAUSS_RENAME_CONFIGURATION, VisuGUI::tr("MEN_RENAME"), QIcon(), + createAction( GAUSS_RENAME_CONFIGURATION, VisuGUI::tr("MEN_RENAME"), QIcon(), VisuGUI::tr("MEN_RENAME"), "", 0, this, false, this, SLOT(OnRename())); mgr->insert( action( GAUSS_RENAME_CONFIGURATION ), -1, -1, -1 ); @@ -416,7 +416,7 @@ onCreateViewManager() aResourceMgr->booleanValue( "VTKViewer", "relative_size", aViewer->trihedronRelative() ) ); new LightApp_VTKSelector( aViewer, anApp->selectionMgr() ); anApp->addViewManager( aViewManager ); - + VVTK_ViewWindow* aViewWindow = ( VVTK_ViewWindow* )aViewManager->createViewWindow(); if( aViewWindow ) { @@ -428,7 +428,7 @@ onCreateViewManager() //--------------------------------------------------------------- -void +void VisuGUI_Module:: createPreferences() { @@ -444,7 +444,7 @@ createPreferences() //--------------------------------------------------------------- -void +void VisuGUI_Module:: createGaussPointsPreferences() { @@ -496,7 +496,7 @@ createGaussPointsPreferences() setPreferenceProperty( faceLimitPref, "max", 1000000 ); int sizeGr = addPreference( tr( "VISU_GAUSS_PREF_SIZE_GROUP_TTL" ), gaussTab ); - setPreferenceProperty( sizeGr, "columns", 4 ); + setPreferenceProperty( sizeGr, "columns", 2 ); int minSizePref = addPreference( tr( "VISU_GAUSS_PREF_MIN_SIZE" ), sizeGr, LightApp_Preferences::IntSpin, "VISU", "point_sprite_min_size" ); @@ -571,7 +571,7 @@ createGaussPointsPreferences() //--------------------------------------------------------------- -void +void VisuGUI_Module:: createInsideCursorPreferences() { @@ -608,7 +608,7 @@ createInsideCursorPreferences() int alphaThresholdPref = addPreference( tr( "VISU_GAUSS_PREF_ALPHA_THRESHOLD" ), primitiveGr, LightApp_Preferences::DblSpin, "VISU", - "inside_point_sprite_alpha_threshold" ); + "inside_point_sprite_alpha_threshold" ); setPreferenceProperty( alphaThresholdPref, "min", 0.0 ); setPreferenceProperty( alphaThresholdPref, "max", 1.0 ); setPreferenceProperty( alphaThresholdPref, "step", 0.1 ); @@ -659,7 +659,7 @@ createInsideCursorPreferences() //--------------------------------------------------------------- -void +void VisuGUI_Module:: createOutsideCursorPreferences() { @@ -696,7 +696,7 @@ createOutsideCursorPreferences() int alphaThresholdPref = addPreference( tr( "VISU_GAUSS_PREF_ALPHA_THRESHOLD" ), primitiveGr, LightApp_Preferences::DblSpin, "VISU", - "outside_point_sprite_alpha_threshold" ); + "outside_point_sprite_alpha_threshold" ); setPreferenceProperty( alphaThresholdPref, "min", 0.0 ); setPreferenceProperty( alphaThresholdPref, "max", 1.0 ); setPreferenceProperty( alphaThresholdPref, "step", 0.1 ); @@ -733,7 +733,7 @@ createOutsideCursorPreferences() //--------------------------------------------------------------- -void +void VisuGUI_Module:: createPickingPreferences() { @@ -814,7 +814,7 @@ createPickingPreferences() //--------------------------------------------------------------- -void +void VisuGUI_Module:: createSpaceMousePreferences() { @@ -894,7 +894,7 @@ createSpaceMousePreferences() //--------------------------------------------------------------- -void +void VisuGUI_Module:: createRecorderPreferences() { @@ -945,7 +945,7 @@ VisuGUI_Module:: OnViewManagerAdded(SUIT_ViewManager* viewMgr) { QString type = viewMgr->getViewModel()->getType(); - if ( type == VVTK_Viewer::Type() ) + if ( type == VVTK_Viewer::Type() ) connect( viewMgr, SIGNAL( viewCreated( SUIT_ViewWindow* ) ), this, SLOT( OnViewCreated( SUIT_ViewWindow* ) ) ); } @@ -1020,12 +1020,12 @@ preferencesChanged( const QString& group, const QString& pref ) VisuGUI::preferencesChanged(group,pref); if ( group == "VISU" && ( pref == "speed_increment" || pref == "spacemouse_func1_btn" || - pref == "spacemouse_func2_btn" || pref == "spacemouse_func3_btn" || + pref == "spacemouse_func2_btn" || pref == "spacemouse_func3_btn" || pref == "spacemouse_func4_btn" || pref == "spacemouse_func5_btn" ) ) { // update properties of VVTK view windows SUIT_ViewManager* vm = getApp()->getViewManager( VVTK_Viewer::Type(), false ); - if ( vm ) + if ( vm ) setProperty( dynamic_cast( vm ), pref ); } } @@ -1034,7 +1034,7 @@ preferencesChanged( const QString& group, const QString& pref ) //--------------------------------------------------------------- SUIT_ViewManager* VisuGUI_Module:: -getViewManager(const QString& theType, +getViewManager(const QString& theType, const bool theIsCreate) { if (SUIT_ViewManager* aViewManager = VisuGUI::getViewManager(theType,theIsCreate)) @@ -1081,7 +1081,7 @@ namespace Storable::DataToStream(theStr,(std::string("myColor") + theSuffix + ".R").c_str(),aColor[0]); Storable::DataToStream(theStr,(std::string("myColor") + theSuffix + ".G").c_str(),aColor[1]); Storable::DataToStream(theStr,(std::string("myColor") + theSuffix + ".B").c_str(),aColor[2]); - + double aPosition[3]; vtkCamera* aCamera = aRenderer->GetActiveCamera(); aCamera->GetPosition(aPosition); @@ -1094,16 +1094,16 @@ namespace Storable::DataToStream(theStr,(std::string("myFocalPnt") + theSuffix + "[0]").c_str(),aFocalPnt[0]); Storable::DataToStream(theStr,(std::string("myFocalPnt") + theSuffix + "[1]").c_str(),aFocalPnt[1]); Storable::DataToStream(theStr,(std::string("myFocalPnt") + theSuffix + "[2]").c_str(),aFocalPnt[2]); - + double aViewUp[3]; aCamera->GetViewUp(aViewUp); Storable::DataToStream(theStr,(std::string("myViewUp") + theSuffix + "[0]").c_str(),aViewUp[0]); Storable::DataToStream(theStr,(std::string("myViewUp") + theSuffix + "[1]").c_str(),aViewUp[1]); Storable::DataToStream(theStr,(std::string("myViewUp") + theSuffix + "[2]").c_str(),aViewUp[2]); - + vtkFloatingPointType aParallelScale = aCamera->GetParallelScale(); Storable::DataToStream(theStr,(std::string("myParallelScale") + theSuffix).c_str(),aParallelScale); - + double aScaleFactor[3]; theViewWindow->GetScale(aScaleFactor); Storable::DataToStream(theStr,(std::string("myScaleFactor") + theSuffix + "[0]").c_str(),aScaleFactor[0]); @@ -1123,7 +1123,7 @@ namespace aColor[2] = Storable::FindValue(theMap,std::string("myColor") + theSuffix + ".B").toDouble(); vtkRenderer* aRenderer = theViewWindow->getRenderer(); aRenderer->SetBackground(aColor); - + double aPosition[3]; aPosition[0] = Storable::FindValue(theMap,std::string("myPosition") + theSuffix + "[0]").toDouble(); aPosition[1] = Storable::FindValue(theMap,std::string("myPosition") + theSuffix + "[1]").toDouble(); @@ -1136,7 +1136,7 @@ namespace aFocalPnt[1] = Storable::FindValue(theMap,std::string("myFocalPnt") + theSuffix + "[1]").toDouble(); aFocalPnt[2] = Storable::FindValue(theMap,std::string("myFocalPnt") + theSuffix + "[2]").toDouble(); aCamera->SetFocalPoint(aFocalPnt); - + double aViewUp[3]; aViewUp[0] = Storable::FindValue(theMap,std::string("myViewUp") + theSuffix + "[0]").toDouble(); aViewUp[1] = Storable::FindValue(theMap,std::string("myViewUp") + theSuffix + "[1]").toDouble(); @@ -1145,7 +1145,7 @@ namespace vtkFloatingPointType aParallelScale = Storable::FindValue(theMap,std::string("myParallelScale") + theSuffix).toDouble(); aCamera->SetParallelScale(aParallelScale); - + double aScaleFactor[3]; aScaleFactor[0] = Storable::FindValue(theMap,std::string("myScaleFactor") + theSuffix + "[0]").toDouble(); aScaleFactor[1] = Storable::FindValue(theMap,std::string("myScaleFactor") + theSuffix + "[1]").toDouble(); @@ -1170,16 +1170,16 @@ namespace Storable::DataToStream(theStr,"myCursorOrigin[0]",anOrigin[0]); Storable::DataToStream(theStr,"myCursorOrigin[1]",anOrigin[1]); Storable::DataToStream(theStr,"myCursorOrigin[2]",anOrigin[2]); - + vtkFloatingPointType aNormal[3]; aPlanesWidget->GetNormal(aNormal); Storable::DataToStream(theStr,"myCursorNormal[0]",aNormal[0]); Storable::DataToStream(theStr,"myCursorNormal[1]",aNormal[1]); Storable::DataToStream(theStr,"myCursorNormal[2]",aNormal[2]); - + vtkFloatingPointType aDepth = aPlanesWidget->Distance(); Storable::DataToStream(theStr,"myCursorDepth",aDepth); - + aSegmentationMode = "Planes"; }else if(aWidgetCtrl->IsSphereActive()){ VISU_SphereWidget *aSphereWidget = aWidgetCtrl->GetSphereWidget(); @@ -1188,13 +1188,13 @@ namespace Storable::DataToStream(theStr,"mySphereCursorCenter[0]",aCenter[0]); Storable::DataToStream(theStr,"mySphereCursorCenter[1]",aCenter[1]); Storable::DataToStream(theStr,"mySphereCursorCenter[2]",aCenter[2]); - + vtkFloatingPointType aRadius = aSphereWidget->GetRadius(); Storable::DataToStream(theStr,"mySphereCursorRaduis",aRadius); - + aSegmentationMode = "Sphere"; } - + Storable::DataToStream(theStr,"mySegmentationMode",aSegmentationMode.c_str()); } } @@ -1231,11 +1231,11 @@ namespace std::ostringstream aStream; Storable::DataToStream(aStream,"myComment","GAUSSVIEW"); - + SVTK_Selector* aSelector = theViewWindow->GetSelector(); Selection_Mode aSelectionMode = aSelector->SelectionMode(); Storable::DataToStream(aStream,"mySelectionMode",aSelectionMode); - + GetViewParams(theViewWindow->getMainWindow1(),aStream); GetViewParams(theViewWindow->getMainWindow2(),aStream); @@ -1248,7 +1248,7 @@ namespace bool myIsSelected; bool myHasSubId; int mySubId; - + TSelection(): myIsSelected(false), myHasSubId(false), @@ -1267,7 +1267,7 @@ namespace {} void - operator()(VISU_GaussPtsAct* theActor) + operator()(VISU_GaussPtsAct* theActor) { if(theActor->GetVisibility()){ const Handle(SALOME_InteractiveObject)& anIO = theActor->getIO(); @@ -1286,7 +1286,7 @@ namespace TGetVisibleEntries aGetVisibleEntries(theVisibleEntries); SVTK::ForEach(anActors, aGetVisibleEntries); - + // Next, find the sub-ids for the visible Gauss Points presentations SVTK_Selector* aSelector = theViewWindow->GetSelector(); const SALOME_ListIO& aListIO = aSelector->StoredIObjects(); @@ -1314,7 +1314,7 @@ namespace void CreateReference(_PTR(Study) theStudyDocument, _PTR(StudyBuilder) theStudyBuilder, - _PTR(SObject) theFatherSObject, + _PTR(SObject) theFatherSObject, const string& theRefEntry, const TSelection& theSelection) { @@ -1356,14 +1356,14 @@ namespace // To set visiblity VISU::UpdateViewer(theModule, aPrs3d, /*disp_only = */anIsFirst, /*highlight = */false); anIsFirst = false; - + // To update selection Storable::TRestoringMap aMap = Storable::GetStorableMap(aChildSObject); if(!aMap.empty()){ bool anIsSelected = aMap["myIsSelected"].toInt(); bool aHasSubId = aMap["myHasSubId"].toInt(); int aSubId = aMap["mySubId"].toInt(); - + if(anIsSelected){ std::string anEntry = aSObject->GetID(); Handle(SALOME_InteractiveObject) anIO = new SALOME_InteractiveObject(anEntry.c_str(),""); @@ -1388,14 +1388,14 @@ namespace _PTR(Study) aCStudy = GetCStudy(GetAppStudy(theModule)); if (CheckLock(aCStudy,GetDesktop(theModule))) return; - + LightApp_SelectionMgr* aSelectionMgr = GetSelectionMgr(theModule); - + SUIT_ViewManager* aViewManager = theModule->getApp()->activeViewManager(); if(aViewManager->getType() == VVTK_Viewer::Type()){ SUIT_ViewWindow* aWindow = aViewManager->getActiveView(); VVTK_ViewWindow* aViewWindow = dynamic_cast(aWindow); - + SUIT_Study* aSStudy = aViewManager->study(); SalomeApp_Study* aStudy = dynamic_cast(aSStudy); _PTR(Study) aCStudy = aStudy->studyDS(); @@ -1406,15 +1406,15 @@ namespace if(theIsNew){ _PTR(SComponent) aSComponent = ClientFindOrCreateVisuComponent(aCStudy); - + static int myNbConfigs = 0; std::string aName = VISU::GenerateName("Config.", ++myNbConfigs).toLatin1().data(); - + std::string aSComponentEntry = aSComponent->GetID(); - anEntry = CreateAttributes(aCStudy, - aSComponentEntry.c_str(), - "", - "", + anEntry = CreateAttributes(aCStudy, + aSComponentEntry.c_str(), + "", + "", aName.c_str(), "", aValue.c_str()); @@ -1432,7 +1432,7 @@ namespace if(aCommentValue.compare("myComment=GAUSSVIEW") >= 0){ aComment->SetValue(aValue.c_str()); anEntry = aSObject->GetID(); - + _PTR(ChildIterator) aChildIter = aCStudy->NewChildIterator(aSObject); for (; aChildIter->More(); aChildIter->Next()) { _PTR(SObject) aChildSObject = aChildIter->Value(); @@ -1448,21 +1448,21 @@ namespace TVisibleEntries aVisibleEntries; GetGaussPointsSelection(aViewWindow, aVisibleEntries); - + _PTR(SObject) aSObject = aCStudy->FindObjectID(anEntry); _PTR(StudyBuilder) aStudyBuilder = aCStudy->NewBuilder(); TVisibleEntries::const_iterator anIter = aVisibleEntries.begin(); for(; anIter != aVisibleEntries.end(); anIter++){ const std::string& anEntry = anIter->first; const TSelection& aSelection = anIter->second; - + CreateReference(aCStudy, aStudyBuilder, - aSObject, + aSObject, anEntry, aSelection); } - + //UpdateObjBrowser(theModule,true,aSObject); UpdateObjBrowser(theModule,true); } @@ -1526,11 +1526,11 @@ OnRestoreConfiguration() if(!aMap.empty()){ SUIT_ViewWindow* aWindow = aViewManager->getActiveView(); VVTK_ViewWindow* aViewWindow = dynamic_cast(aWindow); - + Selection_Mode aSelectionMode = Storable::FindValue(aMap,"mySelectionMode").toInt(); SVTK_Selector* aSelector = aViewWindow->GetSelector(); aSelector->SetSelectionMode(aSelectionMode); - + SetGaussPointsSelection(this,aViewWindow,aCStudy,aSObject); std::string aSegmentationMode; @@ -1539,7 +1539,7 @@ OnRestoreConfiguration() aMainWindow->SetSphereSegementation(false); VISU_WidgetCtrl* aWidgetCtrl = aMainWindow->GetWidgetCtrl(); aSegmentationMode = Storable::FindValue(aMap,"mySegmentationMode").toLatin1().data(); - + if(aSegmentationMode == "Planes"){ VISU_PlanesWidget *aPlanesWidget = aWidgetCtrl->GetPlanesWidget(); vtkFloatingPointType anOrigin[3]; @@ -1547,16 +1547,16 @@ OnRestoreConfiguration() anOrigin[1] = Storable::FindValue(aMap,"myCursorOrigin[1]").toDouble(); anOrigin[2] = Storable::FindValue(aMap,"myCursorOrigin[2]").toDouble(); aPlanesWidget->SetOrigin(anOrigin); - + vtkFloatingPointType aNormal[3]; aNormal[0] = Storable::FindValue(aMap,"myCursorNormal[0]").toDouble(); aNormal[1] = Storable::FindValue(aMap,"myCursorNormal[1]").toDouble(); aNormal[2] = Storable::FindValue(aMap,"myCursorNormal[2]").toDouble(); aPlanesWidget->SetNormal(aNormal); - + vtkFloatingPointType aDepth = Storable::FindValue(aMap,"myCursorDepth").toDouble(); aPlanesWidget->SetDistance(aDepth); - + aMainWindow->SetPlanesSegementation(true); }else if(aSegmentationMode == "Sphere"){ VISU_SphereWidget *aSphereWidget = aWidgetCtrl->GetSphereWidget(); @@ -1565,10 +1565,10 @@ OnRestoreConfiguration() aCenter[1] = Storable::FindValue(aMap,"mySphereCursorCenter[1]").toDouble(); aCenter[2] = Storable::FindValue(aMap,"mySphereCursorCenter[2]").toDouble(); aSphereWidget->SetCenter(aCenter); - + vtkFloatingPointType aRadius = Storable::FindValue(aMap,"mySphereCursorRaduis").toDouble(); aSphereWidget->SetRadius(aRadius); - + aMainWindow->SetSphereSegementation(true); } } @@ -1657,13 +1657,13 @@ void VisuGUI_Module::storeVisualParameters(int savePoint) // saving VVTK viewer parameters. VVTK (Gauss Viewers) are NOT created by SalomeApp since // VVTK is declared in VISU, so here we store VVTK view window parameters. // VisuGUI_Module::restoreVisualParameters() creates VVTK_Views and restores its parameters. - ip->setProperty( "ActiveGaussViewer", "-1" ); + ip->setProperty( "ActiveGaussViewer", "-1" ); getApp()->viewManagers( VVTK_Viewer::Type(), lst ); for ( it = lst.begin(); it != lst.end(); it++ ) { - if ( SUIT_ViewWindow* vwin = (*it)->getActiveView() ) { - // using predefined string "GaussViewer" as "entry".. it's a hardcoded "workaround". + if ( SUIT_ViewWindow* vwin = (*it)->getActiveView() ) { + // using predefined string "GaussViewer" as "entry".. it's a hardcoded "workaround". // gauss viewer parameters are retrieved using this "entry" string. - // name of parameter = caption of gauss ViewWindow + // name of parameter = caption of gauss ViewWindow // value of parameter = ViewWindow's visual parameters ip->setParameter( "GaussViewer", vwin->windowTitle().toLatin1().data(), @@ -1696,7 +1696,7 @@ void VisuGUI_Module::storeVisualParameters(int savePoint) // saving VTK actors' properties if ( vType == SVTK_Viewer::Type() || // processing SVTK and VVTK viewers in the same - vType == VVTK_Viewer::Type() ) { // way (VVTK_ViewWindow inherits SVTK_ViewWindow) + vType == VVTK_Viewer::Type() ) { // way (VVTK_ViewWindow inherits SVTK_ViewWindow) QVector views = vman->getViews(); for ( int i = 0, iEnd = vman->getViewsCount(); i < iEnd; i++ ) { @@ -1707,31 +1707,31 @@ void VisuGUI_Module::storeVisualParameters(int savePoint) if ( actor->GetVisibility() ) { // store only visible actors if ( VISU_Actor* vActor = VISU_Actor::SafeDownCast( actor ) ) { if ( vActor->hasIO() ) { // actor corresponds to existing obj - + Handle(SALOME_InteractiveObject) io = vActor->getIO(); - // entry is "ecoded" = it does NOT contain component adress, since it is a + // entry is "ecoded" = it does NOT contain component adress, since it is a // subject to change on next component loading - std::string entry = ip->encodeEntry( io->getEntry(), componentName ); + std::string entry = ip->encodeEntry( io->getEntry(), componentName ); std::string param, vtkParam = vType.toLatin1().data(); - vtkParam += gSeparator; + vtkParam += gSeparator; vtkParam += QString::number( *viewsCounter ).toLatin1().data(); - vtkParam += gSeparator; + vtkParam += gSeparator; - param = vtkParam + "Visibility"; + param = vtkParam + "Visibility"; ip->setParameter( entry, param, "On" ); param = vtkParam + "Name"; ip->setParameter( entry, param, vActor->getName() ); param = vtkParam + "RepresentationMode"; ip->setParameter( entry, param, QString::number( vActor->GetRepresentation() ).toLatin1().data() ); - param = vtkParam + "Opacity"; + param = vtkParam + "Opacity"; ip->setParameter( entry, param, QString::number( vActor->GetOpacity() ).toLatin1().data() ); vtkFloatingPointType r, g, b; vActor->GetColor(r, g, b); QString colorStr = QString::number( r ); colorStr += gDigitsSep; - colorStr += QString::number( g ); colorStr += gDigitsSep; - colorStr += QString::number( b ); - param = vtkParam + "Color"; + colorStr += QString::number( g ); colorStr += gDigitsSep; + colorStr += QString::number( b ); + param = vtkParam + "Color"; ip->setParameter( entry, param, colorStr.toLatin1().data() ); param = vtkParam + "LineWidth"; ip->setParameter( entry, param, QString::number( vActor->GetLineWidth() ).toLatin1().data() ); @@ -1761,7 +1761,7 @@ void VisuGUI_Module::storeVisualParameters(int savePoint) planeValue += QString::number( normal[2] ).toLatin1().data(); planeValue += gDigitsSep; planeValue += QString::number( origin[0] ).toLatin1().data(); planeValue += gDigitsSep; planeValue += QString::number( origin[1] ).toLatin1().data(); planeValue += gDigitsSep; - planeValue += QString::number( origin[2] ).toLatin1().data(); + planeValue += QString::number( origin[2] ).toLatin1().data(); param = QString( "%1ClippingPlane_%2" ).arg( vtkParam.c_str() ).arg( p+1 ).toLatin1().data(); ip->setParameter( entry, param, planeValue ); } @@ -1772,8 +1772,8 @@ void VisuGUI_Module::storeVisualParameters(int savePoint) } // isVisible } // end of ..while.. actors traversal } // if ( vtkView ) - } // for ( views ) - (*viewsCounter)++; + } // for ( views ) + (*viewsCounter)++; } // if ( SVTK view model ) else if ( vType == SPlot2d_Viewer::Type() ) { // processing Plot2d viewers QVector views = vman->getViews(); @@ -1783,27 +1783,27 @@ void VisuGUI_Module::storeVisualParameters(int savePoint) QList curves; QList::Iterator itCurve; plotVF->getCurves( curves ); - + Plot2d_Curve* curve; for ( itCurve = curves.begin(); itCurve != curves.end(); itCurve++ ) { if ( SPlot2d_Curve* sCurve = dynamic_cast( *itCurve ) ) { if ( sCurve->hasIO() ) { - + Handle(SALOME_InteractiveObject) io = sCurve->getIO(); - // entry is "ecoded" = it does NOT contain component adress, since it is a + // entry is "ecoded" = it does NOT contain component adress, since it is a // subject to change on next component loading - std::string entry = ip->encodeEntry( io->getEntry(), componentName ); + std::string entry = ip->encodeEntry( io->getEntry(), componentName ); - std::string param, plotParam = vType.toLatin1().data(); plotParam += gSeparator; - plotParam += QString::number( *viewsCounter ).toLatin1().data(); plotParam += gSeparator; + std::string param, plotParam = vType.toLatin1().data(); plotParam += gSeparator; + plotParam += QString::number( *viewsCounter ).toLatin1().data(); plotParam += gSeparator; - param = plotParam + "Visibility"; + param = plotParam + "Visibility"; ip->setParameter( entry, param, "On" ); } } } // for curves } // if ( plotView ) - } // for ( views ) + } // for ( views ) (*viewsCounter)++; } // if ( SPlot2d view model ) } @@ -1842,23 +1842,23 @@ void VisuGUI_Module::restoreVisualParameters(int savePoint) studyDS->GetModuleParameters("Interface Applicative", moduleName().toLatin1().data(), savePoint); _PTR(IParameters) ip = ClientFactory::getIParameters(ap); - // actors are stored in a map after displaying of them for quicker access in future + // actors are stored in a map after displaying of them for quicker access in future QMap > vtkActors; // map: entry to map: ViewType_ to actor (SVTK/VVTK) std::vector entries = ip->getEntries(); for ( std::vector::iterator entIt = entries.begin(); entIt != entries.end(); ++entIt ) { - + std::vector paramNames = ip->getAllParameterNames( *entIt ); std::vector paramValues = ip->getAllParameterValues( *entIt ); std::vector::iterator namesIt = paramNames.begin(); std::vector::iterator valuesIt = paramValues.begin(); - + if ( *entIt == "GaussViewer" ) { // parameter names are view window's captions, values - visual parameters. for ( ; namesIt != paramNames.end(); ++namesIt, ++valuesIt ) { SUIT_ViewManager* vman = onCreateViewManager(); - SUIT_ViewWindow* vwin = vman->getActiveView(); + SUIT_ViewWindow* vwin = vman->getActiveView(); vwin->setWindowTitle( (*namesIt).c_str() ); // wait untill the window is really shown. This step fixes MANY bugs.. @@ -1869,8 +1869,8 @@ void VisuGUI_Module::restoreVisualParameters(int savePoint) } continue; // skip to next entry } - - // entry is a normal entry - it should be "decoded" (setting base adress of component) + + // entry is a normal entry - it should be "decoded" (setting base adress of component) QString entry( ip->decodeEntry( *entIt ).c_str() ); //SRN: Added a check that the entry corresponds to Standard_Real object in the Study @@ -1886,7 +1886,7 @@ void VisuGUI_Module::restoreVisualParameters(int savePoint) std::string viewIndexStr = ::getParam( *namesIt, ViewIndex ); int viewIndex = QString( viewIndexStr.c_str() ).toUInt( &ok ); if ( !ok ) // bad conversion of view index to integer - continue; + continue; // cout << " -- " << viewerType << ": entry = " << entry.latin1() << ", paramName = " << paramName << endl; @@ -1897,7 +1897,7 @@ void VisuGUI_Module::restoreVisualParameters(int savePoint) QString viewerTypeIndex = QString( viewerType.c_str() ) + QString::number( viewIndex ); if ( paramName == "Visibility" && displayer() ) { - // if VVTK, then we must create viewer first, because + // if VVTK, then we must create viewer first, because QList lst; getApp()->viewManagers( viewerType.c_str(), lst ); @@ -1929,11 +1929,11 @@ void VisuGUI_Module::restoreVisualParameters(int savePoint) continue; QString val( (*valuesIt).c_str() ); - + if ( paramName == "Name" ) vActor->setName( val.toLatin1().data() ); - else if ( paramName == "RepresentationMode" ) + else if ( paramName == "RepresentationMode" ) vActor->SetRepresentation( val.toInt() ); else if ( paramName == "Opacity" ) @@ -1996,7 +1996,7 @@ void VisuGUI_Module::restoreVisualParameters(int savePoint) SUIT_ViewManager* vman = lst.at( viewIndex ); SUIT_ViewModel* vmodel = vman->getViewModel(); // SVTK and VVTK view models can be casted to SALOME_View - displayer()->Display( entry, true, dynamic_cast( vmodel ) ); + displayer()->Display( entry, true, dynamic_cast( vmodel ) ); } } @@ -2013,7 +2013,7 @@ void VisuGUI_Module::restoreVisualParameters(int savePoint) if ( !vmodel ) continue; if ( vmodel->getType() == SVTK_Viewer::Type() || // processing SVTK and VVTK viewers - vmodel->getType() == VVTK_Viewer::Type() ) { // in the same way + vmodel->getType() == VVTK_Viewer::Type() ) { // in the same way SVTK_ViewWindow* vtkView = (SVTK_ViewWindow*) (*it)->getActiveView(); vtkView->getRenderer()->ResetCameraClippingRange(); vtkView->Repaint(); @@ -2050,7 +2050,7 @@ void VisuGUI_Module::restoreVisualParameters(int savePoint) if ( activeView ) { activeView->activateWindow(); //activeView->setFocus(); - } + } } } } -- 2.39.2