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 );
}
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" ) {
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 );
}
}