moduleAction->insertModule( *it, icon );
}
+
connect( moduleAction, SIGNAL( moduleActivated( const QString& ) ), this, SLOT( onModuleActivation( const QString& ) ) );
registerAction( ModulesListId, moduleAction );
}
SVTK_Viewer* vm = dynamic_cast<SVTK_Viewer*>( viewMgr->getViewModel() );
if( vm )
{
+ vm->setProjectionMode( resMgr->integerValue( "VTKViewer", "projection_mode", vm->projectionMode() ) );
vm->setBackgroundColor( resMgr->colorValue( "VTKViewer", "background", vm->backgroundColor() ) );
vm->setTrihedronSize( resMgr->doubleValue( "VTKViewer", "trihedron_size", vm->trihedronSize() ),
resMgr->booleanValue( "VTKViewer", "relative_size", vm->trihedronRelative() ) );
+ vm->setInteractionStyle( resMgr->integerValue( "VTKViewer", "navigation_mode", vm->interactionStyle() ) );
+ vm->setIncrementalSpeed( resMgr->integerValue( "VTKViewer", "speed_value", vm->incrementalSpeed() ),
+ resMgr->integerValue( "VTKViewer", "speed_mode", vm->incrementalSpeedMode() ) );
+ vm->setSpacemouseButtons( resMgr->integerValue( "VTKViewer", "spacemouse_func1_btn", vm->spacemouseBtn(1) ),
+ resMgr->integerValue( "VTKViewer", "spacemouse_func2_btn", vm->spacemouseBtn(2) ),
+ resMgr->integerValue( "VTKViewer", "spacemouse_func5_btn", vm->spacemouseBtn(3) ) );
new LightApp_VTKSelector( vm, mySelMgr );
}
#else
int supervGroup = pref->addPreference( tr( "PREF_GROUP_SUPERV" ), viewTab );
- pref->setItemProperty( "columns", 2, occGroup );
- pref->setItemProperty( "columns", 2, vtkGroup );
- pref->setItemProperty( "columns", 2, plot2dGroup );
+ pref->setItemProperty( "columns", 4, occGroup );
+ pref->setItemProperty( "columns", 1, vtkGroup );
+ pref->setItemProperty( "columns", 4, plot2dGroup );
+ // OCC Viewer
int occTS = pref->addPreference( tr( "PREF_TRIHEDRON_SIZE" ), occGroup,
LightApp_Preferences::DblSpin, "OCCViewer", "trihedron_size" );
pref->setItemProperty( "min", 1.0E-06, occTS );
pref->setItemProperty( "min", 0, isoV );
pref->setItemProperty( "max", 100000, isoV );
- int vtkTS = pref->addPreference( tr( "PREF_TRIHEDRON_SIZE" ), vtkGroup,
- LightApp_Preferences::DblSpin, "VTKViewer", "trihedron_size" );
- pref->addPreference( tr( "PREF_VIEWER_BACKGROUND" ), vtkGroup,
+ // VTK Viewer
+ int vtkGen = pref->addPreference( "", vtkGroup, LightApp_Preferences::Frame );
+ pref->setItemProperty( "columns", 2, vtkGen );
+
+ int vtkProjMode = pref->addPreference( tr( "PREF_PROJECTION_MODE" ), vtkGen,
+ LightApp_Preferences::Selector, "VTKViewer", "projection_mode" );
+ QStringList aProjModeList;
+ aProjModeList.append( tr("PREF_ORTHOGRAPHIC") );
+ aProjModeList.append( tr("PREF_PERSPECTIVE") );
+
+ QList<QVariant> aModeIndexesList;
+ aModeIndexesList.append(0);
+ aModeIndexesList.append(1);
+
+ pref->setItemProperty( "strings", aProjModeList, vtkProjMode );
+ pref->setItemProperty( "indexes", aModeIndexesList, vtkProjMode );
+
+ pref->addPreference( tr( "PREF_VIEWER_BACKGROUND" ), vtkGen,
LightApp_Preferences::Color, "VTKViewer", "background" );
- pref->addPreference( tr( "PREF_RELATIVE_SIZE" ), vtkGroup, LightApp_Preferences::Bool, "VTKViewer", "relative_size" );
- pref->addPreference( tr( "PREF_USE_ADVANCED_SELECTION_ALGORITHM" ), vtkGroup,
- LightApp_Preferences::Bool, "VTKViewer", "use_advanced_selection_algorithm" );
+
+ int vtkTS = pref->addPreference( tr( "PREF_TRIHEDRON_SIZE" ), vtkGen,
+ LightApp_Preferences::DblSpin, "VTKViewer", "trihedron_size" );
pref->setItemProperty( "min", 1.0E-06, vtkTS );
pref->setItemProperty( "max", 150, vtkTS );
+ pref->addPreference( tr( "PREF_RELATIVE_SIZE" ), vtkGen, LightApp_Preferences::Bool, "VTKViewer", "relative_size" );
+
+ int vtkStyleMode = pref->addPreference( tr( "PREF_NAVIGATION" ), vtkGen,
+ LightApp_Preferences::Selector, "VTKViewer", "navigation_mode" );
+ QStringList aStyleModeList;
+ aStyleModeList.append( tr("PREF_STANDARD_STYLE") );
+ aStyleModeList.append( tr("PREF_KEYFREE_STYLE") );
+
+ pref->setItemProperty( "strings", aStyleModeList, vtkStyleMode );
+ pref->setItemProperty( "indexes", aModeIndexesList, vtkStyleMode );
+
+ pref->addPreference( "", vtkGroup, LightApp_Preferences::Space );
+
+ int vtkSpeed = pref->addPreference( tr( "PREF_INCREMENTAL_SPEED" ), vtkGen,
+ LightApp_Preferences::IntSpin, "VTKViewer", "speed_value" );
+
+ pref->setItemProperty( "min", 1, vtkSpeed );
+ pref->setItemProperty( "max", 1000, vtkSpeed );
+
+ int vtkSpeedMode = pref->addPreference( tr( "PREF_INCREMENTAL_SPEED_MODE" ), vtkGen,
+ LightApp_Preferences::Selector, "VTKViewer", "speed_mode" );
+ QStringList aSpeedModeList;
+ aSpeedModeList.append( tr("PREF_ARITHMETIC") );
+ aSpeedModeList.append( tr("PREF_GEOMETRICAL") );
+
+ pref->setItemProperty( "strings", aSpeedModeList, vtkSpeedMode );
+ pref->setItemProperty( "indexes", aModeIndexesList, vtkSpeedMode );
+
+ int vtkSM = pref->addPreference( tr( "PREF_FRAME_SPACEMOUSE" ), vtkGroup, LightApp_Preferences::GroupBox );
+ pref->setItemProperty( "columns", 2, vtkSM );
+ int spacemousePref1 = pref->addPreference( tr( "PREF_SPACEMOUSE_FUNC_1" ), vtkSM,
+ LightApp_Preferences::Selector, "VTKViewer",
+ "spacemouse_func1_btn" ); //decrease_speed_increment
+ int spacemousePref2 = pref->addPreference( tr( "PREF_SPACEMOUSE_FUNC_2" ), vtkSM,
+ LightApp_Preferences::Selector, "VTKViewer",
+ "spacemouse_func2_btn" ); //increase_speed_increment
+ int spacemousePref3 = pref->addPreference( tr( "PREF_SPACEMOUSE_FUNC_3" ), vtkSM,
+ LightApp_Preferences::Selector, "VTKViewer",
+ "spacemouse_func5_btn" ); //dominant_combined_switch
+
+ QStringList values;
+ values.append( tr( "PREF_SPACEMOUSE_BTN_1" ) );
+ values.append( tr( "PREF_SPACEMOUSE_BTN_2" ) );
+ values.append( tr( "PREF_SPACEMOUSE_BTN_3" ) );
+ values.append( tr( "PREF_SPACEMOUSE_BTN_4" ) );
+ values.append( tr( "PREF_SPACEMOUSE_BTN_5" ) );
+ values.append( tr( "PREF_SPACEMOUSE_BTN_6" ) );
+ values.append( tr( "PREF_SPACEMOUSE_BTN_7" ) );
+ values.append( tr( "PREF_SPACEMOUSE_BTN_8" ) );
+ values.append( tr( "PREF_SPACEMOUSE_BTN_*" ) );
+ values.append( tr( "PREF_SPACEMOUSE_BTN_10" ) );
+ values.append( tr( "PREF_SPACEMOUSE_BTN_11" ) );
+ QList<QVariant> indices;
+ 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 );
+ pref->setItemProperty( "strings", values, spacemousePref1 );
+ pref->setItemProperty( "indexes", indices, spacemousePref1 );
+ pref->setItemProperty( "strings", values, spacemousePref2 );
+ pref->setItemProperty( "indexes", indices, spacemousePref2 );
+ pref->setItemProperty( "strings", values, spacemousePref3 );
+ pref->setItemProperty( "indexes", indices, spacemousePref3 );
+
+ int vtkRec = pref->addPreference( tr( "PREF_FRAME_RECORDING" ), vtkGroup, LightApp_Preferences::GroupBox );
+ pref->setItemProperty( "columns", 2, vtkRec );
+
+ int modePref = pref->addPreference( tr( "PREF_RECORDING_MODE" ), vtkRec,
+ LightApp_Preferences::Selector, "VTKViewer", "recorder_mode" );
+ values.clear();
+ values.append( tr( "PREF_SKIPPED_FRAMES" ) );
+ values.append( tr( "PREF_ALL_DISLPAYED_FRAMES" ) );
+ indices.clear();
+ indices.append( 0 );
+ indices.append( 1 );
+ pref->setItemProperty( "strings", values, modePref );
+ pref->setItemProperty( "indexes", indices, modePref );
+
+ int fpsPref = pref->addPreference( tr( "PREF_FPS" ), vtkRec,
+ LightApp_Preferences::DblSpin, "VTKViewer", "recorder_fps" );
+ pref->setItemProperty( "min", 0.1, fpsPref );
+ pref->setItemProperty( "max", 100, fpsPref );
+
+ int qualityPref = pref->addPreference( tr( "PREF_QUALITY" ), vtkRec,
+ LightApp_Preferences::IntSpin, "VTKViewer", "recorder_quality" );
+ pref->setItemProperty( "min", 1, qualityPref );
+ pref->setItemProperty( "max", 100, qualityPref );
+
+ pref->addPreference( tr( "PREF_PROGRESSIVE" ), vtkRec,
+ LightApp_Preferences::Bool, "VTKViewer", "recorder_progressive" );
+
+ // Plot2d
pref->addPreference( tr( "PREF_SHOW_LEGEND" ), plot2dGroup,
LightApp_Preferences::Bool, "Plot2d", "ShowLegend" );
}
#endif
+#ifndef DISABLE_VTKVIEWER
+ if ( sec == QString( "VTKViewer" ) && (param == QString( "speed_value" ) || param == QString( "speed_mode" )) )
+ {
+ int speed = resMgr->integerValue( "VTKViewer", "speed_value", 10 );
+ int mode = resMgr->integerValue( "VTKViewer", "speed_mode", 0 );
+ QList<SUIT_ViewManager*> lst;
+#ifndef DISABLE_SALOMEOBJECT
+ viewManagers( SVTK_Viewer::Type(), lst );
+ QListIterator<SUIT_ViewManager*> it( lst );
+ while ( it.hasNext() )
+ {
+ SUIT_ViewModel* vm = it.next()->getViewModel();
+ if ( !vm || !vm->inherits( "SVTK_Viewer" ) )
+ continue;
+
+ SVTK_Viewer* vtkVM = dynamic_cast<SVTK_Viewer*>( vm );
+ if( vtkVM ) vtkVM->setIncrementalSpeed( speed, mode );
+ }
+#endif
+ }
+#endif
+
+#ifndef DISABLE_VTKVIEWER
+ if ( sec == QString( "VTKViewer" ) && param == QString( "projection_mode" ) )
+ {
+ int mode = resMgr->integerValue( "VTKViewer", "projection_mode", 0 );
+ QList<SUIT_ViewManager*> lst;
+#ifndef DISABLE_SALOMEOBJECT
+ viewManagers( SVTK_Viewer::Type(), lst );
+ QListIterator<SUIT_ViewManager*> it( lst );
+ while ( it.hasNext() )
+ {
+ SUIT_ViewModel* vm = it.next()->getViewModel();
+ if ( !vm || !vm->inherits( "SVTK_Viewer" ) )
+ continue;
+
+ SVTK_Viewer* vtkVM = dynamic_cast<SVTK_Viewer*>( vm );
+ if( vtkVM ) vtkVM->setProjectionMode( mode );
+ }
+#endif
+ }
+#endif
+
+#ifndef DISABLE_VTKVIEWER
+ if ( sec == QString( "VTKViewer" ) && param == QString( "navigation_mode" ) )
+ {
+ int mode = resMgr->integerValue( "VTKViewer", "navigation_mode", 0 );
+ QList<SUIT_ViewManager*> lst;
+#ifndef DISABLE_SALOMEOBJECT
+ viewManagers( SVTK_Viewer::Type(), lst );
+ QListIterator<SUIT_ViewManager*> it( lst );
+ while ( it.hasNext() )
+ {
+ SUIT_ViewModel* vm = it.next()->getViewModel();
+ if ( !vm || !vm->inherits( "SVTK_Viewer" ) )
+ continue;
+
+ SVTK_Viewer* vtkVM = dynamic_cast<SVTK_Viewer*>( vm );
+ if( vtkVM ) vtkVM->setInteractionStyle( mode );
+ }
+#endif
+ }
+#endif
+
+#ifndef DISABLE_VTKVIEWER
+ if ( sec == QString( "VTKViewer" ) && (param == QString( "spacemouse_func1_btn" ) ||
+ param == QString( "spacemouse_func2_btn" ) ||
+ param == QString( "spacemouse_func5_btn" ) ) )
+ {
+ int btn1 = resMgr->integerValue( "VTKViewer", "spacemouse_func1_btn", 1 );
+ int btn2 = resMgr->integerValue( "VTKViewer", "spacemouse_func2_btn", 2 );
+ int btn3 = resMgr->integerValue( "VTKViewer", "spacemouse_func5_btn", 9 );
+ QList<SUIT_ViewManager*> lst;
+#ifndef DISABLE_SALOMEOBJECT
+ viewManagers( SVTK_Viewer::Type(), lst );
+ QListIterator<SUIT_ViewManager*> it( lst );
+ while ( it.hasNext() )
+ {
+ SUIT_ViewModel* vm = it.next()->getViewModel();
+ if ( !vm || !vm->inherits( "SVTK_Viewer" ) )
+ continue;
+
+ SVTK_Viewer* vtkVM = dynamic_cast<SVTK_Viewer*>( vm );
+ if( vtkVM ) vtkVM->setSpacemouseButtons( btn1, btn2, btn3 );
+ }
+#endif
+ }
+#endif
+
#ifndef DISABLE_OCCVIEWER
if ( sec == QString( "OCCViewer" ) && ( param == QString( "iso_number_u" ) || param == QString( "iso_number_v" ) ) )
{
<source>PREF_STORE_POS</source>
<translation>Store positions of windows</translation>
</message>
+ <message>
+ <source>PREF_PROJECTION_MODE</source>
+ <translation>Projection mode:</translation>
+ </message>
+ <message>
+ <source>PREF_ORTHOGRAPHIC</source>
+ <translation>Orthogonal</translation>
+ </message>
+ <message>
+ <source>PREF_PERSPECTIVE</source>
+ <translation>Perspective</translation>
+ </message>
+ <message>
+ <source>PREF_NAVIGATION</source>
+ <translation>Navigation:</translation>
+ </message>
+ <message>
+ <source>PREF_STANDARD_STYLE</source>
+ <translation>Salome standard controls</translation>
+ </message>
+ <message>
+ <source>PREF_KEYFREE_STYLE</source>
+ <translation>Keyboard free style</translation>
+ </message>
+ <message>
+ <source>PREF_INCREMENTAL_SPEED</source>
+ <translation>Speed increment:</translation>
+ </message>
+ <message>
+ <source>PREF_INCREMENTAL_SPEED_MODE</source>
+ <translation>Modification mode:</translation>
+ </message>
+ <message>
+ <source>PREF_ARITHMETIC</source>
+ <translation>Arithmetic progression</translation>
+ </message>
+ <message>
+ <source>PREF_GEOMETRICAL</source>
+ <translation>Geometrical progression</translation>
+ </message>
+ <message>
+ <source>PREF_FRAME_SPACEMOUSE</source>
+ <translation>Spacemouse</translation>
+ </message>
+ <message>
+ <source>PREF_SPACEMOUSE_FUNC_1</source>
+ <translation>Decrease speed increment</translation>
+ </message>
+ <message>
+ <source>PREF_SPACEMOUSE_FUNC_2</source>
+ <translation>Increase speed increment</translation>
+ </message>
+ <message>
+ <source>PREF_SPACEMOUSE_FUNC_3</source>
+ <translation>Dominant / combined switch</translation>
+ </message>
+ <message>
+ <source>PREF_SPACEMOUSE_BTN_1</source>
+ <translation>Button 1</translation>
+ </message>
+ <message>
+ <source>PREF_SPACEMOUSE_BTN_2</source>
+ <translation>Button 2</translation>
+ </message>
+ <message>
+ <source>PREF_SPACEMOUSE_BTN_3</source>
+ <translation>Button 3</translation>
+ </message>
+ <message>
+ <source>PREF_SPACEMOUSE_BTN_4</source>
+ <translation>Button 4</translation>
+ </message>
+ <message>
+ <source>PREF_SPACEMOUSE_BTN_5</source>
+ <translation>Button 5</translation>
+ </message>
+ <message>
+ <source>PREF_SPACEMOUSE_BTN_6</source>
+ <translation>Button 6</translation>
+ </message>
+ <message>
+ <source>PREF_SPACEMOUSE_BTN_7</source>
+ <translation>Button 7</translation>
+ </message>
+ <message>
+ <source>PREF_SPACEMOUSE_BTN_8</source>
+ <translation>Button 8</translation>
+ </message>
+ <message>
+ <source>PREF_SPACEMOUSE_BTN_*</source>
+ <translation>Button *</translation>
+ </message>
+ <message>
+ <source>PREF_SPACEMOUSE_BTN_10</source>
+ <translation>Button 10</translation>
+ </message>
+ <message>
+ <source>PREF_SPACEMOUSE_BTN_11</source>
+ <translation>Button 11</translation>
+ </message>
+ <message>
+ <source>PREF_FRAME_RECORDING</source>
+ <translation>AVI Recording</translation>
+ </message>
+ <message>
+ <source>PREF_ALL_DISLPAYED_FRAMES</source>
+ <translation>Recording all displayed frames</translation>
+ </message>
+ <message>
+ <source>PREF_FPS</source>
+ <translation>FPS</translation>
+ </message>
+ <message>
+ <source>PREF_GROUP_TTL</source>
+ <translation>Settings</translation>
+ </message>
+ <message>
+ <source>PREF_PROGRESSIVE</source>
+ <translation>Progressive</translation>
+ </message>
+ <message>
+ <source>PREF_QUALITY</source>
+ <translation>Quality</translation>
+ </message>
+ <message>
+ <source>PREF_RECORDING_MODE</source>
+ <translation>Mode</translation>
+ </message>
+ <message>
+ <source>PREF_SKIPPED_FRAMES</source>
+ <translation>Recording at a given FPS</translation>
+ </message>
<message>
<source>PREF_BOTTOM</source>
<translation>Bottom</translation>