select1.png \
sewing.png \
shading.png \
+shading_with_edges.png \
shapesonshape.png \
shared_shapes.png \
sketch.png \
vector_mode.png \
vector2points.png \
vectordxyz.png \
+wireframe.png \
whatis.png \
ellipse.png \
ellipsepointvector.png \
SALOME_ListIO selected;
Sel->selectedObjects( selected );
- QString aDispModeName;
- int aDispMode;
- if ( theCommandID == GEOMOp::OpDisplayMode )
- aDispMode = GetDisplayMode();
-
switch ( theCommandID ) {
- case GEOMOp::OpDisplayMode: // MENU VIEW - DISPLAY MODE - WIREFRAME/SHADING/SHADING WITH EDGES
- //InvertDisplayMode();
- switch ( aDispMode) {
- case 0:
- aDispModeName = tr( "GEOM_MEN_WIREFRAME" );
- break;
- case 1:
- aDispModeName = tr("GEOM_MEN_SHADING");
- break;
- case 2:
- aDispModeName = tr("GEOM_MEN_SHADING_WITH_EDGES");
- break;
- default:
- break;
- }
- getGeometryGUI()->action( GEOMOp::OpDisplayMode )->setText( aDispModeName );
- getGeometryGUI()->menuMgr()->update();
+ case GEOMOp::OpDMWireframe: // MENU VIEW - DISPLAY MODE - WIREFRAME
+ SetDisplayMode( 0 );
+ break;
+ case GEOMOp::OpDMShading: // MENU VIEW - DISPLAY MODE - SHADING
+ SetDisplayMode( 1 );
+ break;
+ case GEOMOp::OpDMShadingWithEdges: // MENU VIEW - DISPLAY MODE - SHADING WITH EDGES
+ SetDisplayMode( 2 );
break;
case GEOMOp::OpShowAll: // MENU VIEW - SHOW ALL
getGeometryGUI()->EmitSignalDeactivateDialog();
}
}
-//=====================================================================================
-// function : DisplayGUI::GetDisplayMode()
-// purpose : Get display mode of the viewer (current viewer if <viewWindow> - 0 )
-//=====================================================================================
-int DisplayGUI::GetDisplayMode( SUIT_ViewWindow* viewWindow )
-{
- int dispMode = 0;
- if ( !viewWindow )
- viewWindow = getGeometryGUI()->getApp()->desktop()->activeWindow();
- if ( viewWindow->getViewManager()->getType() == SVTK_Viewer::Type() ) {
- SVTK_View* aView = ((SVTK_ViewWindow*)viewWindow)->getView();
- dispMode = aView->GetDisplayMode();
- }
- else if ( viewWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() ) {
- OCCViewer_Viewer* v3d = ((OCCViewer_ViewManager*)(viewWindow->getViewManager()))->getOCCViewer();
- Handle(AIS_InteractiveContext) ic = v3d->getAISContext();
- dispMode = ic->DisplayMode();
- }
- return dispMode;
-}
-
//=====================================================================================
// function : DisplayGUI::SetVectorsMode()
// purpose : Set vector mode for the viewer
return viewWindow->property( "VectorsMode" ).toBool();
}
-//=====================================================================================
-// function : DisplayGUI::InvertDisplayMode()
-// purpose : Invert display mode ( shading <-> wireframe ) for the viewer
-// (current viewer if <viewWindow> = 0 )
-//=====================================================================================
-void DisplayGUI::InvertDisplayMode( SUIT_ViewWindow* viewWindow )
-{
- SetDisplayMode( 1 - GetDisplayMode( viewWindow ) );
-}
-
//=====================================================================================
// function : DisplayGUI::ChangeDisplayMode()
// purpose : Set display mode for selected objects in the viewer given
// DISPLAY MODE methods : 0 - wireframe, 1 - shading
// Set display mode for the viewer (current viewer if <viewWindow> - 0 )
void SetDisplayMode( const int, SUIT_ViewWindow* = 0 );
- // Get display mode of the viewer (current viewer if <viewWindow> - 0 )
- int GetDisplayMode( SUIT_ViewWindow* = 0 );
- // Invert display mode ( shadin <-> wireframe ) for the viewer
- // (current viewer if <viewWindow> = 0 )
- void InvertDisplayMode( SUIT_ViewWindow* = 0 );
// VECTOR MODE methods
// Set vectror mode for the viewer
<source>ICO_SEWING</source>
<translation>sewing.png</translation>
</message>
+ <message>
+ <source>ICO_WIREFRAME</source>
+ <translation>wireframe.png</translation>
+ </message>
<message>
<source>ICO_SHADING</source>
<translation>shading.png</translation>
</message>
+ <message>
+ <source>ICO_SHADING_WITH_EDGES</source>
+ <translation>shading_with_edges.png</translation>
+ </message>
<message>
<source>ICO_VECTOR_MODE</source>
<translation>vector_mode.png</translation>
case GEOMOp::OpClsBringToFront: //
libName = "GEOMToolsGUI";
break;
- case GEOMOp::OpDisplayMode: // MENU VIEW - WIREFRAME/SHADING
+ case GEOMOp::OpDMWireframe: // MENU VIEW - WIREFRAME
+ case GEOMOp::OpDMShading: // MENU VIEW - SHADING
+ case GEOMOp::OpDMShadingWithEdges: // MENU VIEW - SHADING
case GEOMOp::OpShowAll: // MENU VIEW - SHOW ALL
case GEOMOp::OpShowOnly: // MENU VIEW - DISPLAY ONLY
case GEOMOp::OpHideAll: // MENU VIEW - ERASE ALL
createGeomAction( GEOMOp::OpCheckGeom, "CHECK_GEOMETRY" );
#endif
- createGeomAction( GEOMOp::OpDisplayMode, "SHADING" );
+ createGeomAction( GEOMOp::OpDMWireframe, "WIREFRAME" );
+ createGeomAction( GEOMOp::OpDMShading, "SHADING" );
+ createGeomAction( GEOMOp::OpDMShadingWithEdges, "SHADING_WITH_EDGES" );
createGeomAction( GEOMOp::OpShowAll, "DISPLAY_ALL" );
createGeomAction( GEOMOp::OpHideAll, "ERASE_ALL" );
createGeomAction( GEOMOp::OpShow, "DISPLAY" );
createMenu( separator(), viewId, -1 );
int dispmodeId = createMenu( tr( "MEN_DISPLAY_MODE" ), viewId, -1 );
- createMenu( GEOMOp::OpDisplayMode, dispmodeId, -1 );
- createMenu( separator(), dispmodeId, -1 );
- createMenu( GEOMOp::OpSwitchVectors, dispmodeId, -1 );
+ createMenu( GEOMOp::OpDMWireframe, dispmodeId, -1 );
+ createMenu( GEOMOp::OpDMShading, dispmodeId, -1 );
+ createMenu( GEOMOp::OpDMShadingWithEdges, dispmodeId, -1 );
+ createMenu( separator(), dispmodeId, -1 );
+ createMenu( GEOMOp::OpSwitchVectors, dispmodeId, -1 );
createMenu( separator(), viewId, -1 );
createMenu( GEOMOp::OpShowAll, viewId, -1 );
OpIsosWidth = 1261, // POPUP MENU - LINE WIDTH - ISOS WIDTH
// DisplayGUI ----------------//--------------------------------
- OpDisplayMode = 2000, // MENU VIEW - DISPLAY MODE - WIREFRAME/SHADING/SHADING WITH EDGES
OpSwitchVectors = 2001, // MENU VIEW - DISPLAY MODE - SHOW/HIDE EDGE DIRECTION
OpShowAll = 2002, // MENU VIEW - SHOW ALL
OpHideAll = 2003, // MENU VIEW - HIDE ALL
+ OpDMWireframe = 2010, // MENU VIEW - DISPLAY MODE - WIREFRAME
+ OpDMShading = 2011, // MENU VIEW - DISPLAY MODE - SHADING
+ OpDMShadingWithEdges = 2012, // MENU VIEW - DISPLAY MODE - SHADING WITH EDGES
OpShow = 2100, // POPUP MENU - SHOW
OpShowOnly = 2101, // POPUP MENU - SHOW ONLY
OpHide = 2102, // POPUP MENU - HIDE