From d4c6fe62369057091eddbb5a22833ca351937f0b Mon Sep 17 00:00:00 2001 From: apo Date: Tue, 8 Nov 2005 15:57:58 +0000 Subject: [PATCH] Adjust to LightApp architecture changes --- src/VISUGUI/VisuGUI.cxx | 122 ++++++++++++++++++++------------- src/VISUGUI/VisuGUI_Module.cxx | 92 ++++++++++++------------- 2 files changed, 122 insertions(+), 92 deletions(-) diff --git a/src/VISUGUI/VisuGUI.cxx b/src/VISUGUI/VisuGUI.cxx index f41c3be9..aed697b0 100644 --- a/src/VISUGUI/VisuGUI.cxx +++ b/src/VISUGUI/VisuGUI.cxx @@ -59,7 +59,7 @@ #include "SVTK_Functor.h" #include "SPlot2d_ViewModel.h" -#include "SPlot2d_SetupPlot2dDlg.h" +#include "VisuGUI_SetupPlot2dDlg.h" #include "Plot2d_SetupCurveDlg.h" #include "OB_Browser.h" @@ -342,7 +342,7 @@ OnExportTableToFile() aTitle = aTabAttr->GetTitle().c_str(); } aTitle.simplifyWhiteSpace(); - aTitle = aTitle.replace(QRegExp(" "), "_"); + aTitle = aTitle.replace(QRegExp(" "), "_").replace(QRegExp("\\*"), "" ); // get default path for the file SUIT_ResourceMgr* aResourceMgr = GetResourceMgr(); @@ -677,7 +677,7 @@ OnErasePrs() QApplication::setOverrideCursor(Qt::waitCursor); SVTK_ViewWindow* vw = GetViewWindow( this ); - if (vw) + if (vw) vw->unHighlightAll(); SALOME_ListIO aList; @@ -691,7 +691,7 @@ OnErasePrs() ErasePrs( this, anObject, false ); } - if (vw) + if (vw) vw->Repaint(); QApplication::restoreOverrideCursor(); @@ -874,6 +874,20 @@ OnMakeShrink() ChangeRepresentation(this, VISU::SHRINK); } +void +VisuGUI:: +OnSetShadingOn() +{ + SetShading(this, true); +} + +void +VisuGUI:: +OnSetShadingOff() +{ + SetShading(this, false); +} + void VisuGUI:: OnChangeColor() @@ -1180,7 +1194,7 @@ OnPlotData() aName = anAttr; SOName = QString( aName->Value().c_str() ); } - SPlot2d_SetupPlot2dDlg* dlg = new SPlot2d_SetupPlot2dDlg( SO, GetDesktop( this ) ); + VisuGUI_SetupPlot2dDlg* dlg = new VisuGUI_SetupPlot2dDlg( SO, GetDesktop( this ) ); if ( dlg->exec() == QDialog::Accepted ) { if ( !IsStudyLocked( aStudy ) ) { // if study is not locked - create new container, create curves and insert them @@ -1250,7 +1264,7 @@ OnPlotData() aName = anAttr; SOName = QString( aName->Value().c_str() ); } - SPlot2d_SetupPlot2dDlg* dlg = new SPlot2d_SetupPlot2dDlg( SO, GetDesktop( this ) ); + VisuGUI_SetupPlot2dDlg* dlg = new VisuGUI_SetupPlot2dDlg( SO, GetDesktop( this ) ); if ( dlg->exec() == QDialog::Accepted ) { if ( !IsStudyLocked( aStudy ) ) { // if study is not locked - create new table and container objects, create curves @@ -1567,22 +1581,20 @@ OnSweep() // Sweep QApplication::setOverrideCursor(Qt::waitCursor); - try { - for (int j = 0; j < aCycles; j++) { - for (int i = 0; i <= aSteps; i++) { + for (int j = 0; j < aCycles; j++) { + for (int i = 0; i <= aSteps; i++) { + try { float aPercents = float(i)/aSteps; aPrsObject->SetMapScale(aPercents); aPrsObject->UpdateActor(aActor); vw->getRenderWindow()->Render(); usleep(aTemp); + } catch (std::exception& exc) { + INFOS("Follow exception was occured :\n" << exc.what()); + } catch (...) { + INFOS("Unknown exception was occured!"); } } - aPrsObject->SetMapScale(1.0); - aPrsObject->UpdateActor(aActor); - } catch (std::exception& exc) { - INFOS("Follow exception was occured :\n" << exc.what()); - } catch (...) { - INFOS("Unknown exception was occured!"); } QApplication::restoreOverrideCursor(); } @@ -2123,6 +2135,14 @@ createActions() createAction( VISU_UNSHRINK, tr("MEN_UNSHRINK"), QIconSet(), tr("MEN_UNSHRINK"), "", 0, aParent, false, this, SLOT(OnMakeShrink())); + + createAction( VISU_SHADING, tr("MEN_SHADING"), QIconSet(), + tr("MEN_SHADING"), "", 0, aParent, false, + this, SLOT(OnSetShadingOn())); + + createAction( VISU_NOSHADING, tr("MEN_NOSHADING"), QIconSet(), + tr("MEN_NOSHADING"), "", 0, aParent, false, + this, SLOT(OnSetShadingOff())); createAction( VISU_CELL_COLOR, tr("MEN_CELL_COLOR"), QIconSet(), tr("MEN_CELL_COLOR"), "", 0, aParent, false, @@ -2350,6 +2370,9 @@ createPopupMenus() mgr->insert( action( VISU_SURFACEFRAME ), parentId, -1, -1 ); // surfaceframe mgr->insert( action( VISU_SHRINK ) , parentId, -1, -1 ); // shrink mgr->insert( action( VISU_UNSHRINK ) , parentId, -1, -1 ); // unshrink + mgr->insert( separator(), parentId, -1, -1 ); + mgr->insert( action( VISU_SHADING ) , parentId, -1, -1 ); // shading + mgr->insert( action( VISU_NOSHADING ) , parentId, -1, -1 ); // noshading // "Properties" submenu parentId = mgr->insert( tr( "MEN_PROPERTIES" ), -1, -1 ); @@ -2387,23 +2410,17 @@ createPopupMenus() // Rules - QString aSel_One_ObjBr ("client='ObjectBrowser' and selcount=1"); - QString aSel_Some_ObjBr ("client='ObjectBrowser' and selcount>0"); - QString aSel_Many_ObjBr ("client='ObjectBrowser' and selcount>1"); - QString aPrsAll ("'VISU::TSCALARMAP' 'VISU::TISOSURFACE' 'VISU::TDEFORMEDSHAPE' 'VISU::TCUTPLANES' " "'VISU::TCUTLINES' 'VISU::TVECTORS' 'VISU::TSTREAMLINES' 'VISU::TPLOT3D'"); - QString aCurveAll = "'VISU::TTABLE' 'VISU::TCURVE' 'VISU::TCONTAINER'"; - // VISU root commands - QString aRule = aSel_One_ObjBr + " and type='VISU::TVISUGEN'"; + QString aRule = "client='ObjectBrowser' and selcount=1 and type='VISU::TVISUGEN'"; mgr->setRule( action( VISU_IMPORT_FROM_FILE ), aRule, true ); mgr->setRule( action( VISU_IMPORT_TABLE ), aRule, true ); mgr->setRule( action( VISU_PLOT2D ), aRule, true ); // timestamp commands - aRule = aSel_One_ObjBr + " and type='VISU::TTIMESTAMP'"; + aRule = "client='ObjectBrowser' and selcount=1 and type='VISU::TTIMESTAMP'"; mgr->setRule( action( VISU_SCALAR_MAP ), aRule, true ); mgr->setRule( action( VISU_ISO_SURFACES ), aRule, true ); mgr->setRule( action( VISU_CUT_PLANES ), aRule, true ); @@ -2414,19 +2431,27 @@ createPopupMenus() mgr->setRule( action( VISU_VECTORS ), aRule, true ); mgr->setRule( action( VISU_STREAM_LINES ), aRule, true ); - // table commands - //aRule = aSel_One_ObjBr + " and type='VISU::TTABLE'"; - //mgr->setRule( action( VISU_SHOW_TABLE ), aRule, true ); - //mgr->setRule( action( VISU_CREATE_CURVES ), aRule, true ); - //mgr->setRule( action( VISU_EXPORT_TABLE ), aRule, true ); + // display/erase commands + QString andInvisible = " and (((not isVisible) and isActiveView) or (not isActiveView))"; + QString aTableOrCont = "(type='VISU::TTABLE' and nbChildren>0) or type='VISU::TCONTAINER'"; + QString orCurveVisible = "or (type='VISU::TCURVE' and isVisible)"; + QString orCurveInvisible = "or (type='VISU::TCURVE'" + andInvisible + ")"; + QString aPrsVisible = "(($type in {'VISU::TMESH' " + aPrsAll + "}) and isVisible)"; + QString aPrsInvisible = "(($type in {'VISU::TMESH' " + aPrsAll + "})" + andInvisible + ")"; + + QString anEraseRule = "selcount>0 and (" + aPrsVisible + + " or (client='ObjectBrowser' and (" + aTableOrCont + orCurveVisible + ")))"; - aRule = "(" + aSel_Some_ObjBr + " and ((type='VISU::TTABLE' and nbChildren>0) or" - " ($type in {'VISU::TCURVE' 'VISU::TCONTAINER'}))" - ") or (selcount>0 and $type in {'VISU::TMESH' " + aPrsAll + "})"; + QString aDisplayRule = "selcount>0 and (" + aPrsInvisible + + " or (client='ObjectBrowser' and (" + aTableOrCont + orCurveInvisible + ")))"; - mgr->setRule( action( VISU_ERASE ), aRule + "and (isVisible=true)", true );// TODO: aRule.arg(" and isVisible=1"), true ); - mgr->setRule( action( VISU_DISPLAY ), aRule + "and ((isVisible=false and isActiveView=true) or (isActiveView=false))", true );// TODO: aRule.arg(" and isVisible=0"), true ); - mgr->setRule( action( VISU_DISPLAY_ONLY ), aRule, true ); + QString aDOnlyRule = "selcount>0 and (($type in {'VISU::TMESH' " + aPrsAll + "})" + " or (client='ObjectBrowser' and ((type='VISU::TTABLE' and nbChildren>0) or" + " ($type in {'VISU::TCURVE' 'VISU::TCONTAINER'}))))"; + + mgr->setRule( action( VISU_ERASE ), anEraseRule, true ); + mgr->setRule( action( VISU_DISPLAY ), aDisplayRule, true ); + mgr->setRule( action( VISU_DISPLAY_ONLY ), aDOnlyRule, true ); aRule = "selcount>0 and $type in {'VISU::TMESH' " + aPrsAll + "}"; mgr->setRule( action( VISU_TRANSLATE_PRS ), aRule, true ); @@ -2435,7 +2460,7 @@ createPopupMenus() mgr->setRule( action( VISU_MERGE_SCALAR_BARS ), aRule, true ); mgr->setRule( action( VISU_FREE_SCALAR_BARS ), aRule, true ); - // View parameters + // view parameters aRule = "selcount=1 and type='VISU::TVIEW3D'"; mgr->setRule( action( VISU_SAVE_VIEW_PARAMS_1 ), aRule, true ); mgr->setRule( action( VISU_SAVE_VIEW_PARAMS ), "client='VTKViewer' and selcount=0", true ); @@ -2472,6 +2497,9 @@ createPopupMenus() mgr->setRule( action( VISU_SHRINK ) , aRule + aShrinkType + " and isShrunk=0", true ); mgr->setRule( action( VISU_UNSHRINK ), aRule + aShrinkType + " and isShrunk=1", true ); + mgr->setRule( action( VISU_SHADING ) , aRule + " and isScalarMapAct=1 and isShading=0", true ); + mgr->setRule( action( VISU_NOSHADING ), aRule + " and isScalarMapAct=1 and isShading=1", true ); + // "Properties" submenu mgr->setRule( action( VISU_CELL_COLOR ), aRule + " and type='VISU::TMESH' and representation='VISU::SURFACEFRAME'", true ); mgr->setRule( action( VISU_EDGE_COLOR ), aRule + " and type='VISU::TMESH' and representation='VISU::SURFACEFRAME'", true ); @@ -2482,6 +2510,8 @@ createPopupMenus() mgr->setRule( action( VISU_LINE_WIDTH ), aRule + aLineType + " and hasActor=1", true ); // rename command + QString aCurveAll = "'VISU::TTABLE' 'VISU::TCURVE' 'VISU::TCONTAINER'"; + aRule = "selcount=1 and ($type in {'VISU::TVIEW3D' 'VISU::TMESH' " + aCurveAll + " " + aPrsAll + "})"; mgr->setRule( action( VISU_RENAME ), aRule, true ); @@ -2494,25 +2524,25 @@ createPopupMenus() mgr->setRule( action( VISU_CURVE_PROPS ), aRule, true ); // curve container commands - aRule = aSel_One_ObjBr + " and type='VISU::TCONTAINER'"; + aRule = "client='ObjectBrowser' and selcount=1 and type='VISU::TCONTAINER'"; mgr->setRule( action( VISU_EDIT_CONTAINER ), aRule, true ); mgr->setRule( action( VISU_CLEAR_CONTAINER ), aRule, true ); - mgr->setRule( action( VISU_EDIT_SCALARMAP ), + mgr->setRule( action( VISU_EDIT_SCALARMAP ), "selcount=1 and type='VISU::TSCALARMAP'", true ); - mgr->setRule( action( VISU_EDIT_DEFORMEDSHAPE ), + mgr->setRule( action( VISU_EDIT_DEFORMEDSHAPE ), "selcount=1 and type='VISU::TDEFORMEDSHAPE'", true ); - mgr->setRule( action( VISU_EDIT_CUTPLANES ), + mgr->setRule( action( VISU_EDIT_CUTPLANES ), "selcount=1 and type='VISU::TCUTPLANES'", true ); - mgr->setRule( action( VISU_EDIT_CUTLINES ), + mgr->setRule( action( VISU_EDIT_CUTLINES ), "selcount=1 and type='VISU::TCUTLINES'", true ); - mgr->setRule( action( VISU_EDIT_ISOSURFACE ), + mgr->setRule( action( VISU_EDIT_ISOSURFACE ), "selcount=1 and type='VISU::TISOSURFACE'", true ); - mgr->setRule( action( VISU_EDIT_VECTORS ), + mgr->setRule( action( VISU_EDIT_VECTORS ), "selcount=1 and type='VISU::TVECTORS'", true ); - mgr->setRule( action( VISU_EDIT_STREAMLINES ), + mgr->setRule( action( VISU_EDIT_STREAMLINES ), "selcount=1 and type='VISU::TSTREAMLINES'", true ); - mgr->setRule( action( VISU_EDIT_PLOT3D ), + mgr->setRule( action( VISU_EDIT_PLOT3D ), "selcount=1 and type='VISU::TPLOT3D'", true ); aRule = "selcount=1 and type='VISU::TCUTLINES' and nbNamedChildren=0"; @@ -2521,7 +2551,7 @@ createPopupMenus() aRule = "selcount=1 and ($type in {" + aPrsAll + "})"; mgr->setRule( action( VISU_SWEEP ), aRule, true ); - // Selection info popup item + // "Selection info" popup item aRule = "client='VTKViewer' and selcount=1" + aInsideType; mgr->setRule( action( VISU_SELECTION_INFO ), aRule, true ); @@ -2863,7 +2893,7 @@ void VisuGUI::preferencesChanged( const QString&, const QString& ) SUIT_ViewManager* VisuGUI -::getViewManager(const QString& theType, +::getViewManager(const QString& theType, const bool theIsCreate) { return getApp()->getViewManager(theType,theIsCreate); diff --git a/src/VISUGUI/VisuGUI_Module.cxx b/src/VISUGUI/VisuGUI_Module.cxx index 549aeda6..731993aa 100644 --- a/src/VISUGUI/VisuGUI_Module.cxx +++ b/src/VISUGUI/VisuGUI_Module.cxx @@ -41,7 +41,7 @@ #include "SalomeApp_Application.h" #include "LightApp_SelectionMgr.h" #include "LightApp_VTKSelector.h" -#include "SalomeApp_Preferences.h" +#include "LightApp_Preferences.h" #include "VVTK_ViewManager.h" #include "VVTK_ViewWindow.h" @@ -345,18 +345,18 @@ VisuGUI_Module setPreferenceProperty( primitiveGr, "columns", 1 ); int clampPref = addPreference( tr( "VISU_GAUSS_PREF_CLAMP" ), primitiveGr, - SalomeApp_Preferences::IntSpin, "VISU", "point_sprite_clamp" ); + LightApp_Preferences::IntSpin, "VISU", "point_sprite_clamp" ); setPreferenceProperty( clampPref, "min", 1 ); setPreferenceProperty( clampPref, "max", 512 ); addPreference( tr( "VISU_GAUSS_PREF_MAIN_TEXTURE" ), primitiveGr, - SalomeApp_Preferences::File, "VISU", "point_sprite_main_texture" ); + LightApp_Preferences::File, "VISU", "point_sprite_main_texture" ); addPreference( tr( "VISU_GAUSS_PREF_ALPHA_TEXTURE" ), primitiveGr, - SalomeApp_Preferences::File, "VISU", "point_sprite_alpha_texture" ); + LightApp_Preferences::File, "VISU", "point_sprite_alpha_texture" ); int alphaThresholdPref = addPreference( tr( "VISU_GAUSS_PREF_ALPHA_THRESHOLD" ), primitiveGr, - SalomeApp_Preferences::DblSpin, "VISU", "point_sprite_alpha_threshold" ); + LightApp_Preferences::DblSpin, "VISU", "point_sprite_alpha_threshold" ); setPreferenceProperty( alphaThresholdPref, "min", 0.0 ); setPreferenceProperty( alphaThresholdPref, "max", 1.0 ); setPreferenceProperty( alphaThresholdPref, "step", 0.1 ); @@ -365,22 +365,22 @@ VisuGUI_Module setPreferenceProperty( sizeGr, "columns", 2 ); int minSizePref = addPreference( tr( "VISU_GAUSS_PREF_MIN_SIZE" ), sizeGr, - SalomeApp_Preferences::IntSpin, "VISU", "point_sprite_min_size" ); + LightApp_Preferences::IntSpin, "VISU", "point_sprite_min_size" ); setPreferenceProperty( minSizePref, "min", 1 ); setPreferenceProperty( minSizePref, "max", 100 ); int maxSizePref = addPreference( tr( "VISU_GAUSS_PREF_MAX_SIZE" ), sizeGr, - SalomeApp_Preferences::IntSpin, "VISU", "point_sprite_max_size" ); + LightApp_Preferences::IntSpin, "VISU", "point_sprite_max_size" ); setPreferenceProperty( maxSizePref, "min", 1 ); setPreferenceProperty( maxSizePref, "max", 100 ); int magnificationPref = addPreference( tr( "VISU_GAUSS_PREF_MAGNIFICATION" ), sizeGr, - SalomeApp_Preferences::IntSpin, "VISU", "point_sprite_magnification" ); + LightApp_Preferences::IntSpin, "VISU", "point_sprite_magnification" ); setPreferenceProperty( magnificationPref, "min", 10 ); setPreferenceProperty( magnificationPref, "max", 1000 ); int incrementPref = addPreference( tr( "VISU_GAUSS_PREF_INCREMENT" ), sizeGr, - SalomeApp_Preferences::DblSpin, "VISU", "point_sprite_increment" ); + LightApp_Preferences::DblSpin, "VISU", "point_sprite_increment" ); setPreferenceProperty( incrementPref, "min", 0.01 ); setPreferenceProperty( incrementPref, "max", 10 ); setPreferenceProperty( incrementPref, "step", 0.1 ); @@ -389,12 +389,12 @@ VisuGUI_Module setPreferenceProperty( geomGr, "columns", 1 ); int sizePref = addPreference( tr( "VISU_GAUSS_PREF_SIZE" ), geomGr, - SalomeApp_Preferences::IntSpin, "VISU", "point_sprite_size" ); + LightApp_Preferences::IntSpin, "VISU", "point_sprite_size" ); setPreferenceProperty( sizePref, "min", 1 ); setPreferenceProperty( sizePref, "max", 100 ); addPreference( tr( "VISU_GAUSS_PREF_COLOR" ), geomGr, - SalomeApp_Preferences::Color, "VISU", "point_sprite_color" ); + LightApp_Preferences::Color, "VISU", "point_sprite_color" ); } @@ -408,7 +408,7 @@ VisuGUI_Module setPreferenceProperty( scalarBarGr, "columns", 1 ); int activeBarPref = addPreference( tr( "VISU_GAUSS_PREF_ACTIVE_BAR" ), scalarBarGr, - SalomeApp_Preferences::Selector, "VISU", "scalar_bar_active_local" ); + LightApp_Preferences::Selector, "VISU", "scalar_bar_active_local" ); QStringList values; values.append( tr( "VISU_GAUSS_PREF_LOCAL" ) ); @@ -420,10 +420,10 @@ VisuGUI_Module setPreferenceProperty( activeBarPref, "indexes", indices ); addPreference( tr( "VISU_GAUSS_PREF_DISPLAY_GLOBAL" ), scalarBarGr, - SalomeApp_Preferences::Bool, "VISU", "scalar_bar_display_global" ); + LightApp_Preferences::Bool, "VISU", "scalar_bar_display_global" ); int colorPref = addPreference( tr( "VISU_GAUSS_PREF_SCALAR_BAR_MODE" ), scalarBarGr, - SalomeApp_Preferences::Selector, "VISU", "scalar_bar_bicolor" ); + LightApp_Preferences::Selector, "VISU", "scalar_bar_bicolor" ); values.clear(); values.append( tr( "VISU_GAUSS_PREF_BICOLOR" ) ); @@ -435,7 +435,7 @@ VisuGUI_Module setPreferenceProperty( colorPref, "indexes", indices ); int spacingPref = addPreference( tr( "VISU_GAUSS_PREF_SPACING" ), scalarBarGr, - SalomeApp_Preferences::DblSpin, "VISU", "scalar_bar_spacing" ); + LightApp_Preferences::DblSpin, "VISU", "scalar_bar_spacing" ); setPreferenceProperty( spacingPref, "min", 0.01 ); setPreferenceProperty( spacingPref, "max", 1.0 ); setPreferenceProperty( spacingPref, "step", 0.01 ); @@ -454,7 +454,7 @@ VisuGUI_Module setPreferenceProperty( primitiveGr, "columns", 1 ); int primitiveTypePref = addPreference( tr( "VISU_GAUSS_PREF_PRIMITIVE_TYPE" ), primitiveGr, - SalomeApp_Preferences::Selector, "VISU", "inside_point_sprite_primitive_type" ); + LightApp_Preferences::Selector, "VISU", "inside_point_sprite_primitive_type" ); QStringList values; values.append( tr( "VISU_GAUSS_PREF_POINTSPRITE" ) ); @@ -468,18 +468,18 @@ VisuGUI_Module setPreferenceProperty( primitiveTypePref, "indexes", indices ); int clampPref = addPreference( tr( "VISU_GAUSS_PREF_CLAMP" ), primitiveGr, - SalomeApp_Preferences::IntSpin, "VISU", "inside_point_sprite_clamp" ); + LightApp_Preferences::IntSpin, "VISU", "inside_point_sprite_clamp" ); setPreferenceProperty( clampPref, "min", 1 ); setPreferenceProperty( clampPref, "max", 512 ); addPreference( tr( "VISU_GAUSS_PREF_MAIN_TEXTURE" ), primitiveGr, - SalomeApp_Preferences::File, "VISU", "inside_point_sprite_main_texture" ); + LightApp_Preferences::File, "VISU", "inside_point_sprite_main_texture" ); addPreference( tr( "VISU_GAUSS_PREF_ALPHA_TEXTURE" ), primitiveGr, - SalomeApp_Preferences::File, "VISU", "inside_point_sprite_alpha_texture" ); + LightApp_Preferences::File, "VISU", "inside_point_sprite_alpha_texture" ); int alphaThresholdPref = addPreference( tr( "VISU_GAUSS_PREF_ALPHA_THRESHOLD" ), primitiveGr, - SalomeApp_Preferences::DblSpin, "VISU", "inside_point_sprite_alpha_threshold" ); + LightApp_Preferences::DblSpin, "VISU", "inside_point_sprite_alpha_threshold" ); setPreferenceProperty( alphaThresholdPref, "min", 0.0 ); setPreferenceProperty( alphaThresholdPref, "max", 1.0 ); setPreferenceProperty( alphaThresholdPref, "step", 0.1 ); @@ -488,22 +488,22 @@ VisuGUI_Module setPreferenceProperty( sizeGr, "columns", 2 ); int minSizePref = addPreference( tr( "VISU_GAUSS_PREF_MIN_SIZE" ), sizeGr, - SalomeApp_Preferences::IntSpin, "VISU", "inside_point_sprite_min_size" ); + LightApp_Preferences::IntSpin, "VISU", "inside_point_sprite_min_size" ); setPreferenceProperty( minSizePref, "min", 1 ); setPreferenceProperty( minSizePref, "max", 100 ); int maxSizePref = addPreference( tr( "VISU_GAUSS_PREF_MAX_SIZE" ), sizeGr, - SalomeApp_Preferences::IntSpin, "VISU", "inside_point_sprite_max_size" ); + LightApp_Preferences::IntSpin, "VISU", "inside_point_sprite_max_size" ); setPreferenceProperty( maxSizePref, "min", 1 ); setPreferenceProperty( maxSizePref, "max", 100 ); int magnificationPref = addPreference( tr( "VISU_GAUSS_PREF_MAGNIFICATION" ), sizeGr, - SalomeApp_Preferences::IntSpin, "VISU", "inside_point_sprite_magnification" ); + LightApp_Preferences::IntSpin, "VISU", "inside_point_sprite_magnification" ); setPreferenceProperty( magnificationPref, "min", 10 ); setPreferenceProperty( magnificationPref, "max", 1000 ); int incrementPref = addPreference( tr( "VISU_GAUSS_PREF_INCREMENT" ), sizeGr, - SalomeApp_Preferences::DblSpin, "VISU", "inside_point_sprite_increment" ); + LightApp_Preferences::DblSpin, "VISU", "inside_point_sprite_increment" ); setPreferenceProperty( incrementPref, "min", 0.01 ); setPreferenceProperty( incrementPref, "max", 10 ); setPreferenceProperty( incrementPref, "step", 0.1 ); @@ -522,7 +522,7 @@ VisuGUI_Module setPreferenceProperty( primitiveGr, "columns", 1 ); int primitiveTypePref = addPreference( tr( "VISU_GAUSS_PREF_PRIMITIVE_TYPE" ), primitiveGr, - SalomeApp_Preferences::Selector, "VISU", "outside_point_sprite_primitive_type" ); + LightApp_Preferences::Selector, "VISU", "outside_point_sprite_primitive_type" ); QStringList values; values.append( tr( "VISU_GAUSS_PREF_POINTSPRITE" ) ); @@ -536,18 +536,18 @@ VisuGUI_Module setPreferenceProperty( primitiveTypePref, "indexes", indices ); int clampPref = addPreference( tr( "VISU_GAUSS_PREF_CLAMP" ), primitiveGr, - SalomeApp_Preferences::IntSpin, "VISU", "outside_point_sprite_clamp" ); + LightApp_Preferences::IntSpin, "VISU", "outside_point_sprite_clamp" ); setPreferenceProperty( clampPref, "min", 1 ); setPreferenceProperty( clampPref, "max", 512 ); addPreference( tr( "VISU_GAUSS_PREF_MAIN_TEXTURE" ), primitiveGr, - SalomeApp_Preferences::File, "VISU", "outside_point_sprite_main_texture" ); + LightApp_Preferences::File, "VISU", "outside_point_sprite_main_texture" ); addPreference( tr( "VISU_GAUSS_PREF_ALPHA_TEXTURE" ), primitiveGr, - SalomeApp_Preferences::File, "VISU", "outside_point_sprite_alpha_texture" ); + LightApp_Preferences::File, "VISU", "outside_point_sprite_alpha_texture" ); int alphaThresholdPref = addPreference( tr( "VISU_GAUSS_PREF_ALPHA_THRESHOLD" ), primitiveGr, - SalomeApp_Preferences::DblSpin, "VISU", "outside_point_sprite_alpha_threshold" ); + LightApp_Preferences::DblSpin, "VISU", "outside_point_sprite_alpha_threshold" ); setPreferenceProperty( alphaThresholdPref, "min", 0.0 ); setPreferenceProperty( alphaThresholdPref, "max", 1.0 ); setPreferenceProperty( alphaThresholdPref, "step", 0.1 ); @@ -555,7 +555,7 @@ VisuGUI_Module int sizeGr = addPreference( tr( "VISU_GAUSS_PREF_SIZE_GROUP_TTL" ), outsideCursorTab ); int sizePref = addPreference( tr( "VISU_GAUSS_PREF_SIZE" ), sizeGr, - SalomeApp_Preferences::IntSpin, "VISU", "outside_point_sprite_size" ); + LightApp_Preferences::IntSpin, "VISU", "outside_point_sprite_size" ); setPreferenceProperty( sizePref, "min", 1 ); setPreferenceProperty( sizePref, "max", 100 ); @@ -563,10 +563,10 @@ VisuGUI_Module setPreferenceProperty( colorGr, "columns", 1 ); addPreference( tr( "VISU_GAUSS_PREF_UNIFORM_COLOR" ), colorGr, - SalomeApp_Preferences::Bool, "VISU", "outside_point_sprite_uniform" ); + LightApp_Preferences::Bool, "VISU", "outside_point_sprite_uniform" ); addPreference( tr( "VISU_GAUSS_PREF_COLOR" ), colorGr, - SalomeApp_Preferences::Color, "VISU", "outside_point_sprite_color" ); + LightApp_Preferences::Color, "VISU", "outside_point_sprite_color" ); } @@ -579,7 +579,7 @@ VisuGUI_Module int cursorGr = addPreference( tr( "VISU_PICKING_PREF_CURSOR_GROUP_TTL" ), pickingTab ); int pyramidHeightPref = addPreference( tr( "VISU_PICKING_PREF_PYRAMID_HEIGHT" ), cursorGr, - SalomeApp_Preferences::DblSpin, "VISU", "picking_pyramid_height" ); + LightApp_Preferences::DblSpin, "VISU", "picking_pyramid_height" ); setPreferenceProperty( pyramidHeightPref, "min", 1 ); setPreferenceProperty( pyramidHeightPref, "max", 100 ); @@ -587,13 +587,13 @@ VisuGUI_Module setPreferenceProperty( infoWindowGr, "columns", 1 ); int transparencyPref = addPreference( tr( "VISU_PICKING_PREF_TRANSPARENCY" ), infoWindowGr, - SalomeApp_Preferences::IntSpin, "VISU", "picking_transparency" ); + LightApp_Preferences::IntSpin, "VISU", "picking_transparency" ); setPreferenceProperty( transparencyPref, "min", 0 ); setPreferenceProperty( transparencyPref, "max", 100 ); setPreferenceProperty( transparencyPref, "step", 10 ); int positionPref = addPreference( tr( "VISU_PICKING_PREF_POSITION" ), infoWindowGr, - SalomeApp_Preferences::Selector, "VISU", "picking_position" ); + LightApp_Preferences::Selector, "VISU", "picking_position" ); QStringList values; values.append( tr( "VISU_PICKING_PREF_BELOW_POINT" ) ); values.append( tr( "VISU_PICKING_PREF_TOP_LEFT_CORNER" ) ); @@ -607,13 +607,13 @@ VisuGUI_Module setPreferenceProperty( cameraGr, "columns", 1 ); int zoomFactorPref = addPreference( tr( "VISU_PICKING_PREF_ZOOM_FACTOR" ), cameraGr, - SalomeApp_Preferences::DblSpin, "VISU", "picking_zoom_factor" ); + LightApp_Preferences::DblSpin, "VISU", "picking_zoom_factor" ); setPreferenceProperty( zoomFactorPref, "min", 0.1 ); setPreferenceProperty( zoomFactorPref, "max", 10.0 ); setPreferenceProperty( zoomFactorPref, "step", 0.1 ); int stepNumberPref = addPreference( tr( "VISU_PICKING_PREF_STEP_NUMBER" ), cameraGr, - SalomeApp_Preferences::IntSpin, "VISU", "picking_step_number" ); + LightApp_Preferences::IntSpin, "VISU", "picking_step_number" ); setPreferenceProperty( stepNumberPref, "min", 1 ); setPreferenceProperty( stepNumberPref, "max", 100 ); @@ -621,7 +621,7 @@ VisuGUI_Module setPreferenceProperty( parentMeshGr, "columns", 1 ); addPreference( tr( "VISU_PICKING_PREF_DISPLAY_PARENT_MESH" ), parentMeshGr, - SalomeApp_Preferences::Bool, "VISU", "picking_display_parent_mesh" ); + LightApp_Preferences::Bool, "VISU", "picking_display_parent_mesh" ); } @@ -633,7 +633,7 @@ VisuGUI_Module int mouseTab = addPreference( tr( "VISU_MOUSE_PREF_TAB_TLT" ) ); int mouseGr = addPreference( tr( "VISU_MOUSE_PREF_GROUP_TLT" ), mouseTab ); - int mousePref = addPreference( tr( "VISU_MOUSE_PREF" ), mouseGr, SalomeApp_Preferences::Selector, "VISU", "mouse_behaviour" ); + int mousePref = addPreference( tr( "VISU_MOUSE_PREF" ), mouseGr, LightApp_Preferences::Selector, "VISU", "mouse_behaviour" ); QStringList values; values.append( tr( "VISU_MOUSE_PREF_STANDARD" ) ); values.append( tr( "VISU_MOUSE_PREF_KEYBOARD_FREE" ) ); @@ -644,16 +644,16 @@ VisuGUI_Module setPreferenceProperty( mousePref, "indexes", indices ); int keybrdGr = addPreference( tr( "VISU_KEYBOARD_PREF_GROUP_TTL" ), mouseTab ); - int keybrdPref = addPreference( tr( "VISU_KEYBOARD_PREF" ), keybrdGr, SalomeApp_Preferences::IntSpin, "VISU", "speed_increment" ); + int keybrdPref = addPreference( tr( "VISU_KEYBOARD_PREF" ), keybrdGr, LightApp_Preferences::IntSpin, "VISU", "speed_increment" ); setPreferenceProperty( keybrdPref, "max", 1000 ); int spacemouseGr = addPreference( tr( "VISU_SPACEMOUSE_PREF" ), mouseTab ); setPreferenceProperty( spacemouseGr, "columns", 1 ); - int spacemousePref1 = addPreference( tr( "VISU_SPACEMOUSE_PREF_1" ), spacemouseGr, SalomeApp_Preferences::Selector, "VISU", "spacemouse_func1_btn" ); //decrease_speed_increment - int spacemousePref2 = addPreference( tr( "VISU_SPACEMOUSE_PREF_2" ), spacemouseGr, SalomeApp_Preferences::Selector, "VISU", "spacemouse_func2_btn" ); //increase_speed_increment - int spacemousePref3 = addPreference( tr( "VISU_SPACEMOUSE_PREF_3" ), spacemouseGr, SalomeApp_Preferences::Selector, "VISU", "spacemouse_func3_btn" ); //decrease_gauss_point_magnification - int spacemousePref4 = addPreference( tr( "VISU_SPACEMOUSE_PREF_4" ), spacemouseGr, SalomeApp_Preferences::Selector, "VISU", "spacemouse_func4_btn" ); //increase_gauss_point_magnification - int spacemousePref5 = addPreference( tr( "VISU_SPACEMOUSE_PREF_5" ), spacemouseGr, SalomeApp_Preferences::Selector, "VISU", "spacemouse_func5_btn" ); //dominant_combined_switch + int spacemousePref1 = addPreference( tr( "VISU_SPACEMOUSE_PREF_1" ), spacemouseGr, LightApp_Preferences::Selector, "VISU", "spacemouse_func1_btn" ); //decrease_speed_increment + int spacemousePref2 = addPreference( tr( "VISU_SPACEMOUSE_PREF_2" ), spacemouseGr, LightApp_Preferences::Selector, "VISU", "spacemouse_func2_btn" ); //increase_speed_increment + int spacemousePref3 = addPreference( tr( "VISU_SPACEMOUSE_PREF_3" ), spacemouseGr, LightApp_Preferences::Selector, "VISU", "spacemouse_func3_btn" ); //decrease_gauss_point_magnification + int spacemousePref4 = addPreference( tr( "VISU_SPACEMOUSE_PREF_4" ), spacemouseGr, LightApp_Preferences::Selector, "VISU", "spacemouse_func4_btn" ); //increase_gauss_point_magnification + int spacemousePref5 = addPreference( tr( "VISU_SPACEMOUSE_PREF_5" ), spacemouseGr, LightApp_Preferences::Selector, "VISU", "spacemouse_func5_btn" ); //dominant_combined_switch values.clear(); values.append( tr( "VISU_SPACEMOUSE_PREF_BTN_1" ) ); values.append( tr( "VISU_SPACEMOUSE_PREF_BTN_2" ) ); @@ -690,7 +690,7 @@ VisuGUI_Module setPreferenceProperty( spacemousePref5, "indexes", indices ); int cameraGr = addPreference( tr( "VISU_CAMERA_PREF_GROUP_TTL" ), mouseTab ); - int cameraPref = addPreference( tr( "VISU_CAMERA_MOVE_PREF" ), cameraGr, SalomeApp_Preferences::IntSpin, "VISU", "camera_movement_steps" ); + int cameraPref = addPreference( tr( "VISU_CAMERA_MOVE_PREF" ), cameraGr, LightApp_Preferences::IntSpin, "VISU", "camera_movement_steps" ); setPreferenceProperty( cameraPref, "max", 1000 ); } -- 2.39.2