From 3e98d95f4140fee28550e14ff36bc55f000ed4b9 Mon Sep 17 00:00:00 2001 From: vsr Date: Tue, 18 Aug 2009 05:41:44 +0000 Subject: [PATCH] Issue 20099: Hide children Add Show/Hide chidren menu command for GEOM module objects --- doc/salome/gui/GEOM/images/ob_popup_menu.png | Bin 0 -> 13720 bytes .../gui/GEOM/input/viewing_geom_obj.doc | 51 +++++++++---- src/GEOMGUI/GEOMGUI_Selection.cxx | 68 ++++++++++++++++++ src/GEOMGUI/GEOMGUI_Selection.h | 6 ++ src/GEOMGUI/GEOM_msg_en.ts | 24 +++++++ src/GEOMGUI/GeometryGUI.cxx | 8 +++ src/GEOMToolsGUI/GEOMToolsGUI.cxx | 6 ++ src/GEOMToolsGUI/GEOMToolsGUI.h | 3 +- src/GEOMToolsGUI/GEOMToolsGUI_1.cxx | 39 ++++++++++ 9 files changed, 189 insertions(+), 16 deletions(-) create mode 100644 doc/salome/gui/GEOM/images/ob_popup_menu.png diff --git a/doc/salome/gui/GEOM/images/ob_popup_menu.png b/doc/salome/gui/GEOM/images/ob_popup_menu.png new file mode 100644 index 0000000000000000000000000000000000000000..1adb3bebb466d779ba76026474801b47d533b439 GIT binary patch literal 13720 zcma)j1yodD_x6Y&NP{#;jKoMtmz2N^-7s`_iqhTa4BbeFQbS224U!Tf-Hnu#NY{7$ zeee5^uhw_hx@)+1?mctPK6^j=*#S~bMHUa63L69h;mONEH9(*Tj==d53k|sQUb-eujtXTdwW{wTxW#LR5Kx^^r!p%;z z#4=N)XSaS_&m9-`iXsIUohvl@>BGWSsRrM2k7<;VPhdY;HAgPv$WL35-aM;cheM zese_RkcOJBG$tohqMB8IS*tGUu*{J)Q`om{Ft?XY7vsTVD}alYFe&h$V+ z!DJ(ghfBYW3`1z3-Fv6`FM}Sg3XNEgoSmIXwB8gMdS2R2%aT!2ynFm8q!F8tXvLgS zzB)&*IofruC*72u0t?+MxGx-1h+wDE{WF~vSeJwUiUE;d%qb`+STxMb&u`Td9o;oF;K|MMMh z1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ce710f35e..3787aed92 100644 --- a/doc/salome/gui/GEOM/input/viewing_geom_obj.doc +++ b/doc/salome/gui/GEOM/input/viewing_geom_obj.doc @@ -2,12 +2,13 @@ \page view_geom_obj_page Viewing geometrical objects -\n Newly created geometrical objects are automatically displayed in +Newly created geometrical objects are automatically displayed in the OCC 3D Viewer. -\n OCC 3D Viewer is described in the documentation on GUI +OCC 3D Viewer is described in the documentation on GUI module. -\n After the object has appeared in the Viewer, you can select it with + +After the object has appeared in the Viewer, you can select it with left mouse click to change its presentation parameters and access to other useful options by right-clicking on the selected object. @@ -32,27 +33,47 @@ sub-shapes of the selected geometrical object are automatically coloured by the unique colors. TUI Commands : go.SetAutoColor(enable), enabled = go.GetAutoColor()
  • Hide - allows to hide the selected geometrical object from the -viewer. TUI Command : sg.EraseOnly(ID) -\n \image html image18.png -
  • +viewer. TUI Command : sg.EraseOnly(ID) + +\image html image18.png +
  • Hide all - allows to hide all objects from the viewer. TUI -Command: sg.EraseAll() -\n \image html image26.png -
  • +Command: sg.EraseAll() + +\image html image26.png +
  • Show Only - allows to display only the selected -geometrical object. TUI Command: sg.DisplayOnly(ID) -\n \image html image33.png -
  • +geometrical object. TUI Command: sg.DisplayOnly(ID) + +\image html image33.png +
  • Dump view - exports an object from the viewer in bmp, png, jpg or jpeg image format.
  • Change background - allows to redefine the background -color. By default it is black. -\n\n Some of these functionalities are available through right-clicking +color. By default it is black.
  • + + +Some of these functionalities are available through right-clicking on the viewer background: -\image html image22.png
    +\image html image22.png
    +
    • Select Only provides a filter for exclusive selection of objects of a certain type.
    +The Object browser's popup menu can include some other commands: + +\image html ob_popup_menu.png
    + +
      +
    • \subpage work_with_groups_page "Create Group" - invokes dialog box +that allows creating groups of geometrical objects.
    • +
    • Hide Children / Show Children - hide / show child +sub-objects in the Object Browser. These commands are available only +if the selected geometry object has any children. Note: when some +children are hidden, the object name is hilghlighted with the bold +font.
    • +
    + */ diff --git a/src/GEOMGUI/GEOMGUI_Selection.cxx b/src/GEOMGUI/GEOMGUI_Selection.cxx index 1cff7b460..593d80550 100644 --- a/src/GEOMGUI/GEOMGUI_Selection.cxx +++ b/src/GEOMGUI/GEOMGUI_Selection.cxx @@ -89,6 +89,10 @@ QVariant GEOMGUI_Selection::parameter( const int ind, const QString& p ) const return QVariant( isAutoColor( ind ) ); else if ( p == "isVectorsMode" ) return QVariant( isVectorsMode( ind ) ); + else if ( p == "hasHiddenChildren" ) + return QVariant( hasHiddenChildren( ind ) ); + else if ( p == "hasShownChildren" ) + return QVariant( hasShownChildren( ind ) ); else return LightApp_Selection::parameter( ind, p ); } @@ -219,6 +223,70 @@ bool GEOMGUI_Selection::isVectorsMode( const int index ) const return ret; } +bool GEOMGUI_Selection::hasChildren( const _PTR(SObject)& obj ) +{ + bool ok = false; + if ( obj ) { + _PTR(ChildIterator) it ( obj->GetStudy()->NewChildIterator( obj ) ); + for ( ; it->More() && !ok; it->Next() ) { + _PTR(SObject) child = it->Value(); + if ( child ) { + _PTR(SObject) refObj; + if ( child->ReferencedObject( refObj ) ) continue; // omit references + if ( child->GetName() != "" ) ok = true; + } + } + } + return ok; +} + +bool GEOMGUI_Selection::expandable( const _PTR(SObject)& obj ) +{ + bool exp = true; + _PTR(GenericAttribute) anAttr; + if ( obj && obj->FindAttribute( anAttr, "AttributeExpandable" ) ) { + _PTR(AttributeExpandable) aAttrExp = anAttr; + exp = aAttrExp->IsExpandable(); + } + return exp; +} + +bool GEOMGUI_Selection::hasHiddenChildren( const int index ) const +{ + bool OK = false; + SalomeApp_Study* appStudy = dynamic_cast + (SUIT_Session::session()->activeApplication()->activeStudy()); + + if ( appStudy && index >= 0 && index < count() ) { + _PTR(Study) study = appStudy->studyDS(); + QString anEntry = entry( index ); + + if ( study && !anEntry.isEmpty() ) { + _PTR(SObject) aSO( study->FindObjectID( anEntry.toStdString() ) ); + OK = !expandable( aSO ) && hasChildren( aSO ); + } + } + return OK; +} + +bool GEOMGUI_Selection::hasShownChildren( const int index ) const +{ + bool OK = false; + SalomeApp_Study* appStudy = dynamic_cast + (SUIT_Session::session()->activeApplication()->activeStudy()); + + if ( appStudy && index >= 0 && index < count() ) { + _PTR(Study) study = appStudy->studyDS(); + QString anEntry = entry( index ); + + if ( study && !anEntry.isEmpty() ) { + _PTR(SObject) aSO( study->FindObjectID( anEntry.toStdString() ) ); + OK = expandable( aSO ) && hasChildren( aSO ); + } + } + return OK; +} + bool GEOMGUI_Selection::isComponent( const int index ) const { SalomeApp_Study* appStudy = dynamic_cast diff --git a/src/GEOMGUI/GEOMGUI_Selection.h b/src/GEOMGUI/GEOMGUI_Selection.h index d03570ec0..d6b4dabf0 100644 --- a/src/GEOMGUI/GEOMGUI_Selection.h +++ b/src/GEOMGUI/GEOMGUI_Selection.h @@ -28,6 +28,7 @@ #include "GEOM_GEOMGUI.hxx" #include +#include #include #include CORBA_SERVER_HEADER(GEOM_Gen) @@ -50,6 +51,11 @@ private: QString displayMode( const int ) const; QString selectionMode() const; bool isVectorsMode( const int ) const; + bool hasHiddenChildren( const int ) const; + bool hasShownChildren( const int ) const; + + static bool hasChildren( const _PTR(SObject)& ); + static bool expandable( const _PTR(SObject)& ); bool isComponent( const int ) const; GEOM::GEOM_Object_ptr getObject( const int ) const; diff --git a/src/GEOMGUI/GEOM_msg_en.ts b/src/GEOMGUI/GEOM_msg_en.ts index c30b27932..9abfa6421 100644 --- a/src/GEOMGUI/GEOM_msg_en.ts +++ b/src/GEOMGUI/GEOM_msg_en.ts @@ -2323,6 +2323,14 @@ Please, select face, shell or solid and try again MEN_POP_CREATE_GROUP Create Group + + MEN_POP_SHOW_CHILDREN + Show Children + + + MEN_POP_HIDE_CHILDREN + Hide Children + MEN_POP_ISOS Isos @@ -2863,6 +2871,14 @@ Please, select face, shell or solid and try again STB_POP_CREATE_GROUP Create Group + + STB_POP_SHOW_CHILDREN + Show child objects + + + STB_POP_HIDE_CHILDREN + Hide child objects + STB_POP_ISOS Isolines @@ -3335,6 +3351,14 @@ Please, select face, shell or solid and try again TOP_POP_CREATE_GROUP Create Group + + TOP_POP_SHOW_CHILDREN + Show Children + + + TOP_POP_HIDE_CHILDREN + Hide Children + TOP_POP_ISOS Isolines diff --git a/src/GEOMGUI/GeometryGUI.cxx b/src/GEOMGUI/GeometryGUI.cxx index 7706ad9d6..86ef36d17 100644 --- a/src/GEOMGUI/GeometryGUI.cxx +++ b/src/GEOMGUI/GeometryGUI.cxx @@ -386,6 +386,8 @@ void GeometryGUI::OnGUIEvent( int id ) id == 8034 || // POPUP VIEWER - ISOS id == 8035 || // POPUP VIEWER - AUTO COLOR id == 8036 || // POPUP VIEWER - DISABLE AUTO COLOR + id == 8037 || // POPUP VIEWER - SHOW CHILDREN + id == 8038 || // POPUP VIEWER - HIDE CHILDREN id == 804 || // POPUP VIEWER - ADD IN STUDY id == 901 || // OBJECT BROWSER - RENAME id == 9024 ) { // OBJECT BROWSER - OPEN @@ -904,6 +906,8 @@ void GeometryGUI::initialize( CAM_Application* app ) createGeomAction( 8035, "POP_AUTO_COLOR" ); createGeomAction( 8036, "POP_DISABLE_AUTO_COLOR" ); createGeomAction( 8001, "POP_CREATE_GROUP" ); + createGeomAction( 8037, "POP_SHOW_CHILDREN" ); + createGeomAction( 8038, "POP_HIDE_CHILDREN" ); // make wireframe-shading items to be exclusive (only one at a time is selected) //QActionGroup* dispModeGr = new QActionGroup( this, "", true ); @@ -1145,6 +1149,10 @@ void GeometryGUI::initialize( CAM_Application* app ) mgr->setRule( action( 33 ), QString("$type in {'Shape' 'Group'} and selcount>0"), QtxPopupMgr::VisibleRule ); mgr->insert( action( 8001 ), -1, -1 ); // create group mgr->setRule( action( 8001 ), QString("client='ObjectBrowser' and type='Shape' and selcount=1 and isOCC=true"), QtxPopupMgr::VisibleRule ); + mgr->insert( action( 8037 ), -1, -1 ); // show children + mgr->setRule( action( 8037 ), QString("client='ObjectBrowser' and type='Shape' and selcount=1 and hasHiddenChildren=true"), QtxPopupMgr::VisibleRule ); + mgr->insert( action( 8038 ), -1, -1 ); // hide children + mgr->setRule( action( 8038 ), QString("client='ObjectBrowser' and type='Shape' and selcount=1 and hasShownChildren=true"), QtxPopupMgr::VisibleRule ); mgr->insert( action( 801 ), -1, -1 ); // edit group mgr->setRule( action( 801 ), QString("client='ObjectBrowser' and type='Group' and selcount=1 and isOCC=true"), QtxPopupMgr::VisibleRule ); mgr->insert( separator(), -1, -1 ); // ----------- diff --git a/src/GEOMToolsGUI/GEOMToolsGUI.cxx b/src/GEOMToolsGUI/GEOMToolsGUI.cxx index 34dd0d2cc..a076bccf5 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI.cxx @@ -401,6 +401,12 @@ bool GEOMToolsGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent) OnDisableAutoColor(); break; } + case 8037: // SHOW CHILDREN - POPUP VIEWER + case 8038: // HIDE CHILDREN - POPUP VIEWER + { + OnShowHideChildren( theCommandID == 8037 ); + break; + } case 9024 : // OPEN - OBJBROSER POPUP { OnOpen(); diff --git a/src/GEOMToolsGUI/GEOMToolsGUI.h b/src/GEOMToolsGUI/GEOMToolsGUI.h index 3ae7e7808..91d8db559 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI.h +++ b/src/GEOMToolsGUI/GEOMToolsGUI.h @@ -71,7 +71,8 @@ private: void OnNbIsos(); void OnOpen(); void OnSelectOnly(int mode); - + void OnShowHideChildren( bool ); + // Recursive deletion of object with children void removeObjectWithChildren( _PTR(SObject), _PTR(Study), diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx index a996e25ef..bc7e8fd23 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx @@ -606,3 +606,42 @@ void GEOMToolsGUI::OnSelectOnly(int mode) getGeometryGUI()->setLocalSelectionMode(mode); } } + +void GEOMToolsGUI::OnShowHideChildren( bool show ) +{ + SALOME_ListIO selected; + SalomeApp_Application* app = + dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() ); + if ( app ) { + LightApp_SelectionMgr* aSelMgr = app->selectionMgr(); + SalomeApp_Study* appStudy = dynamic_cast( app->activeStudy() ); + if ( aSelMgr && appStudy ) { + aSelMgr->selectedObjects( selected ); + if ( !selected.IsEmpty() ) { + _PTR(Study) aStudy = appStudy->studyDS(); + _PTR(StudyBuilder) B = aStudy->NewBuilder(); + + bool aLocked = ( _PTR(AttributeStudyProperties)( aStudy->GetProperties() ) )->IsLocked(); + if ( aLocked ) { + SUIT_MessageBox::warning( app->desktop(), + QObject::tr( "WRN_WARNING" ), + QObject::tr( "WRN_STUDY_LOCKED" ) ); + return; + } + + for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) { + Handle(SALOME_InteractiveObject) IObject = It.Value(); + + _PTR(SObject) obj ( aStudy->FindObjectID( IObject->getEntry() ) ); + _PTR(GenericAttribute) anAttr; + if ( obj ) { + _PTR(AttributeExpandable) aExp = B->FindOrCreateAttribute( obj, "AttributeExpandable" ); + aExp->SetExpandable( show ); + } // if ( obj ) + } // iterator + } + } + app->updateObjectBrowser( false ); + app->updateActions(); + } +} -- 2.39.2