+ SalomeApp_Module::initialize( app );
+
+// SUIT_ResourceMgr* mgr = app->resourceMgr();
+// if ( mgr )
+ /* Automatic Update flag */
+// myAutomaticUpdate = mgr->booleanValue( "SMESH", "AutomaticUpdate", myAutomaticUpdate );
+
+ // ----- create actions --------------
+
+ //createSMESHAction( 111, "IMPORT_DAT", "", (Qt::CTRL+Qt::Key_B) );
+ createSMESHAction( 112, "IMPORT_UNV", "", (Qt::CTRL+Qt::Key_U) );
+ createSMESHAction( 113, "IMPORT_MED", "", (Qt::CTRL+Qt::Key_M) );
+ createSMESHAction( 114, "NUM" );
+ createSMESHAction( 115, "IMPORT_STL" );
+ createSMESHAction( 116, "IMPORT_CGNS" );
+ createSMESHAction( 117, "IMPORT_SAUV" );
+ createSMESHAction( 118, "IMPORT_GMF" );
+ createSMESHAction( 121, "DAT" );
+ createSMESHAction( 122, "MED" );
+ createSMESHAction( 123, "UNV" );
+ createSMESHAction( 140, "STL" );
+ createSMESHAction( 142, "CGNS");
+ createSMESHAction( 144, "SAUV");
+ createSMESHAction( 146, "GMF" );
+ createSMESHAction( 124, "DAT" );
+ createSMESHAction( 125, "MED" );
+ createSMESHAction( 126, "UNV" );
+ createSMESHAction( 141, "STL" );
+ createSMESHAction( 143, "CGNS");
+ createSMESHAction( 145, "SAUV");
+ createSMESHAction( 147, "GMF" );
+ createSMESHAction( 150, "FILE_INFO" );
+ createSMESHAction( 33, "DELETE", "ICON_DELETE", Qt::Key_Delete );
+ createSMESHAction( 5105, "SEL_FILTER_LIB" );
+ createSMESHAction( 701, "COMPUTE", "ICON_COMPUTE" );
+ createSMESHAction( 702, "CREATE_MESH", "ICON_DLG_INIT_MESH" );
+ createSMESHAction( 703, "CREATE_SUBMESH", "ICON_DLG_ADD_SUBMESH" );
+ createSMESHAction( 704, "EDIT_MESHSUBMESH","ICON_DLG_EDIT_MESH" );
+ createSMESHAction( 705, "COPY_MESH", "ICON_COPY_MESH" );
+ createSMESHAction( 710, "BUILD_COMPOUND", "ICON_BUILD_COMPOUND" );
+ createSMESHAction( 711, "PRECOMPUTE", "ICON_PRECOMPUTE" );
+ createSMESHAction( 712, "EVALUATE", "ICON_COMPUTE" );
+ createSMESHAction( 713, "MESH_ORDER", "ICON_COMPUTE" );
+ createSMESHAction( 806, "CREATE_GEO_GROUP","ICON_CREATE_GEO_GROUP" );
+ createSMESHAction( 801, "CREATE_GROUP", "ICON_CREATE_GROUP" );
+ createSMESHAction( 802, "CONSTRUCT_GROUP", "ICON_CONSTRUCT_GROUP" );
+ createSMESHAction( 803, "EDIT_GROUP", "ICON_EDIT_GROUP" );
+ createSMESHAction( 815, "EDIT_GEOMGROUP_AS_GROUP", "ICON_EDIT_GROUP" );
+ createSMESHAction( 804, "ADD" );
+ createSMESHAction( 805, "REMOVE" );
+ createSMESHAction( 810, "UN_GROUP", "ICON_UNION" );
+ createSMESHAction( 811, "INT_GROUP", "ICON_INTERSECT" );
+ createSMESHAction( 812, "CUT_GROUP", "ICON_CUT" );
+ createSMESHAction( 814, "UNDERLYING_ELEMS","ICON_UNDERLYING_ELEMS" );
+ createSMESHAction( 813, "DEL_GROUP", "ICON_DEL_GROUP" );
+ createSMESHAction( 900, "ADV_INFO", "ICON_ADV_INFO" );
+ //createSMESHAction( 902, "STD_INFO", "ICON_STD_INFO" );
+ //createSMESHAction( 903, "WHAT_IS", "ICON_WHAT_IS" ); // VSR: issue #0021242 (eliminate "Mesh Element Information" command)
+ createSMESHAction( 904, "FIND_ELEM", "ICON_FIND_ELEM" );
+ createSMESHAction( 6001, "LENGTH", "ICON_LENGTH", 0, true );
+ createSMESHAction( 6002, "FREE_EDGE", "ICON_FREE_EDGE", 0, true );
+ createSMESHAction( 6021, "FREE_FACES", "ICON_FREE_FACES", 0, true );
+ createSMESHAction( 6022, "MAX_ELEMENT_LENGTH_2D", "ICON_MAX_ELEMENT_LENGTH_2D", 0, true );
+ createSMESHAction( 6023, "MAX_ELEMENT_LENGTH_3D", "ICON_MAX_ELEMENT_LENGTH_3D", 0, true );
+ createSMESHAction( 6024, "BARE_BORDER_VOLUME", "ICON_BARE_BORDER_VOLUME", 0, true );
+ createSMESHAction( 6025, "BARE_BORDER_FACE", "ICON_BARE_BORDER_FACE", 0, true );
+ createSMESHAction( 6026, "OVER_CONSTRAINED_VOLUME","ICON_OVER_CONSTRAINED_VOLUME", 0, true );
+ createSMESHAction( 6027, "OVER_CONSTRAINED_FACE", "ICON_OVER_CONSTRAINED_FACE", 0, true );
+ createSMESHAction( 6028, "EQUAL_NODE", "ICON_EQUAL_NODE", 0, true );
+ createSMESHAction( 6029, "EQUAL_EDGE", "ICON_EQUAL_EDGE", 0, true );
+ createSMESHAction( 6030, "EQUAL_FACE", "ICON_EQUAL_FACE", 0, true );
+ createSMESHAction( 6031, "EQUAL_VOLUME", "ICON_EQUAL_VOLUME", 0, true );
+ createSMESHAction( 6032, "OVERALL_MESH_QUALITY" );
+ createSMESHAction( 6003, "FREE_BORDER", "ICON_FREE_EDGE_2D", 0, true );
+ createSMESHAction( 6004, "CONNECTION", "ICON_CONNECTION", 0, true );
+ createSMESHAction( 6005, "FREE_NODE", "ICON_FREE_NODE", 0, true );
+ createSMESHAction( 6011, "AREA", "ICON_AREA", 0, true );
+ createSMESHAction( 6012, "TAPER", "ICON_TAPER", 0, true );
+ createSMESHAction( 6013, "ASPECT", "ICON_ASPECT", 0, true );
+ createSMESHAction( 6014, "MIN_ANG", "ICON_ANGLE", 0, true );
+ createSMESHAction( 6015, "WARP", "ICON_WARP", 0, true );
+ createSMESHAction( 6016, "SKEW", "ICON_SKEW", 0, true );
+ createSMESHAction( 6017, "ASPECT_3D", "ICON_ASPECT_3D", 0, true );
+ createSMESHAction( 6018, "LENGTH_2D", "ICON_LENGTH_2D", 0, true );
+ createSMESHAction( 6019, "CONNECTION_2D", "ICON_CONNECTION_2D", 0, true );
+ createSMESHAction( 6009, "VOLUME_3D", "ICON_VOLUME_3D", 0, true );
+ createSMESHAction( 4000, "NODE", "ICON_DLG_NODE" );
+ createSMESHAction( 4009, "ELEM0D", "ICON_DLG_ELEM0D" );
+ createSMESHAction( 4008, "BALL", "ICON_DLG_BALL" );
+ createSMESHAction( 4010, "EDGE", "ICON_DLG_EDGE" );
+ createSMESHAction( 4021, "TRIANGLE", "ICON_DLG_TRIANGLE" );
+ createSMESHAction( 4022, "QUAD", "ICON_DLG_QUADRANGLE" );
+ createSMESHAction( 4023, "POLYGON", "ICON_DLG_POLYGON" );
+ createSMESHAction( 4031, "TETRA", "ICON_DLG_TETRAS" );
+ createSMESHAction( 4032, "HEXA", "ICON_DLG_HEXAS" );
+ createSMESHAction( 4133, "PENTA", "ICON_DLG_PENTA" );
+ createSMESHAction( 4134, "PYRAMID", "ICON_DLG_PYRAMID" );
+ createSMESHAction( 4135, "OCTA", "ICON_DLG_OCTA" );
+ createSMESHAction( 4033, "POLYHEDRON", "ICON_DLG_POLYHEDRON" );
+ createSMESHAction( 4034, "QUADRATIC_EDGE", "ICON_DLG_QUADRATIC_EDGE" );
+ createSMESHAction( 4035, "QUADRATIC_TRIANGLE", "ICON_DLG_QUADRATIC_TRIANGLE" );
+ createSMESHAction( 4036, "QUADRATIC_QUADRANGLE", "ICON_DLG_QUADRATIC_QUADRANGLE" );
+ createSMESHAction( 4136, "BIQUADRATIC_QUADRANGLE", "ICON_DLG_BIQUADRATIC_QUADRANGLE" );
+ createSMESHAction( 4137, "BIQUADRATIC_TRIANGLE", "ICON_DLG_BIQUADRATIC_TRIANGLE" );
+ createSMESHAction( 4037, "QUADRATIC_TETRAHEDRON", "ICON_DLG_QUADRATIC_TETRAHEDRON" );
+ createSMESHAction( 4038, "QUADRATIC_PYRAMID", "ICON_DLG_QUADRATIC_PYRAMID" );
+ createSMESHAction( 4039, "QUADRATIC_PENTAHEDRON", "ICON_DLG_QUADRATIC_PENTAHEDRON" );
+ createSMESHAction( 4040, "QUADRATIC_HEXAHEDRON", "ICON_DLG_QUADRATIC_HEXAHEDRON" );
+ createSMESHAction( 4140, "TRIQUADRATIC_HEXAHEDRON", "ICON_DLG_TRIQUADRATIC_HEXAHEDRON" );
+ createSMESHAction( 4041, "REMOVE_NODES", "ICON_DLG_REM_NODE" );
+ createSMESHAction( 4042, "REMOVE_ELEMENTS", "ICON_DLG_REM_ELEMENT" );
+ createSMESHAction( 4044, "REMOVE_ORPHAN_NODES", "ICON_DLG_REM_ORPHAN_NODES" );
+ createSMESHAction( 4043, "CLEAR_MESH" , "ICON_CLEAR_MESH" );
+ createSMESHAction( 4051, "RENUM_NODES", "ICON_DLG_RENUMBERING_NODES" );
+ createSMESHAction( 4052, "RENUM_ELEMENTS", "ICON_DLG_RENUMBERING_ELEMENTS" );
+ createSMESHAction( 4061, "TRANS", "ICON_SMESH_TRANSLATION_VECTOR" );
+ createSMESHAction( 4062, "ROT", "ICON_DLG_MESH_ROTATION" );
+ createSMESHAction( 4063, "SYM", "ICON_SMESH_SYMMETRY_PLANE" );
+ createSMESHAction( 4064, "SEW", "ICON_SMESH_SEWING_FREEBORDERS" );
+ createSMESHAction( 4065, "MERGE", "ICON_SMESH_MERGE_NODES" );
+ createSMESHAction( 4066, "MERGE_ELEMENTS", "ICON_DLG_MERGE_ELEMENTS" );
+ createSMESHAction( 4067, "MESH_THROU_POINT","ICON_DLG_MOVE_NODE" );
+ createSMESHAction( 4068, "SCALE", "ICON_DLG_MESH_SCALE" );
+ createSMESHAction( 4069, "DUPLICATE_NODES", "ICON_SMESH_DUPLICATE_NODES" );
+ createSMESHAction( 4070, "0D_ON_ALL_NODES", "ICON_0D_ON_ALL_NODES" );
+ createSMESHAction( 407, "INV", "ICON_DLG_MESH_DIAGONAL" );
+ createSMESHAction( 408, "UNION2", "ICON_UNION2TRI" );
+ createSMESHAction( 409, "ORIENT", "ICON_DLG_MESH_ORIENTATION" );
+ createSMESHAction( 410, "UNION", "ICON_UNIONTRI" );
+ createSMESHAction( 411, "CUT", "ICON_CUTQUAD" );
+ createSMESHAction( 412, "SMOOTH", "ICON_DLG_SMOOTHING" );
+ createSMESHAction( 413, "EXTRUSION", "ICON_EXTRUSION" );
+ createSMESHAction( 414, "REVOLUTION", "ICON_REVOLUTION" );
+ createSMESHAction( 415, "MAP", "ICON_MAP" );
+ createSMESHAction( 416, "EXTRUSION_ALONG", "ICON_EXTRUSION_ALONG" );
+ createSMESHAction( 417, "CONV_TO_QUAD", "ICON_CONV_TO_QUAD" );
+ createSMESHAction( 418, "2D_FROM_3D", "ICON_2D_FROM_3D" );
+ createSMESHAction( 419, "SPLIT_TO_TETRA", "ICON_SPLIT_TO_TETRA" );
+ createSMESHAction( 420, "REORIENT_2D", "ICON_REORIENT_2D" );
+ createSMESHAction( 200, "RESET" );
+ createSMESHAction( 201, "SCALAR_BAR_PROP" );
+ createSMESHAction( 2021, "SAVE_DISTRIBUTION" );
+ createSMESHAction( 2022, "SHOW_DISTRIBUTION","",0, true );
+#ifndef DISABLE_PLOT2DVIEWER
+ createSMESHAction( 2023, "PLOT_DISTRIBUTION" );
+#endif
+ createSMESHAction( 211, "WIRE", "ICON_WIRE", 0, true );
+ createSMESHAction( 212, "SHADE", "ICON_SHADE", 0, true );
+ createSMESHAction( 213, "SHRINK", "ICON_SHRINK", 0, true );
+ createSMESHAction( 214, "UPDATE", "ICON_UPDATE" );
+ createSMESHAction( 215, "NODES", "ICON_POINTS", 0, true );
+ createSMESHAction( 222, "BALLS", "ICON_DLG_BALL", 0, true );
+ createSMESHAction( 216, "ELEMS0D", "ICON_DLG_ELEM0D", 0, true );
+ createSMESHAction( 217, "EDGES", "ICON_DLG_EDGE", 0, true );
+ createSMESHAction( 218, "FACES", "ICON_DLG_TRIANGLE", 0, true );
+ createSMESHAction( 219, "VOLUMES", "ICON_DLG_TETRAS", 0, true );
+ createSMESHAction( 220, "ALL" );
+ createSMESHAction( 221, "FACE_ORIENTATION", "", 0, true );
+
+ createSMESHAction( 231, "LINE_REPRESENTATION", "", 0, true );
+ createSMESHAction( 232, "ARC_REPRESENTATION", "", 0, true );
+
+ createSMESHAction( 1100, "EDIT_HYPO" );
+ createSMESHAction( 1102, "UNASSIGN" );
+ createSMESHAction( 9010, "NUM_NODES", "", 0, true );
+ createSMESHAction( 9011, "NUM_ELEMENTS", "", 0, true );
+ createSMESHAction( 1131, "DISPMODE" );
+ createSMESHAction( 1132, "COLORS" );
+ createSMESHAction( 1133, "TRANSP" );
+ createSMESHAction( 1134, "CLIP" );
+ createSMESHAction( 1135, "DISP_ENT" );
+ createSMESHAction( 1136, "AUTO_COLOR" );
+ createSMESHAction( 1137, "DISABLE_AUTO_COLOR" );
+ createSMESHAction( 2000, "CTRL" );
+
+ createSMESHAction( 501, "MEASURE_MIN_DIST", "ICON_MEASURE_MIN_DIST" );
+ createSMESHAction( 502, "MEASURE_BND_BOX", "ICON_MEASURE_BND_BOX" );
+ createSMESHAction( 503, "MEASURE_LENGTH", "ICON_MEASURE_LENGTH" );
+ createSMESHAction( 504, "MEASURE_AREA", "ICON_MEASURE_AREA" );
+ createSMESHAction( 505, "MEASURE_VOLUME", "ICON_MEASURE_VOLUME" );
+
+ createSMESHAction( 300, "HIDE" );
+ createSMESHAction( 301, "SHOW" );
+ createSMESHAction( 302, "DISPLAY_ONLY" );
+
+ createSMESHAction( 41, "SORT_CHILD_ITEMS" );
+
+ // ----- create menu --------------
+ int fileId = createMenu( tr( "MEN_FILE" ), -1, 1 ),
+ editId = createMenu( tr( "MEN_EDIT" ), -1, 3 ),
+ toolsId = createMenu( tr( "MEN_TOOLS" ), -1, 5, 50 ),
+ meshId = createMenu( tr( "MEN_MESH" ), -1, 70, 10 ),
+ ctrlId = createMenu( tr( "MEN_CTRL" ), -1, 60, 10 ),
+ modifyId = createMenu( tr( "MEN_MODIFY" ), -1, 40, 10 ),
+ measureId = createMenu( tr( "MEN_MEASURE" ), -1, 50, 10 ),
+ viewId = createMenu( tr( "MEN_VIEW" ), -1, 2 );
+
+ createMenu( separator(), fileId );
+
+ int importId = createMenu( tr( "MEN_IMPORT" ), fileId, -1, 10 ),
+ exportId = createMenu( tr( "MEN_EXPORT" ), fileId, -1, 10 ),
+ nodeId = createMenu( tr( "MEN_NODE_CTRL" ), ctrlId, -1, 10 ),
+ edgeId = createMenu( tr( "MEN_EDGE_CTRL" ), ctrlId, -1, 10 ),
+ faceId = createMenu( tr( "MEN_FACE_CTRL" ), ctrlId, -1, 10 ),
+ volumeId = createMenu( tr( "MEN_VOLUME_CTRL" ), ctrlId, -1, 10 ),
+ addId = createMenu( tr( "MEN_ADD" ), modifyId, 402 ),
+ removeId = createMenu( tr( "MEN_REMOVE" ), modifyId, 403 ),
+ renumId = createMenu( tr( "MEN_RENUM" ), modifyId, 404 ),
+ transfId = createMenu( tr( "MEN_TRANSF" ), modifyId, 405 ),
+ basicPropId = createMenu( tr( "MEN_BASIC_PROPERTIES" ), measureId, -1, 10 );
+
+ //createMenu( 111, importId, -1 );
+ createMenu( 112, importId, -1 );
+ createMenu( 113, importId, -1 );
+ createMenu( 115, importId, -1 );
+#ifdef WITH_CGNS
+ createMenu( 116, importId, -1 );
+#endif
+ createMenu( 117, importId, -1 );
+ createMenu( 118, importId, -1 );
+ createMenu( 121, exportId, -1 );
+ createMenu( 122, exportId, -1 );
+ createMenu( 123, exportId, -1 );
+ createMenu( 140, exportId, -1 ); // export to STL
+#ifdef WITH_CGNS
+ createMenu( 142, exportId, -1 ); // export to CGNS
+#endif
+ createMenu( 144, exportId, -1 ); // export to SAUV
+ createMenu( 146, exportId, -1 ); // export to GMF
+ createMenu( separator(), fileId, 10 );
+
+ createMenu( 33, editId, -1 );
+
+ createMenu( 5105, toolsId, -1 );
+
+ createMenu( 702, meshId, -1 ); // "Mesh" menu
+ createMenu( 703, meshId, -1 );
+ createMenu( 704, meshId, -1 );
+ createMenu( 710, meshId, -1 );
+ createMenu( 705, meshId, -1 );
+ createMenu( separator(), meshId, -1 );
+ createMenu( 701, meshId, -1 );
+ createMenu( 711, meshId, -1 );
+ createMenu( 712, meshId, -1 );
+ createMenu( 713, meshId, -1 );
+ createMenu( separator(), meshId, -1 );
+ createMenu( 801, meshId, -1 );
+ createMenu( 806, meshId, -1 );
+ createMenu( 802, meshId, -1 );
+ createMenu( 803, meshId, -1 );
+ createMenu( 815, meshId, -1 );
+ createMenu( separator(), meshId, -1 );
+ createMenu( 810, meshId, -1 );
+ createMenu( 811, meshId, -1 );
+ createMenu( 812, meshId, -1 );
+ createMenu( separator(), meshId, -1 );
+ createMenu( 814, meshId, -1 );
+ createMenu( separator(), meshId, -1 );
+ createMenu( 900, meshId, -1 );
+ //createMenu( 902, meshId, -1 );
+ //createMenu( 903, meshId, -1 ); // VSR: issue #0021242 (eliminate "Mesh Element Information" command)
+ createMenu( 904, meshId, -1 );
+ createMenu( separator(), meshId, -1 );
+
+ createMenu( 6005, nodeId, -1 );
+ createMenu( 6028, nodeId, -1 );
+ createMenu( 6002, edgeId, -1 );
+ createMenu( 6003, edgeId, -1 );
+ createMenu( 6001, edgeId, -1 );
+ createMenu( 6004, edgeId, -1 );
+ createMenu( 6029, edgeId, -1 );
+ createMenu( 6021, faceId, -1 );
+ createMenu( 6025, faceId, -1 );
+ createMenu( 6027, faceId, -1 );
+ createMenu( 6018, faceId, -1 );
+ createMenu( 6019, faceId, -1 );
+ createMenu( 6011, faceId, -1 );
+ createMenu( 6012, faceId, -1 );
+ createMenu( 6013, faceId, -1 );
+ createMenu( 6014, faceId, -1 );
+ createMenu( 6015, faceId, -1 );
+ createMenu( 6016, faceId, -1 );
+ createMenu( 6022, faceId, -1 );
+ createMenu( 6030, faceId, -1 );
+ createMenu( 6017, volumeId, -1 );
+ createMenu( 6009, volumeId, -1 );
+ createMenu( 6023, volumeId, -1 );
+ createMenu( 6024, volumeId, -1 );
+ createMenu( 6026, volumeId, -1 );
+ createMenu( 6031, volumeId, -1 );
+ createMenu( separator(), ctrlId, -1 );
+ createMenu( 6032, ctrlId, -1 );
+
+ createMenu( 4000, addId, -1 );
+ createMenu( 4009, addId, -1 );
+ createMenu( 4070, addId, -1 );
+ createMenu( 4008, addId, -1 );
+ createMenu( 4010, addId, -1 );
+ createMenu( 4021, addId, -1 );
+ createMenu( 4022, addId, -1 );
+ createMenu( 4023, addId, -1 );
+ createMenu( 4031, addId, -1 );
+ createMenu( 4032, addId, -1 );
+ createMenu( 4133, addId, -1 );
+ createMenu( 4134, addId, -1 );
+ createMenu( 4135, addId, -1 );
+ createMenu( 4033, addId, -1 );
+ createMenu( separator(), addId, -1 );
+ createMenu( 4034, addId, -1 );
+ createMenu( 4035, addId, -1 );
+ createMenu( 4137, addId, -1 );
+ createMenu( 4036, addId, -1 );
+ createMenu( 4136, addId, -1 );
+ createMenu( 4037, addId, -1 );
+ createMenu( 4038, addId, -1 );
+ createMenu( 4039, addId, -1 );
+ createMenu( 4040, addId, -1 );
+ createMenu( 4140, addId, -1 );
+
+ createMenu( 4041, removeId, -1 );
+ createMenu( 4042, removeId, -1 );
+ createMenu( 4044, removeId, -1 );
+ createMenu( separator(), removeId, -1 );
+ createMenu( 813, removeId, -1 );
+ createMenu( separator(), removeId, -1 );
+ createMenu( 4043, removeId, -1 );
+
+ createMenu( 4051, renumId, -1 );
+ createMenu( 4052, renumId, -1 );
+
+ createMenu( 4061, transfId, -1 );
+ createMenu( 4062, transfId, -1 );
+ createMenu( 4063, transfId, -1 );
+ createMenu( 4068, transfId, -1 );
+ createMenu( 4064, transfId, -1 );
+ createMenu( 4065, transfId, -1 );
+ createMenu( 4066, transfId, -1 );
+ createMenu( 4069, transfId, -1 );
+
+ createMenu( 4067,modifyId, -1 );
+ createMenu( 407, modifyId, -1 );
+ createMenu( 408, modifyId, -1 );
+ createMenu( 409, modifyId, -1 );
+ createMenu( 420, modifyId, -1 );
+ createMenu( 410, modifyId, -1 );
+ createMenu( 411, modifyId, -1 );
+ createMenu( 419, modifyId, -1 );
+ createMenu( 412, modifyId, -1 );
+ createMenu( 413, modifyId, -1 );
+ createMenu( 416, modifyId, -1 );
+ createMenu( 414, modifyId, -1 );
+ createMenu( 415, modifyId, -1 );
+ createMenu( 417, modifyId, -1 );
+ createMenu( 418, modifyId, -1 );
+
+ createMenu( 501, measureId, -1 );
+ createMenu( 502, measureId, -1 );
+ createMenu( 503, basicPropId, -1 );
+ createMenu( 504, basicPropId, -1 );
+ createMenu( 505, basicPropId, -1 );
+ createMenu( 214, viewId, -1 );
+
+ // ----- create toolbars --------------
+ int meshTb = createTool( tr( "TB_MESH" ) ),
+ info = createTool( tr( "TB_INFO" ) ),
+ groupTb = createTool( tr( "TB_GROUP" ) ),
+ ctrl0dTb = createTool( tr( "TB_CTRL0D" ) ),
+ ctrl1dTb = createTool( tr( "TB_CTRL1D" ) ),
+ ctrl2dTb = createTool( tr( "TB_CTRL2D" ) ),
+ ctrl3dTb = createTool( tr( "TB_CTRL3D" ) ),
+ addElemTb = createTool( tr( "TB_ADD" ) ),
+ addNonElemTb = createTool( tr( "TB_ADDNON" ) ),
+ remTb = createTool( tr( "TB_REM" ) ),
+ renumbTb = createTool( tr( "TB_RENUMBER" ) ),
+ transformTb = createTool( tr( "TB_TRANSFORM" ) ),
+ modifyTb = createTool( tr( "TB_MODIFY" ) ),
+ measuremTb = createTool( tr( "TB_MEASUREM" ) ),
+ dispModeTb = createTool( tr( "TB_DISP_MODE" ) );
+
+ createTool( 702, meshTb );
+ createTool( 703, meshTb );
+ createTool( 704, meshTb );
+ createTool( 710, meshTb );
+ createTool( 705, meshTb );
+ createTool( separator(), meshTb );
+ createTool( 701, meshTb );
+ createTool( 711, meshTb );
+ createTool( 712, meshTb );
+ createTool( 713, meshTb );
+
+ createTool( 801, groupTb );
+ createTool( 806, groupTb );
+ createTool( 802, groupTb );
+ createTool( 803, groupTb );
+
+ createTool( 900, info );
+ //createTool( 902, meshTb );
+ //createTool( 903, meshTb ); // VSR: issue #0021242 (eliminate "Mesh Element Information" command)
+ createTool( 904, info );
+
+ createTool( 6005, ctrl0dTb );
+ createTool( 6028, ctrl0dTb );
+
+ createTool( 6002, ctrl1dTb );
+ createTool( 6003, ctrl1dTb );
+ createTool( 6001, ctrl1dTb );
+ createTool( 6004, ctrl1dTb );
+ createTool( 6029, ctrl1dTb );
+
+ createTool( 6021, ctrl2dTb );
+ createTool( 6025, ctrl2dTb );
+ createTool( 6027, ctrl2dTb );
+ createTool( 6018, ctrl2dTb );
+ createTool( 6019, ctrl2dTb );
+ createTool( 6011, ctrl2dTb );
+ createTool( 6012, ctrl2dTb );
+ createTool( 6013, ctrl2dTb );
+ createTool( 6014, ctrl2dTb );
+ createTool( 6015, ctrl2dTb );
+ createTool( 6016, ctrl2dTb );
+ createTool( 6022, ctrl2dTb );
+ createTool( 6030, ctrl2dTb );
+
+ createTool( 6017, ctrl3dTb );
+ createTool( 6009, ctrl3dTb );
+ createTool( 6023, ctrl3dTb );
+ createTool( 6024, ctrl3dTb );
+ createTool( 6026, ctrl3dTb );
+ createTool( 6031, ctrl3dTb );
+
+ createTool( 4000, addElemTb );
+ createTool( 4009, addElemTb );
+ createTool( 4070, addElemTb );
+ createTool( 4008, addElemTb );
+ createTool( 4010, addElemTb );
+ createTool( 4021, addElemTb );
+ createTool( 4022, addElemTb );
+ createTool( 4023, addElemTb );
+ createTool( 4031, addElemTb );
+ createTool( 4032, addElemTb );
+ createTool( 4133, addElemTb );
+ createTool( 4134, addElemTb );
+ createTool( 4135, addElemTb );
+ createTool( 4033, addElemTb );
+
+ createTool( 4034, addNonElemTb );
+ createTool( 4035, addNonElemTb );
+ createTool( 4137, addNonElemTb );
+ createTool( 4036, addNonElemTb );
+ createTool( 4136, addNonElemTb );
+ createTool( 4037, addNonElemTb );
+ createTool( 4038, addNonElemTb );
+ createTool( 4039, addNonElemTb );
+ createTool( 4040, addNonElemTb );
+ createTool( 4140, addNonElemTb );
+
+ createTool( 4041, remTb );
+ createTool( 4042, remTb );
+ createTool( 4044, remTb );
+ createTool( 4043, remTb );
+
+ createTool( 4051, renumbTb );
+ createTool( 4052, renumbTb );
+
+
+ createTool( 4061, transformTb );
+ createTool( 4062, transformTb );
+ createTool( 4063, transformTb );
+ createTool( 4068, transformTb );
+ createTool( 4064, transformTb );
+ createTool( 4065, transformTb );
+ createTool( 4066, transformTb );
+ createTool( 4069, transformTb );
+
+ createTool( 4067,modifyTb );
+ createTool( 407, modifyTb );
+ createTool( 408, modifyTb );
+ createTool( 409, modifyTb );
+ createTool( 420, modifyTb );
+ createTool( 410, modifyTb );
+ createTool( 411, modifyTb );
+ createTool( 419, modifyTb );
+ createTool( 412, modifyTb );
+ createTool( 413, modifyTb );
+ createTool( 416, modifyTb );
+ createTool( 414, modifyTb );
+ createTool( 415, modifyTb );
+ createTool( 417, modifyTb );
+ createTool( 418, modifyTb );
+
+ createTool( 501, measuremTb );
+
+ createTool( 214, dispModeTb );
+
+ QString lc = "$"; // VSR : instead of QtxPopupSelection::defEquality();
+ QString dc = "selcount"; // VSR : instead of QtxPopupSelection::defSelCountParam()
+
+ myRules.clear();
+ QString OB = "'ObjectBrowser'",
+ View = "'" + SVTK_Viewer::Type() + "'",
+ pat = "'%1'",
+ mesh = pat.arg( SMESHGUI_Selection::typeName( SMESH::MESH ) ),
+ group = pat.arg( SMESHGUI_Selection::typeName( SMESH::GROUP ) ),
+ hypo = pat.arg( SMESHGUI_Selection::typeName( SMESH::HYPOTHESIS ) ),
+ algo = pat.arg( SMESHGUI_Selection::typeName( SMESH::ALGORITHM ) ),
+ elems = QString( "'%1' '%2' '%3' '%4' '%5' '%6'" ).
+ arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH_VERTEX ) ).
+ arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH_EDGE ) ).
+ arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH_FACE ) ).
+ arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH_SOLID ) ).
+ arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH_COMPOUND ) ).
+ arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH ) ),
+ subMesh = elems,
+ mesh_part = mesh + " " + subMesh + " " + group,
+ mesh_group = mesh + " " + group,
+ hyp_alg = hypo + " " + algo;
+
+ // popup for object browser
+ QString
+ isInvisible("not( isVisible )"),
+ isEmpty("numberOfNodes = 0"),
+ isNotEmpty("numberOfNodes <> 0"),
+
+ // has nodes, edges, etc in VISIBLE! actor
+ hasNodes("(numberOfNodes > 0 )"),//&& isVisible)"),
+ hasElems("(count( elemTypes ) > 0)"),
+ hasDifferentElems("(count( elemTypes ) > 1)"),
+ hasBalls("({'BallElem'} in elemTypes)"),
+ hasElems0d("({'Elem0d'} in elemTypes)"),
+ hasEdges("({'Edge'} in elemTypes)"),
+ hasFaces("({'Face'} in elemTypes)"),
+ hasVolumes("({'Volume'} in elemTypes)");
+
+ createPopupItem( 150, OB, mesh, "&& selcount=1 && isImported" ); // FILE INFORMATION
+ createPopupItem( 703, OB, mesh, "&& isComputable"); // CREATE_SUBMESH
+ createPopupItem( 704, OB, mesh, "&& isComputable"); // EDIT_MESHSUBMESH
+ createPopupItem( 704, OB, subMesh, "&& isComputable" ); // EDIT_MESHSUBMESH
+ createPopupItem( 803, OB, group ); // EDIT_GROUP
+ createPopupItem( 815, OB, group, "&& groupType != 'Group'" ); // EDIT AS STANDALONE
+
+ popupMgr()->insert( separator(), -1, 0 );
+ createPopupItem( 701, OB, mesh, "&& isComputable" ); // COMPUTE
+ createPopupItem( 711, OB, mesh, "&& isComputable && isPreComputable" ); // PRECOMPUTE
+ createPopupItem( 712, OB, mesh, "&& isComputable" ); // EVALUATE
+ createPopupItem( 713, OB, mesh, "&& isComputable" ); // MESH ORDER
+ createPopupItem( 214, OB, mesh_part ); // UPDATE
+ createPopupItem( 900, OB, mesh_part ); // ADV_INFO
+ createPopupItem( 904, OB, mesh_group ); // FIND_ELEM
+ createPopupItem( 6032, OB, mesh_part ); // CTRL_INFO
+ popupMgr()->insert( separator(), -1, 0 );
+ createPopupItem( 801, OB, mesh ); // CREATE_GROUP
+ createPopupItem( 806, OB, mesh ); // CREATE_GEO_GROUP
+ createPopupItem( 802, OB, subMesh ); // CONSTRUCT_GROUP
+ popupMgr()->insert( separator(), -1, 0 );
+ createPopupItem( 1100, OB, hypo); // EDIT HYPOTHESIS
+ createPopupItem( 1102, OB, hyp_alg ); // REMOVE HYPOTHESIS / ALGORITHMS
+ popupMgr()->insert( separator(), -1, 0 );
+ createPopupItem( 4043, OB, mesh ); // CLEAR_MESH
+ popupMgr()->insert( separator(), -1, 0 );
+ createPopupItem( 417, OB, mesh + " " + subMesh ); // convert to quadratic
+ createPopupItem( 418, OB, mesh + " " + group, // create 2D mesh from 3D
+ "&& dim>=2");
+ popupMgr()->insert( separator(), -1, 0 );
+
+ QString only_one_non_empty = QString( " && %1=1 && numberOfNodes>0" ).arg( dc );
+ QString multiple_non_empty = QString( " && %1>0 && numberOfNodes>0" ).arg( dc );
+ QString only_one_2D = only_one_non_empty + " && dim>1";
+
+ int anId = popupMgr()->insert( tr( "MEN_EXPORT" ), -1, -1 ); // EXPORT submenu
+ createPopupItem( 125, OB, mesh_group, multiple_non_empty, anId ); // EXPORT_MED
+ createPopupItem( 126, OB, mesh_group, only_one_non_empty, anId ); // EXPORT_UNV
+ createPopupItem( 141, OB, mesh_group, only_one_2D, anId ); // EXPORT_STL
+#ifdef WITH_CGNS
+ createPopupItem( 143, OB, mesh_group, multiple_non_empty, anId ); // EXPORT_CGNS
+#endif
+ createPopupItem( 145, OB, mesh_group, multiple_non_empty, anId ); // EXPORT_SAUV
+ createPopupItem( 147, OB, mesh_group, multiple_non_empty, anId ); // EXPORT_GMF
+ createPopupItem( 124, OB, mesh_group, multiple_non_empty, anId ); // EXPORT_DAT
+ createPopupItem( 33, OB, mesh_part + " " + hyp_alg ); // DELETE
+ createPopupItem( 813, OB, group ); // DEL_GROUP with contents
+ popupMgr()->insert( separator(), -1, 0 );