Rassemblement des toolbars

This commit is contained in:
Gérald NICOLAS 2020-06-08 16:43:05 +02:00
parent d4b3f508bf
commit f787750dbb

View File

@ -4541,23 +4541,8 @@ void SMESHGUI::initialize( CAM_Application* app )
connect( volumeMenu, SIGNAL( aboutToShow() ), this, SLOT( onUpdateControlActions() ) );
// ----- create toolbars --------------
int meshTb = createTool( tr( "TB_MESH" ), QString( "SMESHMeshToolbar" ) ),
info = createTool( tr( "TB_INFO" ), QString( "SMESHInformationToolbar" ) ),
groupTb = createTool( tr( "TB_GROUP" ), QString( "SMESHGroupToolbar" ) ),
ctrl0dTb = createTool( tr( "TB_CTRL0D" ), QString( "SMESHNodeControlsToolbar" ) ),
ctrl1dTb = createTool( tr( "TB_CTRL1D" ), QString( "SMESHEdgeControlsToolbar" ) ),
ctrl2dTb = createTool( tr( "TB_CTRL2D" ), QString( "SMESHFaceControlsToolbar" ) ),
ctrl3dTb = createTool( tr( "TB_CTRL3D" ), QString( "SMESHVolumeControlsToolbar" ) ),
addElemTb = createTool( tr( "TB_ADD" ), QString( "SMESHAddElementToolbar" ) ),
addNonElemTb = createTool( tr( "TB_ADDNON" ), QString( "SMESHAddElementToolbar" ) ),
remTb = createTool( tr( "TB_REM" ), QString( "SMESHRemoveToolbar" ) ),
//renumbTb = createTool( tr( "TB_RENUMBER" ), QString( "SMESHRenumberingToolbar" ) ),
transformTb = createTool( tr( "TB_TRANSFORM" ), QString( "SMESHTransformationToolbar" ) ),
modifyTb = createTool( tr( "TB_MODIFY" ), QString( "SMESHModificationToolbar" ) ),
adaptTb = createTool( tr( "TB_ADAPTATION" ),QString( "SMESHAdaptationToolbar" ) ),
measuremTb = createTool( tr( "TB_MEASUREM" ), QString( "SMESHMeasurementsToolbar" ) ),
dispModeTb = createTool( tr( "TB_DISP_MODE" ), QString( "SMESHDisplayModeToolbar" ) );
int meshTb = createTool( tr( "TB_MESH" ), QString( "SMESHMeshToolbar" ) ) ;
INFOS( "meshTb :" << meshTb );
createTool( SMESHOp::OpCreateMesh, meshTb );
createTool( SMESHOp::OpCreateSubMesh, meshTb );
createTool( SMESHOp::OpEditMeshOrSubMesh, meshTb );
@ -4569,25 +4554,36 @@ void SMESHGUI::initialize( CAM_Application* app )
createTool( SMESHOp::OpEvaluate, meshTb );
createTool( SMESHOp::OpMeshOrder, meshTb );
int infoTb = createTool( tr( "TB_INFO" ), QString( "SMESHInformationToolbar" ) ) ;
INFOS( "infoTb :" << infoTb );
createTool( SMESHOp::OpMeshInformation, infoTb );
//createTool( SMESHOp::OpStdInfo, meshTb );
//createTool( SMESHOp::OpWhatIs, meshTb ); // VSR: issue #0021242 (eliminate "Mesh Element Information" command)
createTool( SMESHOp::OpFindElementByPoint, infoTb );
int groupTb = createTool( tr( "TB_GROUP" ), QString( "SMESHGroupToolbar" ) ) ;
INFOS( "groupTb :" << groupTb );
createTool( SMESHOp::OpCreateGroup, groupTb );
createTool( SMESHOp::OpCreateGeometryGroup, groupTb );
createTool( SMESHOp::OpConstructGroup, groupTb );
createTool( SMESHOp::OpEditGroup, groupTb );
createTool( SMESHOp::OpMeshInformation, info );
//createTool( SMESHOp::OpStdInfo, meshTb );
//createTool( SMESHOp::OpWhatIs, meshTb ); // VSR: issue #0021242 (eliminate "Mesh Element Information" command)
createTool( SMESHOp::OpFindElementByPoint, info );
int ctrl0dTb = createTool( tr( "TB_CTRL0D" ), QString( "SMESHNodeControlsToolbar" ) ) ;
INFOS( "ctrl0dTb :" << ctrl0dTb );
createTool( SMESHOp::OpFreeNode, ctrl0dTb );
createTool( SMESHOp::OpEqualNode, ctrl0dTb );
//createTool( SMESHOp::OpNodeConnectivityNb, ctrl0dTb );
int ctrl1dTb = createTool( tr( "TB_CTRL1D" ), QString( "SMESHEdgeControlsToolbar" ) ) ;
INFOS( "ctrl1dTb :" << ctrl1dTb );
createTool( SMESHOp::OpFreeBorder, ctrl1dTb );
createTool( SMESHOp::OpLength, ctrl1dTb );
createTool( SMESHOp::OpConnection, ctrl1dTb );
createTool( SMESHOp::OpEqualEdge, ctrl1dTb );
int ctrl2dTb = createTool( tr( "TB_CTRL2D" ), QString( "SMESHFaceControlsToolbar" ) ) ;
INFOS( "ctrl2dTb :" << ctrl2dTb );
createTool( SMESHOp::OpFreeEdge, ctrl2dTb );
createTool( SMESHOp::OpFreeFace, ctrl2dTb );
createTool( SMESHOp::OpBareBorderFace, ctrl2dTb );
@ -4604,6 +4600,7 @@ void SMESHGUI::initialize( CAM_Application* app )
createTool( SMESHOp::OpEqualFace, ctrl2dTb );
createTool( SMESHOp::OpDeflection2D, ctrl2dTb );
int ctrl3dTb = createTool( tr( "TB_CTRL3D" ), QString( "SMESHVolumeControlsToolbar" ) ) ;
createTool( SMESHOp::OpAspectRatio3D, ctrl3dTb );
createTool( SMESHOp::OpVolume, ctrl3dTb );
createTool( SMESHOp::OpMaxElementLength3D, ctrl3dTb );
@ -4611,6 +4608,7 @@ void SMESHGUI::initialize( CAM_Application* app )
createTool( SMESHOp::OpOverConstrainedVolume, ctrl3dTb );
createTool( SMESHOp::OpEqualVolume, ctrl3dTb );
int addElemTb = createTool( tr( "TB_ADD" ), QString( "SMESHAddElementToolbar" ) ) ;
createTool( SMESHOp::OpNode, addElemTb );
createTool( SMESHOp::OpElem0D, addElemTb );
createTool( SMESHOp::OpElem0DOnElemNodes, addElemTb );
@ -4626,6 +4624,7 @@ void SMESHGUI::initialize( CAM_Application* app )
createTool( SMESHOp::OpHexagonalPrism, addElemTb );
createTool( SMESHOp::OpPolyhedron, addElemTb );
int addNonElemTb = createTool( tr( "TB_ADDNON" ), QString( "SMESHAddElementToolbar" ) ) ;
createTool( SMESHOp::OpQuadraticEdge, addNonElemTb );
createTool( SMESHOp::OpQuadraticTriangle, addNonElemTb );
createTool( SMESHOp::OpBiQuadraticTriangle, addNonElemTb );
@ -4639,14 +4638,18 @@ void SMESHGUI::initialize( CAM_Application* app )
createTool( SMESHOp::OpQuadraticHexahedron, addNonElemTb );
createTool( SMESHOp::OpTriQuadraticHexahedron, addNonElemTb );
int remTb = createTool( tr( "TB_REM" ), QString( "SMESHRemoveToolbar" ) ) ;
createTool( SMESHOp::OpRemoveNodes, remTb );
createTool( SMESHOp::OpRemoveElements, remTb );
createTool( SMESHOp::OpRemoveOrphanNodes, remTb );
createTool( SMESHOp::OpClearMesh, remTb );
// int renumbTb = createTool( tr( "TB_RENUMBER" ), QString( "SMESHRenumberingToolbar" ) ) ;
//createTool( SMESHOp::OpRenumberingNodes, renumbTb );
//createTool( SMESHOp::OpRenumberingElements, renumbTb );
int transformTb = createTool( tr( "TB_TRANSFORM" ), QString( "SMESHTransformationToolbar" ) ) ;
INFOS( "transformTb :" << transformTb );
createTool( SMESHOp::OpMergeNodes, transformTb );
createTool( SMESHOp::OpMergeElements, transformTb );
createTool( SMESHOp::OpTranslation, transformTb );
@ -4657,6 +4660,8 @@ void SMESHGUI::initialize( CAM_Application* app )
createTool( SMESHOp::OpSewing, transformTb );
createTool( SMESHOp::OpDuplicateNodes, transformTb );
int modifyTb = createTool( tr( "TB_MODIFY" ), QString( "SMESHModificationToolbar" ) ) ;
INFOS( "modifyTb :" << modifyTb );
createTool( SMESHOp::OpConvertMeshToQuadratic, modifyTb );
createTool( SMESHOp::OpCreateBoundaryElements, modifyTb );
createTool( SMESHOp::OpExtrusion, modifyTb );
@ -4675,6 +4680,8 @@ void SMESHGUI::initialize( CAM_Application* app )
createTool( SMESHOp::OpPatternMapping, modifyTb );
// Adaptation - begin
int adaptTb = createTool( tr( "TB_ADAPTATION" ),QString( "SMESHAdaptationToolbar" ) ) ;
INFOS( "adaptTb :" << adaptTb );
createTool( SMESHOp::OpUniformRefinement, adaptTb );
createTool( SMESHOp::OpHONewCase, adaptTb );
createTool( SMESHOp::OpHOCaseFollow, adaptTb );
@ -4684,8 +4691,12 @@ void SMESHGUI::initialize( CAM_Application* app )
createTool( SMESHOp::OpMGAdapt, adaptTb );
// Adaptation - end
int measuremTb = createTool( tr( "TB_MEASUREM" ), QString( "SMESHMeasurementsToolbar" ) ) ;
INFOS( "measuremTb :" << measuremTb );
createTool( SMESHOp::OpMinimumDistance, measuremTb );
int dispModeTb = createTool( tr( "TB_DISP_MODE" ), QString( "SMESHDisplayModeToolbar" ) );
INFOS( "dispModeTb :" << dispModeTb );
createTool( SMESHOp::OpUpdate, dispModeTb );
QString lc = "$"; // VSR : instead of QtxPopupSelection::defEquality();