From: nkv Date: Mon, 9 Jun 2008 09:37:05 +0000 (+0000) Subject: Move VISU navigation preferences to Salome page X-Git-Tag: TG_VISU_2008_2008-06-26~21 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0aeb05bd85ed3987ab46717c0320e76e70ada037;p=modules%2Fvisu.git Move VISU navigation preferences to Salome page --- diff --git a/src/VISUGUI/VisuGUI_Module.cxx b/src/VISUGUI/VisuGUI_Module.cxx index 23a00958..fd84d71f 100644 --- a/src/VISUGUI/VisuGUI_Module.cxx +++ b/src/VISUGUI/VisuGUI_Module.cxx @@ -563,6 +563,44 @@ createGaussPointsPreferences() setPreferenceProperty( spacingPref, "min", 0.01 ); setPreferenceProperty( spacingPref, "max", 1.0 ); setPreferenceProperty( spacingPref, "step", 0.01 ); + + // spacemouse + int spacemouseGr = addPreference( tr( "VISU_SPACEMOUSE_PREF" ), gaussTab ); + setPreferenceProperty( spacemouseGr, "columns", 2 ); + 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 + values.clear(); + values.append( tr( "VISU_SPACEMOUSE_PREF_BTN_1" ) ); + values.append( tr( "VISU_SPACEMOUSE_PREF_BTN_2" ) ); + values.append( tr( "VISU_SPACEMOUSE_PREF_BTN_3" ) ); + values.append( tr( "VISU_SPACEMOUSE_PREF_BTN_4" ) ); + values.append( tr( "VISU_SPACEMOUSE_PREF_BTN_5" ) ); + values.append( tr( "VISU_SPACEMOUSE_PREF_BTN_6" ) ); + values.append( tr( "VISU_SPACEMOUSE_PREF_BTN_7" ) ); + values.append( tr( "VISU_SPACEMOUSE_PREF_BTN_8" ) ); + values.append( tr( "VISU_SPACEMOUSE_PREF_BTN_*" ) ); + values.append( tr( "VISU_SPACEMOUSE_PREF_BTN_10" ) ); + values.append( tr( "VISU_SPACEMOUSE_PREF_BTN_11" ) ); + indices.clear(); + indices.append( 1 ); + indices.append( 2 ); + indices.append( 3 ); + indices.append( 4 ); + indices.append( 5 ); + indices.append( 6 ); + indices.append( 7 ); + indices.append( 8 ); + indices.append( 9 ); // == button_* + indices.append( 10 ); + indices.append( 11 ); + setPreferenceProperty( spacemousePref3, "strings", values ); + setPreferenceProperty( spacemousePref3, "indexes", indices ); + setPreferenceProperty( spacemousePref4, "strings", values ); + setPreferenceProperty( spacemousePref4, "indexes", indices ); } @@ -980,15 +1018,15 @@ setProperty( SVTK_ViewWindow* viewWindow, const QString& pref ) SVTK_MainWindow* aMainWindow = viewWindow->getMainWindow(); int val; if ( pref == "speed_increment" ) { - val = resMgr->integerValue( "VISU", pref, 10 ); + val = resMgr->integerValue( "VTKViewer", pref, 10 ); aMainWindow->InvokeEvent( SVTK::SetSpeedIncrementEvent, &val ); } else if ( pref == "spacemouse_func1_btn" ) { - val = resMgr->integerValue( "VISU", pref, 1 ); + val = resMgr->integerValue( "VTKViewer", pref, 1 ); aMainWindow->InvokeEvent( SVTK::SetSMDecreaseSpeedEvent, &val ); } else if ( pref == "spacemouse_func2_btn" ) { - val = resMgr->integerValue( "VISU", pref, 2 ); + val = resMgr->integerValue( "VTKViewer", pref, 2 ); aMainWindow->InvokeEvent( SVTK::SetSMIncreaseSpeedEvent, &val ); } else if ( pref == "spacemouse_func3_btn" ) { @@ -1000,7 +1038,7 @@ setProperty( SVTK_ViewWindow* viewWindow, const QString& pref ) aMainWindow->InvokeEvent( VISU::SetSMIncreaseMagnificationEvent, &val ); } else if ( pref == "spacemouse_func5_btn" ) { - val = resMgr->integerValue( "VISU", pref, 9 ); + val = resMgr->integerValue( "VTKViewer", pref, 9 ); aMainWindow->InvokeEvent( SVTK::SetSMDominantCombinedSwitchEvent, &val ); } }