]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
0020624: EDF 1155 GEOM : Ergonomics of the "Creation Group" dialog box
authordmv <dmv@opencascade.com>
Tue, 2 Feb 2010 11:01:19 +0000 (11:01 +0000)
committerdmv <dmv@opencascade.com>
Tue, 2 Feb 2010 11:01:19 +0000 (11:01 +0000)
doc/salome/gui/GEOM/images/editgroup.png
doc/salome/gui/GEOM/images/geomcreategroup.png
doc/salome/gui/GEOM/input/working_with_groups.doc
src/GroupGUI/GroupGUI_GroupDlg.cxx

index 25a55f8a75de91e798cc31e9004feb68f840aae0..935fabeac80ad4201510f9c22f61d0e5450e47b7 100755 (executable)
Binary files a/doc/salome/gui/GEOM/images/editgroup.png and b/doc/salome/gui/GEOM/images/editgroup.png differ
index 8e0706a40ec21f7d5037a89a9d70c804c94bf261..b74b00dfbb48dbfb206df831565e7cc3ed66421b 100755 (executable)
Binary files a/doc/salome/gui/GEOM/images/geomcreategroup.png and b/doc/salome/gui/GEOM/images/geomcreategroup.png differ
index a2e7d5360ee9db4880100c1d1c0ea6df52926ea7..7c671fe6411dc656ff6b7c61ad150956e8fe0c2c 100644 (file)
@@ -39,6 +39,12 @@ sometimes purely geometrical coincidence is not enough and it
 is necessary to work with shapes, which actually belong both 
 to the main and the second shape.</li>
 </ul>
+<li>You can selectively display the selected elements using the following buttons:</li>
+<ul>
+<li><b>Show only selected</b> - displays only the subshapes selected in the list box.</li>
+<li><b>Hide selected</b> - hides the subshapes selected in the list box.</li>
+<li><b>Show all sub-shapes</b> - displays only the subshapes of the Main Shape.</li>
+</ul>
 <li> You can select the elements of your group in two ways:
 <ul>
 <li>You can select them manually in the 3D Viewer, and add to the
index d49e014a760c88cb414efa93669e8be539c0eb90..2586fee8463a148487077a4b05b5c58f082d4c8b 100644 (file)
@@ -111,30 +111,33 @@ GroupGUI_GroupDlg::GroupGUI_GroupDlg (Mode mode, GeometryGUI* theGeometryGUI, QW
   myMainName->setReadOnly(true);
   myMainName->setEnabled(myMode == CreateGroup);
 
-  QLabel* aSecondLabel = new QLabel(tr("SECOND_SHAPE"), GroupMedium);
+  myRestrictGroupBox = new QGroupBox(tr("SHAPE_SEL_RESTR"), GroupMedium);
+  myRestrictGroup = new QButtonGroup(myRestrictGroupBox);
+  QRadioButton* allSubs     = new QRadioButton(tr("NO_RESTR")            , myRestrictGroupBox);
+  QRadioButton* inPlaceSubs = new QRadioButton(tr("GEOM_PARTS_OF_SHAPE2"), myRestrictGroupBox);
+  QRadioButton* shape2Subs  = new QRadioButton(tr("SUBSHAPES_OF_SHAPE2") , myRestrictGroupBox);
+  QGridLayout* aRestrictLayout = new QGridLayout(myRestrictGroupBox);
 
-  mySelBtn2 = new QPushButton(GroupMedium);
+  QLabel* aSecondLabel = new QLabel(tr("SECOND_SHAPE"), myRestrictGroupBox);
+  mySelBtn2 = new QPushButton(myRestrictGroupBox);
   mySelBtn2->setIcon(iconSelect);
   mySelBtn2->setEnabled(false);
-
-  myShape2Name = new QLineEdit(GroupMedium);
+  myShape2Name = new QLineEdit(myRestrictGroupBox);
   myShape2Name->setReadOnly(true);
   myShape2Name->setEnabled(false);
 
-  myRestrictGroupBox = new QGroupBox(tr("SHAPE_SEL_RESTR"), GroupMedium);
-  myRestrictGroup = new QButtonGroup(myRestrictGroupBox);
-  QRadioButton* allSubs     = new QRadioButton(tr("NO_RESTR")            , myRestrictGroupBox);
-  QRadioButton* inPlaceSubs = new QRadioButton(tr("GEOM_PARTS_OF_SHAPE2"), myRestrictGroupBox);
-  QRadioButton* shape2Subs  = new QRadioButton(tr("SUBSHAPES_OF_SHAPE2") , myRestrictGroupBox);
-  QVBoxLayout* aRestrictLayout = new QVBoxLayout(myRestrictGroupBox);
   aRestrictLayout->setMargin(9);
   aRestrictLayout->setSpacing(6);
-  aRestrictLayout->addWidget(allSubs);
-  aRestrictLayout->addWidget(inPlaceSubs);
-  aRestrictLayout->addWidget(shape2Subs);
-  myRestrictGroup->addButton(allSubs,     ALL_SUBSHAPES);
-  myRestrictGroup->addButton(inPlaceSubs, GET_IN_PLACE);
-  myRestrictGroup->addButton(shape2Subs,  SUBSHAPES_OF_SHAPE2);
+  aRestrictLayout->addWidget(allSubs,      0, 0, 1, 3);
+  aRestrictLayout->addWidget(inPlaceSubs,  1, 0, 1, 3);
+  aRestrictLayout->addWidget(shape2Subs,   2, 0, 1, 3);
+  aRestrictLayout->addWidget(aSecondLabel, 3, 0);
+  aRestrictLayout->addWidget(mySelBtn2,    3, 1);
+  aRestrictLayout->addWidget(myShape2Name, 3, 2);
+  myRestrictGroup->addButton(allSubs,      ALL_SUBSHAPES);
+  myRestrictGroup->addButton(inPlaceSubs,  GET_IN_PLACE);
+  myRestrictGroup->addButton(shape2Subs,   SUBSHAPES_OF_SHAPE2);
+  myRestrictGroupBox->setEnabled(!CORBA::is_nil(myMainObj));
   allSubs->setChecked(true);
 
   myShowOnlyBtn = new QPushButton(tr("Show only selected"), GroupMedium);
@@ -154,21 +157,20 @@ GroupGUI_GroupDlg::GroupGUI_GroupDlg (Mode mode, GeometryGUI* theGeometryGUI, QW
   aMedLayout->addWidget(aMainLabel,         0, 0);
   aMedLayout->addWidget(mySelBtn,           0, 1);
   aMedLayout->addWidget(myMainName,         0, 2, 1, 2);
-  aMedLayout->addWidget(aSecondLabel,       1, 0);
-  aMedLayout->addWidget(mySelBtn2,          1, 1);
-  aMedLayout->addWidget(myShape2Name,       1, 2, 1, 2);
-  aMedLayout->addWidget(myRestrictGroupBox, 2, 0, 3, 3);
+  aMedLayout->addWidget(myRestrictGroupBox, 1, 0, 4, 3);
 
-  aMedLayout->addWidget(myShowOnlyBtn,      2, 3);
-  aMedLayout->addWidget(myHideSelBtn,       3, 3);
-  aMedLayout->addWidget(myShowAllBtn,       4, 3);
+  aMedLayout->addWidget(myShowOnlyBtn,      1, 3);
+  aMedLayout->addWidget(myHideSelBtn,       2, 3);
+  aMedLayout->addWidget(myShowAllBtn,       3, 3);
 
+  aMedLayout->addWidget(myIdList,           5, 0, 4, 3);
   aMedLayout->addWidget(mySelAllBtn,        5, 3);
   aMedLayout->addWidget(myAddBtn,           6, 3);
   aMedLayout->addWidget(myRemBtn,           7, 3);
 
-  aMedLayout->addWidget(myIdList,           5, 0, 3, 3);
-  aMedLayout->setRowStretch(5, 1);
+  aMedLayout->setColumnStretch( 2, 5 );
+  aMedLayout->setRowStretch(5, 5);
+  aMedLayout->setRowStretch(8, 5);
 
   QVBoxLayout* layout = new QVBoxLayout(centralWidget());
   layout->setMargin(0); layout->setSpacing(6);