Mantis issue 0021689: [CEA 571] Improve visualization of selected object in GEOM

This commit is contained in:
jfa 2012-10-02 07:26:48 +00:00
parent 9ef623eade
commit 722fbca6f9
12 changed files with 151 additions and 52 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 35 KiB

View File

@ -74,18 +74,23 @@ on the viewer background:
<li><b>Select Only</b> provides a filter for exclusive selection of objects of a certain type.</li> <li><b>Select Only</b> provides a filter for exclusive selection of objects of a certain type.</li>
</ul> </ul>
The the following commands appear in the Object Browser context menu The following commands appear in the Object Browser context menu
under certain conditions: under certain conditions:
\image html ob_popup_menu.png <br> \image html ob_popup_menu.png <br>
<ul> <ul>
<li>\ref work_with_groups_page "Create Group" - allows creating groups of geometrical objects.</li> <li>\ref work_with_groups_page "Create Group" - allows creating groups of geometrical objects.</li>
<li><b>Hide Children</b> / <b>Show Children</b> - hides / shows child
<li><b>Conceal child items</b> / <b>Disclose child items</b> - hides / shows child
sub-objects in the Object Browser, if the selected geometric object has sub-objects in the Object Browser, if the selected geometric object has
child objects. When some child objects are hidden, the name of the child objects. When some child objects are hidden, the name of the
parent object is hilghlighted with bold font.</li> parent object is hilghlighted with bold font.</li>
<li><b>Show Only Children</b> - erase in current viewer all objects
and then display only children of the selected object(s).
</li>
<li><b>Unpublish</b> - unpublish the selected geometric object from the Object Browser <li><b>Unpublish</b> - unpublish the selected geometric object from the Object Browser
and erase it from all viewers. To publish unpublished geometric objects select in the and erase it from all viewers. To publish unpublished geometric objects select in the
context menu of the <b>Geometry</b> root object <b>Publish...</b> item. context menu of the <b>Geometry</b> root object <b>Publish...</b> item.

View File

@ -18,12 +18,11 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// GEOM GEOMGUI : GUI for Geometry component // GEOM GEOMGUI : GUI for Geometry component
// File : DisplayGUI.cxx // File : DisplayGUI.cxx
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) // Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
//
#include "DisplayGUI.h" #include "DisplayGUI.h"
#include <GeometryGUI.h> #include <GeometryGUI.h>
#include "GeometryGUI_Operations.h" #include "GeometryGUI_Operations.h"
@ -110,6 +109,10 @@ bool DisplayGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
getGeometryGUI()->EmitSignalDeactivateDialog(); getGeometryGUI()->EmitSignalDeactivateDialog();
DisplayOnly(); DisplayOnly();
break; break;
case GEOMOp::OpShowOnlyChildren: // POPUP MENU - SHOW ONLY CHILDREN
getGeometryGUI()->EmitSignalDeactivateDialog();
DisplayOnlyChildren();
break;
case GEOMOp::OpHideAll: // MENU VIEW - HIDE ALL case GEOMOp::OpHideAll: // MENU VIEW - HIDE ALL
EraseAll(); EraseAll();
break; break;
@ -217,6 +220,62 @@ void DisplayGUI::DisplayOnly()
Display(); Display();
} }
//=====================================================================================
// function : DisplayGUI::DisplayOnlyChildren()
// purpose : Display only children of selected GEOM objects and erase other
//=====================================================================================
void DisplayGUI::DisplayOnlyChildren()
{
EraseAll();
SALOME_ListIO listIO;
SalomeApp_Application* app = getGeometryGUI()->getApp();
if (!app) return;
SalomeApp_Study* anActiveStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
if (!anActiveStudy) return;
LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
if (!aSelMgr) return;
// get selection
SALOME_ListIO aList;
//aSelMgr->selectedObjects(aList);
aSelMgr->selectedObjects(aList, "ObjectBrowser", false);
SALOME_ListIteratorOfListIO It (aList);
SUIT_OverrideCursor();
for (; It.More(); It.Next()) {
Handle(SALOME_InteractiveObject) anIObject = It.Value();
if (anIObject->hasEntry()) {
_PTR(SObject) SO (anActiveStudy->studyDS()->FindObjectID(anIObject->getEntry()));
if (SO) {
_PTR(SComponent) SC (SO->GetFatherComponent());
if (QString(SO->GetID().c_str()) == QString(SO->GetFatherComponent()->GetID().c_str())) {
// if component is selected, pass it
}
else {
_PTR(ChildIterator) anIter (anActiveStudy->studyDS()->NewChildIterator(SO));
anIter->InitEx(true);
while (anIter->More()) {
_PTR(SObject) valSO (anIter->Value());
_PTR(SObject) refSO;
if (!valSO->ReferencedObject(refSO)) {
listIO.Append(new SALOME_InteractiveObject(valSO->GetID().c_str(),
SC->ComponentDataType().c_str(),
valSO->GetName().c_str()));
}
anIter->Next();
}
}
}
}
}
GEOM_Displayer(anActiveStudy).Display(listIO, true);
}
//===================================================================================== //=====================================================================================
// function : DisplayGUI::Display() // function : DisplayGUI::Display()
// purpose : Display selected GEOM objects // purpose : Display selected GEOM objects

View File

@ -18,12 +18,11 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// GEOM GEOMGUI : GUI for Geometry component // GEOM GEOMGUI : GUI for Geometry component
// File : DisplayGUI.h // File : DisplayGUI.h
// Author : Damien COQUERET, Open CASCADE S.A.S. // Author : Damien COQUERET, Open CASCADE S.A.S.
//
#ifndef DISPLAYGUI_H #ifndef DISPLAYGUI_H
#define DISPLAYGUI_H #define DISPLAYGUI_H
@ -53,6 +52,8 @@ public:
void Display(); void Display();
// Display selected GEOM objects and erase other // Display selected GEOM objects and erase other
void DisplayOnly(); void DisplayOnly();
// Display only children of selected GEOM objects and erase other
void DisplayOnlyChildren();
// Erase selected GEOM objects // Erase selected GEOM objects
void Erase(); void Erase();

View File

@ -18,11 +18,10 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File : GEOMGUI_Selection.cxx // File : GEOMGUI_Selection.cxx
// Author : Alexander SOLOVYOV, Open CASCADE S.A.S. (alexander.solovyov@opencascade.com) // Author : Alexander SOLOVYOV, Open CASCADE S.A.S. (alexander.solovyov@opencascade.com)
//
#include "GEOMGUI_Selection.h" #include "GEOMGUI_Selection.h"
#include "GeometryGUI.h" #include "GeometryGUI.h"
@ -159,10 +158,12 @@ QVariant GEOMGUI_Selection::parameter( const int idx, const QString& p ) const
v = isVectorsMode( idx ); v = isVectorsMode( idx );
else if ( p == "topLevel" ) else if ( p == "topLevel" )
v = topLevel( idx ); v = topLevel( idx );
else if ( p == "hasHiddenChildren" ) else if ( p == "hasChildren" )
v = hasHiddenChildren( idx ); v = hasChildren( idx );
else if ( p == "hasShownChildren" ) else if ( p == "hasConcealedChildren" )
v = hasShownChildren( idx ); v = hasConcealedChildren( idx );
else if ( p == "hasDisclosedChildren" )
v = hasDisclosedChildren( idx );
else if ( p == "compoundOfVertices" ) else if ( p == "compoundOfVertices" )
v = compoundOfVertices( idx ); v = compoundOfVertices( idx );
else if ( p == "imported" ) else if ( p == "imported" )
@ -446,7 +447,23 @@ bool GEOMGUI_Selection::isCompoundOfVertices( GEOM::GEOM_Object_ptr obj )
return ret; return ret;
} }
bool GEOMGUI_Selection::hasHiddenChildren( const int index ) const bool GEOMGUI_Selection::hasChildren( const int index ) const
{
bool ok = false;
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( study() );
if ( appStudy ) {
QString anEntry = entry( index );
_PTR(Study) study = appStudy->studyDS();
if ( study && !anEntry.isEmpty() ) {
_PTR(SObject) aSO( study->FindObjectID( anEntry.toStdString() ) );
ok = hasChildren( aSO );
}
}
return ok;
}
bool GEOMGUI_Selection::hasConcealedChildren( const int index ) const
{ {
bool OK = false; bool OK = false;
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( study() ); SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( study() );
@ -462,7 +479,7 @@ bool GEOMGUI_Selection::hasHiddenChildren( const int index ) const
return OK; return OK;
} }
bool GEOMGUI_Selection::hasShownChildren( const int index ) const bool GEOMGUI_Selection::hasDisclosedChildren( const int index ) const
{ {
bool OK = false; bool OK = false;
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( study() ); SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( study() );

View File

@ -18,11 +18,10 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File : GEOMGUI_Selection.h // File : GEOMGUI_Selection.h
// Author : Alexander SOLOVYOV, Open CASCADE S.A.S. (alexander.solovyov@opencascade.com) // Author : Alexander SOLOVYOV, Open CASCADE S.A.S. (alexander.solovyov@opencascade.com)
//
#ifndef GEOMGUI_SELECTION_H #ifndef GEOMGUI_SELECTION_H
#define GEOMGUI_SELECTION_H #define GEOMGUI_SELECTION_H
@ -66,8 +65,9 @@ private:
QString displayMode( const int ) const; QString displayMode( const int ) const;
QString selectionMode() const; QString selectionMode() const;
bool isVectorsMode( const int ) const; bool isVectorsMode( const int ) const;
bool hasHiddenChildren( const int ) const; bool hasChildren( const int ) const;
bool hasShownChildren( const int ) const; bool hasConcealedChildren( const int ) const;
bool hasDisclosedChildren( const int ) const;
bool compoundOfVertices( const int ) const; bool compoundOfVertices( const int ) const;
bool topLevel( const int ) const; bool topLevel( const int ) const;
bool isPhysicalMaterial( const int ) const; bool isPhysicalMaterial( const int ) const;

View File

@ -2446,6 +2446,10 @@ Please, select face, shell or solid and try again</translation>
<source>MEN_DISPLAY_ONLY</source> <source>MEN_DISPLAY_ONLY</source>
<translation>Show Only</translation> <translation>Show Only</translation>
</message> </message>
<message>
<source>MEN_SHOW_ONLY_CHILDREN</source>
<translation>Show Only Children</translation>
</message>
<message> <message>
<source>MEN_BRING_TO_FRONT</source> <source>MEN_BRING_TO_FRONT</source>
<translation>Bring To Front</translation> <translation>Bring To Front</translation>
@ -2703,12 +2707,12 @@ Please, select face, shell or solid and try again</translation>
<translation>Create Group</translation> <translation>Create Group</translation>
</message> </message>
<message> <message>
<source>MEN_POP_SHOW_CHILDREN</source> <source>MEN_POP_DISCLOSE_CHILDREN</source>
<translation>Show Children</translation> <translation>Disclose child items</translation>
</message> </message>
<message> <message>
<source>MEN_POP_HIDE_CHILDREN</source> <source>MEN_POP_CONCEAL_CHILDREN</source>
<translation>Hide Children</translation> <translation>Conceal child items</translation>
</message> </message>
<message> <message>
<source>MEN_POP_UNPUBLISH_OBJ</source> <source>MEN_POP_UNPUBLISH_OBJ</source>
@ -3274,6 +3278,10 @@ Please, select face, shell or solid and try again</translation>
<source>STB_DISPLAY_ONLY</source> <source>STB_DISPLAY_ONLY</source>
<translation>Show only</translation> <translation>Show only</translation>
</message> </message>
<message>
<source>STB_SHOW_ONLY_CHILDREN</source>
<translation>Show Only Children</translation>
</message>
<message> <message>
<source>STB_EDGE</source> <source>STB_EDGE</source>
<translation>Build an edge</translation> <translation>Build an edge</translation>
@ -3478,10 +3486,6 @@ Please, select face, shell or solid and try again</translation>
<source>STB_POP_CREATE_GROUP</source> <source>STB_POP_CREATE_GROUP</source>
<translation>Create Group</translation> <translation>Create Group</translation>
</message> </message>
<message>
<source>STB_POP_SHOW_CHILDREN</source>
<translation>Show child objects</translation>
</message>
<message> <message>
<source>STB_POP_UNPUBLISH_OBJ</source> <source>STB_POP_UNPUBLISH_OBJ</source>
<translation>Unpublish object</translation> <translation>Unpublish object</translation>
@ -3491,8 +3495,12 @@ Please, select face, shell or solid and try again</translation>
<translation>Publish object</translation> <translation>Publish object</translation>
</message> </message>
<message> <message>
<source>STB_POP_HIDE_CHILDREN</source> <source>STB_POP_DISCLOSE_CHILDREN</source>
<translation>Hide child objects</translation> <translation>Disclose child items</translation>
</message>
<message>
<source>STB_POP_CONCEAL_CHILDREN</source>
<translation>Conceal child items</translation>
</message> </message>
<message> <message>
<source>STB_POP_ISOS</source> <source>STB_POP_ISOS</source>
@ -3894,6 +3902,10 @@ Please, select face, shell or solid and try again</translation>
<source>TOP_DISPLAY_ONLY</source> <source>TOP_DISPLAY_ONLY</source>
<translation>Show only</translation> <translation>Show only</translation>
</message> </message>
<message>
<source>TOP_SHOW_ONLY_CHILDREN</source>
<translation>Show Only Children</translation>
</message>
<message> <message>
<source>TOP_EDGE</source> <source>TOP_EDGE</source>
<translation>Build edge</translation> <translation>Build edge</translation>
@ -4094,10 +4106,6 @@ Please, select face, shell or solid and try again</translation>
<source>TOP_POP_CREATE_GROUP</source> <source>TOP_POP_CREATE_GROUP</source>
<translation>Create Group</translation> <translation>Create Group</translation>
</message> </message>
<message>
<source>TOP_POP_SHOW_CHILDREN</source>
<translation>Show Children</translation>
</message>
<message> <message>
<source>TOP_POP_UNPUBLISH_OBJ</source> <source>TOP_POP_UNPUBLISH_OBJ</source>
<translation>Unpublish object</translation> <translation>Unpublish object</translation>
@ -4107,8 +4115,12 @@ Please, select face, shell or solid and try again</translation>
<translation>Publish object</translation> <translation>Publish object</translation>
</message> </message>
<message> <message>
<source>TOP_POP_HIDE_CHILDREN</source> <source>TOP_POP_DISCLOSE_CHILDREN</source>
<translation>Hide Children</translation> <translation>Disclose child items</translation>
</message>
<message>
<source>TOP_POP_CONCEAL_CHILDREN</source>
<translation>Conceal child items</translation>
</message> </message>
<message> <message>
<source>TOP_POP_ISOS</source> <source>TOP_POP_ISOS</source>

View File

@ -376,8 +376,9 @@ void GeometryGUI::OnGUIEvent( int id )
NotViewerDependentCommands << GEOMOp::OpDelete NotViewerDependentCommands << GEOMOp::OpDelete
<< GEOMOp::OpShow << GEOMOp::OpShow
<< GEOMOp::OpShowOnly << GEOMOp::OpShowOnly
<< GEOMOp::OpShowChildren << GEOMOp::OpShowOnlyChildren
<< GEOMOp::OpHideChildren << GEOMOp::OpDiscloseChildren
<< GEOMOp::OpConcealChildren
<< GEOMOp::OpUnpublishObject << GEOMOp::OpUnpublishObject
<< GEOMOp::OpPublishObject << GEOMOp::OpPublishObject
<< GEOMOp::OpPointMarker; << GEOMOp::OpPointMarker;
@ -419,8 +420,8 @@ void GeometryGUI::OnGUIEvent( int id )
case GEOMOp::OpDecrNbIsos: // SHORTCUT - DECREASE NB ISOS case GEOMOp::OpDecrNbIsos: // SHORTCUT - DECREASE NB ISOS
case GEOMOp::OpAutoColor: // POPUP MENU - AUTO COLOR case GEOMOp::OpAutoColor: // POPUP MENU - AUTO COLOR
case GEOMOp::OpNoAutoColor: // POPUP MENU - DISABLE AUTO COLOR case GEOMOp::OpNoAutoColor: // POPUP MENU - DISABLE AUTO COLOR
case GEOMOp::OpShowChildren: // POPUP MENU - SHOW CHILDREN case GEOMOp::OpDiscloseChildren: // POPUP MENU - DISCLOSE CHILD ITEMS
case GEOMOp::OpHideChildren: // POPUP MENU - HIDE CHILDREN case GEOMOp::OpConcealChildren: // POPUP MENU - CONCEAL CHILD ITEMS
case GEOMOp::OpUnpublishObject: // POPUP MENU - UNPUBLISH case GEOMOp::OpUnpublishObject: // POPUP MENU - UNPUBLISH
case GEOMOp::OpPublishObject: // ROOT GEOM OBJECT - POPUP MENU - PUBLISH case GEOMOp::OpPublishObject: // ROOT GEOM OBJECT - POPUP MENU - PUBLISH
case GEOMOp::OpPointMarker: // POPUP MENU - POINT MARKER case GEOMOp::OpPointMarker: // POPUP MENU - POINT MARKER
@ -436,6 +437,7 @@ void GeometryGUI::OnGUIEvent( int id )
case GEOMOp::OpDMShadingWithEdges: // MENU VIEW - SHADING case GEOMOp::OpDMShadingWithEdges: // MENU VIEW - SHADING
case GEOMOp::OpShowAll: // MENU VIEW - SHOW ALL case GEOMOp::OpShowAll: // MENU VIEW - SHOW ALL
case GEOMOp::OpShowOnly: // MENU VIEW - DISPLAY ONLY case GEOMOp::OpShowOnly: // MENU VIEW - DISPLAY ONLY
case GEOMOp::OpShowOnlyChildren: // MENU VIEW - SHOW ONLY CHILDREN
case GEOMOp::OpHideAll: // MENU VIEW - ERASE ALL case GEOMOp::OpHideAll: // MENU VIEW - ERASE ALL
case GEOMOp::OpHide: // MENU VIEW - ERASE case GEOMOp::OpHide: // MENU VIEW - ERASE
case GEOMOp::OpShow: // MENU VIEW - DISPLAY case GEOMOp::OpShow: // MENU VIEW - DISPLAY
@ -859,6 +861,7 @@ void GeometryGUI::initialize( CAM_Application* app )
createGeomAction( GEOMOp::OpSelectCompound, "COMPOUND_SEL_ONLY", "", 0, true ); createGeomAction( GEOMOp::OpSelectCompound, "COMPOUND_SEL_ONLY", "", 0, true );
createGeomAction( GEOMOp::OpSelectAll, "ALL_SEL_ONLY", "", 0, true ); createGeomAction( GEOMOp::OpSelectAll, "ALL_SEL_ONLY", "", 0, true );
createGeomAction( GEOMOp::OpShowOnly, "DISPLAY_ONLY" ); createGeomAction( GEOMOp::OpShowOnly, "DISPLAY_ONLY" );
createGeomAction( GEOMOp::OpShowOnlyChildren, "SHOW_ONLY_CHILDREN" );
createGeomAction( GEOMOp::OpBringToFront, "BRING_TO_FRONT", "", 0, true ); createGeomAction( GEOMOp::OpBringToFront, "BRING_TO_FRONT", "", 0, true );
createGeomAction( GEOMOp::OpClsBringToFront, "CLS_BRING_TO_FRONT" ); createGeomAction( GEOMOp::OpClsBringToFront, "CLS_BRING_TO_FRONT" );
createGeomAction( GEOMOp::OpHide, "ERASE" ); createGeomAction( GEOMOp::OpHide, "ERASE" );
@ -878,8 +881,8 @@ void GeometryGUI::initialize( CAM_Application* app )
createGeomAction( GEOMOp::OpAutoColor, "POP_AUTO_COLOR" ); createGeomAction( GEOMOp::OpAutoColor, "POP_AUTO_COLOR" );
createGeomAction( GEOMOp::OpNoAutoColor, "POP_DISABLE_AUTO_COLOR" ); createGeomAction( GEOMOp::OpNoAutoColor, "POP_DISABLE_AUTO_COLOR" );
createGeomAction( GEOMOp::OpGroupCreatePopup, "POP_CREATE_GROUP" ); createGeomAction( GEOMOp::OpGroupCreatePopup, "POP_CREATE_GROUP" );
createGeomAction( GEOMOp::OpShowChildren, "POP_SHOW_CHILDREN" ); createGeomAction( GEOMOp::OpDiscloseChildren, "POP_DISCLOSE_CHILDREN" );
createGeomAction( GEOMOp::OpHideChildren, "POP_HIDE_CHILDREN" ); createGeomAction( GEOMOp::OpConcealChildren, "POP_CONCEAL_CHILDREN" );
createGeomAction( GEOMOp::OpUnpublishObject, "POP_UNPUBLISH_OBJ" ); createGeomAction( GEOMOp::OpUnpublishObject, "POP_UNPUBLISH_OBJ" );
createGeomAction( GEOMOp::OpPublishObject, "POP_PUBLISH_OBJ" ); createGeomAction( GEOMOp::OpPublishObject, "POP_PUBLISH_OBJ" );
createGeomAction( GEOMOp::OpPointMarker, "POP_POINT_MARKER" ); createGeomAction( GEOMOp::OpPointMarker, "POP_POINT_MARKER" );
@ -1242,11 +1245,11 @@ void GeometryGUI::initialize( CAM_Application* app )
mgr->setRule( action( GEOMOp::OpDelete ), QString("$type in {'Shape' 'Group'} and selcount>0"), QtxPopupMgr::VisibleRule ); mgr->setRule( action( GEOMOp::OpDelete ), QString("$type in {'Shape' 'Group'} and selcount>0"), QtxPopupMgr::VisibleRule );
mgr->insert( action( GEOMOp::OpGroupCreatePopup ), -1, -1 ); // create group mgr->insert( action( GEOMOp::OpGroupCreatePopup ), -1, -1 ); // create group
mgr->setRule( action( GEOMOp::OpGroupCreatePopup ), QString("client='ObjectBrowser' and type='Shape' and selcount=1 and isOCC=true"), QtxPopupMgr::VisibleRule ); mgr->setRule( action( GEOMOp::OpGroupCreatePopup ), QString("client='ObjectBrowser' and type='Shape' and selcount=1 and isOCC=true"), QtxPopupMgr::VisibleRule );
mgr->insert( action( GEOMOp::OpShowChildren ), -1, -1 ); // show children mgr->insert( action( GEOMOp::OpDiscloseChildren ), -1, -1 ); // disclose child items
mgr->setRule( action( GEOMOp::OpShowChildren ), QString("client='ObjectBrowser' and type='Shape' and selcount=1 and hasHiddenChildren=true"), QtxPopupMgr::VisibleRule ); mgr->setRule( action( GEOMOp::OpDiscloseChildren ), QString("client='ObjectBrowser' and type='Shape' and selcount=1 and hasConcealedChildren=true"), QtxPopupMgr::VisibleRule );
mgr->insert( action( GEOMOp::OpHideChildren ), -1, -1 ); // hide children mgr->insert( action( GEOMOp::OpConcealChildren ), -1, -1 ); // conceal shild items
mgr->setRule( action( GEOMOp::OpHideChildren ), QString("client='ObjectBrowser' and type='Shape' and selcount=1 and hasShownChildren=true"), QtxPopupMgr::VisibleRule ); mgr->setRule( action( GEOMOp::OpConcealChildren ), QString("client='ObjectBrowser' and type='Shape' and selcount=1 and hasDisclosedChildren=true"), QtxPopupMgr::VisibleRule );
mgr->insert( action( GEOMOp::OpGroupEdit ), -1, -1 ); // edit group mgr->insert( action( GEOMOp::OpGroupEdit ), -1, -1 ); // edit group
mgr->setRule( action( GEOMOp::OpGroupEdit ), QString("client='ObjectBrowser' and type='Group' and selcount=1 and isOCC=true"), QtxPopupMgr::VisibleRule ); mgr->setRule( action( GEOMOp::OpGroupEdit ), QString("client='ObjectBrowser' and type='Group' and selcount=1 and isOCC=true"), QtxPopupMgr::VisibleRule );
mgr->insert( separator(), -1, -1 ); // ----------- mgr->insert( separator(), -1, -1 ); // -----------
@ -1353,6 +1356,8 @@ void GeometryGUI::initialize( CAM_Application* app )
mgr->setRule(action(GEOMOp::OpSelectAll), selectOnly + " and selectionmode='ALL'", QtxPopupMgr::ToggleRule); mgr->setRule(action(GEOMOp::OpSelectAll), selectOnly + " and selectionmode='ALL'", QtxPopupMgr::ToggleRule);
mgr->insert( action(GEOMOp::OpShowOnly ), -1, -1 ); // display only mgr->insert( action(GEOMOp::OpShowOnly ), -1, -1 ); // display only
mgr->setRule(action(GEOMOp::OpShowOnly ), rule.arg( types ).arg( "true" ), QtxPopupMgr::VisibleRule ); mgr->setRule(action(GEOMOp::OpShowOnly ), rule.arg( types ).arg( "true" ), QtxPopupMgr::VisibleRule );
mgr->insert( action(GEOMOp::OpShowOnlyChildren ), -1, -1 ); // display only children
mgr->setRule(action(GEOMOp::OpShowOnlyChildren ), (canDisplay + "and ($type in {%1}) and client='ObjectBrowser' and hasChildren=true").arg( types ), QtxPopupMgr::VisibleRule );
mgr->insert( separator(), -1, -1 ); // ----------- mgr->insert( separator(), -1, -1 ); // -----------
mgr->insert( action( GEOMOp::OpUnpublishObject ), -1, -1 ); // Unpublish object mgr->insert( action( GEOMOp::OpUnpublishObject ), -1, -1 ); // Unpublish object

View File

@ -50,13 +50,12 @@ namespace GEOMOp {
OpPointMarker = 1210, // POPUP MENU - POINT MARKER OpPointMarker = 1210, // POPUP MENU - POINT MARKER
OpSetTexture = 1211, // POPUP MENU - SETTEXTURE OpSetTexture = 1211, // POPUP MENU - SETTEXTURE
OpMaterialProperties = 1212, // POPUP MENU - MATERIAL PROPERTIES OpMaterialProperties = 1212, // POPUP MENU - MATERIAL PROPERTIES
OpShowChildren = 1250, // POPUP MENU - SHOW CHILDREN OpDiscloseChildren = 1250, // POPUP MENU - DISCLOSE CHILD ITEMS
OpHideChildren = 1251, // POPUP MENU - HIDE CHILDREN OpConcealChildren = 1251, // POPUP MENU - CONCEAL CHILD ITEMS
OpUnpublishObject = 1253, // POPUP MENU - UNPUBLISH OpUnpublishObject = 1253, // POPUP MENU - UNPUBLISH
OpPublishObject = 1254, // GEOM ROOT OBJECT - POPUP MENU - PUBLISH OpPublishObject = 1254, // GEOM ROOT OBJECT - POPUP MENU - PUBLISH
OpEdgeWidth = 1260, // POPUP MENU - LINE WIDTH - EDGE WIDTH OpEdgeWidth = 1260, // POPUP MENU - LINE WIDTH - EDGE WIDTH
OpIsosWidth = 1261, // POPUP MENU - LINE WIDTH - ISOS WIDTH OpIsosWidth = 1261, // POPUP MENU - LINE WIDTH - ISOS WIDTH
// DisplayGUI ------------------//-------------------------------- // DisplayGUI ------------------//--------------------------------
OpSwitchVectors = 2001, // MENU VIEW - DISPLAY MODE - SHOW/HIDE EDGE DIRECTION OpSwitchVectors = 2001, // MENU VIEW - DISPLAY MODE - SHOW/HIDE EDGE DIRECTION
OpShowAll = 2002, // MENU VIEW - SHOW ALL OpShowAll = 2002, // MENU VIEW - SHOW ALL
@ -67,6 +66,7 @@ namespace GEOMOp {
OpShow = 2100, // POPUP MENU - SHOW OpShow = 2100, // POPUP MENU - SHOW
OpShowOnly = 2101, // POPUP MENU - SHOW ONLY OpShowOnly = 2101, // POPUP MENU - SHOW ONLY
OpHide = 2102, // POPUP MENU - HIDE OpHide = 2102, // POPUP MENU - HIDE
OpShowOnlyChildren = 2103, // POPUP MENU - SHOW ONLY CHILDREN
OpWireframe = 2200, // POPUP MENU - DISPLAY MODE - WIREFRAME OpWireframe = 2200, // POPUP MENU - DISPLAY MODE - WIREFRAME
OpShading = 2201, // POPUP MENU - DISPLAY MODE - SHADING OpShading = 2201, // POPUP MENU - DISPLAY MODE - SHADING
OpShadingWithEdges = 2202, // POPUP MENU - DISPLAY MODE - SHADING WITH EDGES OpShadingWithEdges = 2202, // POPUP MENU - DISPLAY MODE - SHADING WITH EDGES

View File

@ -355,9 +355,9 @@ bool GEOMToolsGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
case GEOMOp::OpNoAutoColor: // POPUP - DISABLE AUTO COLOR case GEOMOp::OpNoAutoColor: // POPUP - DISABLE AUTO COLOR
OnDisableAutoColor(); OnDisableAutoColor();
break; break;
case GEOMOp::OpShowChildren: // POPUP - SHOW CHILDREN case GEOMOp::OpDiscloseChildren: // POPUP - SHOW CHILDREN
case GEOMOp::OpHideChildren: // POPUP - HIDE CHILDREN case GEOMOp::OpConcealChildren: // POPUP - HIDE CHILDREN
OnShowHideChildren( theCommandID == GEOMOp::OpShowChildren ); OnDiscloseConcealChildren( theCommandID == GEOMOp::OpDiscloseChildren );
break; break;
case GEOMOp::OpPointMarker: // POPUP - POINT MARKER case GEOMOp::OpPointMarker: // POPUP - POINT MARKER
OnPointMarker(); OnPointMarker();

View File

@ -77,7 +77,7 @@ private:
void OnNbIsos( ActionType actionType = SHOWDLG ); void OnNbIsos( ActionType actionType = SHOWDLG );
void OnDeflection(); void OnDeflection();
void OnSelectOnly(int mode); void OnSelectOnly(int mode);
void OnShowHideChildren( bool ); void OnDiscloseConcealChildren( bool );
void OnUnpublishObject(); void OnUnpublishObject();
void OnPublishObject() ; void OnPublishObject() ;
void OnPointMarker(); void OnPointMarker();

View File

@ -952,7 +952,7 @@ void GEOMToolsGUI::OnSelectOnly(int mode)
} }
} }
void GEOMToolsGUI::OnShowHideChildren( bool show ) void GEOMToolsGUI::OnDiscloseConcealChildren( bool show )
{ {
SALOME_ListIO selected; SALOME_ListIO selected;
SalomeApp_Application* app = SalomeApp_Application* app =