From 1dd8f0e9e65764777d1200cc6c61c7ac8a6c651c Mon Sep 17 00:00:00 2001 From: akl Date: Tue, 9 Jul 2013 08:22:16 +0000 Subject: [PATCH] 0021708: [CEA 586] Object browser sort only children: + Add Use Case browser data tree management + Add "Sort children" contextual menu popup item + Update user documentation --- doc/salome/gui/GEOM/images/geom_sort.png | Bin 0 -> 414503 bytes .../input/arranging_study_objects_page.doc | 4 ++ src/GEOMGUI/GEOMGUI_Selection.cxx | 58 +++++++++++------- src/GEOMGUI/GEOMGUI_Selection.h | 2 + src/GEOMGUI/GEOM_msg_en.ts | 8 +++ src/GEOMGUI/GEOM_msg_fr.ts | 8 +++ src/GEOMGUI/GeometryGUI.cxx | 11 +++- src/GEOMGUI/GeometryGUI_Operations.h | 1 + src/GEOMToolsGUI/GEOMToolsGUI.cxx | 3 + src/GEOMToolsGUI/GEOMToolsGUI.h | 1 + src/GEOMToolsGUI/GEOMToolsGUI_1.cxx | 27 ++++++++ 11 files changed, 100 insertions(+), 23 deletions(-) create mode 100644 doc/salome/gui/GEOM/images/geom_sort.png diff --git a/doc/salome/gui/GEOM/images/geom_sort.png b/doc/salome/gui/GEOM/images/geom_sort.png new file mode 100644 index 0000000000000000000000000000000000000000..7324f62dd0510316226c60f87814ef603804ce50 GIT binary patch literal 414503 zcmeHw3Ah!-weC7IXJVc~85F??MvRJZHAck&6C#31)EHwl5WN`?B_=oTT_L%7`jV@> z8#V97Awm*00fjh4V-SaDZ~znsL`6kZWYPnkb2#(#YV~1l)~?g@uy^m>tN5B4)~Z!i ze|P_9Rd?;`U(NdJS=AN8D*&K+#@W+n0~DO8j+1+ps*;}^yS`3E1=q|z>oi#P^2psP zQ-0Oi7hVI<`=59e{Pw8cBUEA8!WlEqD0{E0ymV~e0h>mitcr#$JmZ3er_cZ459j`9 zA)J2o-0v)$``yt$xpLtZqtBW#bJjP0-g^kZXqYkm)boE@01Fl^SzIvX+DE$H{M|*W zt^`3q5D)|e0Ysn}|EsO7#Ylo6AP6J~fj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 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/input/arranging_study_objects_page.doc b/doc/salome/gui/GEOM/input/arranging_study_objects_page.doc index 44df8f830..aeeec8bb4 100644 --- a/doc/salome/gui/GEOM/input/arranging_study_objects_page.doc +++ b/doc/salome/gui/GEOM/input/arranging_study_objects_page.doc @@ -20,6 +20,10 @@ To create a folder select "Create folder" popup menu item for root "Geometry" ob

  • folder(s) +If geometrical object has more than one child sub-object, then there is a possibility to sort these children in ascending order. To use sort functionality select "Sort children" popup menu item for the parent object. + +\image html geom_sort.png "Sorting of sub-objects" + Our TUI Scripts provide you with useful examples of \ref tui_arranging_study_objects "Arranging objects in study". diff --git a/src/GEOMGUI/GEOMGUI_Selection.cxx b/src/GEOMGUI/GEOMGUI_Selection.cxx index fdf8f8451..c090dbbd9 100644 --- a/src/GEOMGUI/GEOMGUI_Selection.cxx +++ b/src/GEOMGUI/GEOMGUI_Selection.cxx @@ -161,6 +161,8 @@ QVariant GEOMGUI_Selection::parameter( const int idx, const QString& p ) const v = topLevel( idx ); else if ( p == "hasChildren" ) v = hasChildren( idx ); + else if ( p == "nbChildren" ) + v = nbChildren(idx); else if ( p == "hasConcealedChildren" ) v = hasConcealedChildren( idx ); else if ( p == "hasDisclosedChildren" ) @@ -399,19 +401,8 @@ bool GEOMGUI_Selection::isVectorsMode( const int index ) const 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; + // as soon as Use Case browser data tree was added + return obj->GetStudy()->GetUseCaseBuilder()->HasChildren( obj ); } bool GEOMGUI_Selection::expandable( const _PTR(SObject)& obj ) @@ -436,6 +427,17 @@ bool GEOMGUI_Selection::isCompoundOfVertices( GEOM::GEOM_Object_ptr obj ) return ret; } +bool GEOMGUI_Selection::isFolder( const _PTR(SObject)& obj ) +{ + bool ret = false; + _PTR(GenericAttribute) anAttr; + if ( obj->FindAttribute(anAttr, "AttributeLocalID") ) { + _PTR(AttributeLocalID) aLocalID( anAttr ); + ret = aLocalID->Value() == 999; + } + return ret; +} + bool GEOMGUI_Selection::hasChildren( const int index ) const { bool ok = false; @@ -452,6 +454,25 @@ bool GEOMGUI_Selection::hasChildren( const int index ) const return ok; } +int GEOMGUI_Selection::nbChildren( const int index ) const +{ + int nb = 0; + SalomeApp_Study* appStudy = dynamic_cast( study() ); + + if ( appStudy ) { + QString anEntry = entry( index ); + _PTR(Study) study = appStudy->studyDS(); + if ( study && !anEntry.isEmpty() ) { + _PTR(SObject) aSO( study->FindObjectID( anEntry.toStdString() ) ); + if ( aSO->GetStudy()->GetUseCaseBuilder()->IsUseCaseNode(aSO) ) { + _PTR(UseCaseIterator) it = aSO->GetStudy()->GetUseCaseBuilder()->GetUseCaseIterator( aSO ); + for (it->Init(false); it->More(); it->Next()) nb++; + } + } + } + return nb; +} + bool GEOMGUI_Selection::hasConcealedChildren( const int index ) const { bool OK = false; @@ -625,6 +646,7 @@ bool GEOMGUI_Selection::isPhysicalMaterial( const int idx ) const bool GEOMGUI_Selection::isFolder( const int index ) const { + bool res = false; SalomeApp_Study* appStudy = dynamic_cast( study() ); if ( appStudy ) { @@ -632,15 +654,9 @@ bool GEOMGUI_Selection::isFolder( const int index ) const _PTR(Study) study = appStudy->studyDS(); if ( study && !anEntry.isNull() ) { _PTR(SObject) aSO( study->FindObjectID( anEntry.toStdString() ) ); - if ( aSO ) { - _PTR(GenericAttribute) anAttr; - if ( aSO->FindAttribute(anAttr, "AttributeLocalID") ) { - _PTR(AttributeLocalID) aLocalID( anAttr ); - return aLocalID->Value() == 999; - } - } + if ( aSO ) res = isFolder( aSO ); } } - return false; + return res; } diff --git a/src/GEOMGUI/GEOMGUI_Selection.h b/src/GEOMGUI/GEOMGUI_Selection.h index c8c1230d9..fddb4df4c 100644 --- a/src/GEOMGUI/GEOMGUI_Selection.h +++ b/src/GEOMGUI/GEOMGUI_Selection.h @@ -52,6 +52,7 @@ public: static bool hasChildren( const _PTR(SObject)& ); static bool expandable( const _PTR(SObject)& ); static bool isCompoundOfVertices( GEOM::GEOM_Object_ptr ); + static bool isFolder( const _PTR(SObject)& ); protected: // virtual QVariant contextParameter( const QString& ) const; @@ -67,6 +68,7 @@ private: QString selectionMode() const; bool isVectorsMode( const int ) const; bool hasChildren( const int ) const; + int nbChildren( const int ) const; bool hasConcealedChildren( const int ) const; bool hasDisclosedChildren( const int ) const; bool compoundOfVertices( const int ) const; diff --git a/src/GEOMGUI/GEOM_msg_en.ts b/src/GEOMGUI/GEOM_msg_en.ts index 32cb42f36..718477015 100644 --- a/src/GEOMGUI/GEOM_msg_en.ts +++ b/src/GEOMGUI/GEOM_msg_en.ts @@ -4652,6 +4652,14 @@ Please, select face, shell or solid and try again NEW_FOLDER_NAME NewFolder + + MEN_POP_SORT_CHILD_ITEMS + Sort children + + + STB_POP_SORT_CHILD_ITEMS + Sort child items + GEOM_RESULT_NAME_GRP Result name diff --git a/src/GEOMGUI/GEOM_msg_fr.ts b/src/GEOMGUI/GEOM_msg_fr.ts index 065f5fb7b..0d165390f 100644 --- a/src/GEOMGUI/GEOM_msg_fr.ts +++ b/src/GEOMGUI/GEOM_msg_fr.ts @@ -4658,6 +4658,14 @@ Choisissez une face, une coque ou un solide et essayez de nouveau NEW_FOLDER_NAME NewFolder + + MEN_POP_SORT_CHILD_ITEMS + Sort children + + + STB_POP_SORT_CHILD_ITEMS + Sort child items + GEOM_RESULT_NAME_GRP Nom du résultat diff --git a/src/GEOMGUI/GeometryGUI.cxx b/src/GEOMGUI/GeometryGUI.cxx index 0d79f320d..e63309a01 100644 --- a/src/GEOMGUI/GeometryGUI.cxx +++ b/src/GEOMGUI/GeometryGUI.cxx @@ -391,7 +391,8 @@ void GeometryGUI::OnGUIEvent( int id, const QVariant& theParam ) << GEOMOp::OpUnpublishObject << GEOMOp::OpPublishObject << GEOMOp::OpPointMarker - << GEOMOp::OpCreateFolder; + << GEOMOp::OpCreateFolder + << GEOMOp::OpSortChildren; if ( !ViewOCC && !ViewVTK && !NotViewerDependentCommands.contains( id ) ) return; @@ -444,6 +445,7 @@ void GeometryGUI::OnGUIEvent( int id, const QVariant& theParam ) case GEOMOp::OpBringToFront: // POPUP MENU - BRING TO FRONT case GEOMOp::OpClsBringToFront: // case GEOMOp::OpCreateFolder: // POPUP MENU - CREATE FOLDER + case GEOMOp::OpSortChildren: // POPUP MENU - SORT CHILD ITEMS libName = "GEOMToolsGUI"; break; case GEOMOp::OpDMWireframe: // MENU VIEW - WIREFRAME @@ -905,6 +907,7 @@ void GeometryGUI::initialize( CAM_Application* app ) createGeomAction( GEOMOp::OpMaterialProperties, "POP_MATERIAL_PROPERTIES" ); createGeomAction( GEOMOp::OpPredefMaterCustom, "POP_PREDEF_MATER_CUSTOM" ); createGeomAction( GEOMOp::OpCreateFolder, "POP_CREATE_FOLDER" ); + createGeomAction( GEOMOp::OpSortChildren, "POP_SORT_CHILD_ITEMS" ); createGeomAction( GEOMOp::OpPipeTShape, "PIPETSHAPE" ); @@ -1407,7 +1410,11 @@ void GeometryGUI::initialize( CAM_Application* app ) mgr->insert( separator(), -1, -1 ); // ----------- mgr->insert( action( GEOMOp::OpCreateFolder ), -1, -1 ); // Create Folder - mgr->setRule( action( GEOMOp::OpCreateFolder ), QString("client='ObjectBrowser' and (isComponent=true or isFolder=true)"), QtxPopupMgr::VisibleRule ); + mgr->setRule( action( GEOMOp::OpCreateFolder ), QString("client='ObjectBrowser' and $component={'GEOM'} and (isComponent=true or isFolder=true)"), QtxPopupMgr::VisibleRule ); + + mgr->insert( separator(), -1, -1 ); // ----------- + mgr->insert( action( GEOMOp::OpSortChildren ), -1, -1 ); // Sort child items + mgr->setRule( action( GEOMOp::OpSortChildren ), QString("client='ObjectBrowser' and $component={'GEOM'} and nbChildren>1"), QtxPopupMgr::VisibleRule ); mgr->hide( mgr->actionId( action( myEraseAll ) ) ); diff --git a/src/GEOMGUI/GeometryGUI_Operations.h b/src/GEOMGUI/GeometryGUI_Operations.h index 77ca348a3..38fa6d57f 100644 --- a/src/GEOMGUI/GeometryGUI_Operations.h +++ b/src/GEOMGUI/GeometryGUI_Operations.h @@ -60,6 +60,7 @@ namespace GEOMOp { OpEdgeWidth = 1260, // POPUP MENU - LINE WIDTH - EDGE WIDTH OpIsosWidth = 1261, // POPUP MENU - LINE WIDTH - ISOS WIDTH OpCreateFolder = 1262, // POPUP MENU - CREATE FOLDER + OpSortChildren = 1263, // POPUP MENU - SORT CHILD ITEMS // DisplayGUI ------------------//-------------------------------- OpSwitchVectors = 2001, // MENU VIEW - DISPLAY MODE - SHOW/HIDE EDGE DIRECTION OpShowAll = 2002, // MENU VIEW - SHOW ALL diff --git a/src/GEOMToolsGUI/GEOMToolsGUI.cxx b/src/GEOMToolsGUI/GEOMToolsGUI.cxx index 0ebb58902..23a357629 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI.cxx @@ -389,6 +389,9 @@ bool GEOMToolsGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent) case GEOMOp::OpCreateFolder: OnCreateFolder(); break; + case GEOMOp::OpSortChildren: + OnSortChildren(); + break; default: SUIT_Session::session()->activeApplication()->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID)); break; diff --git a/src/GEOMToolsGUI/GEOMToolsGUI.h b/src/GEOMToolsGUI/GEOMToolsGUI.h index b5fe325e3..408f8c4be 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI.h +++ b/src/GEOMToolsGUI/GEOMToolsGUI.h @@ -89,6 +89,7 @@ private: void OnBringToFront(); void OnClsBringToFront(); void OnCreateFolder(); + void OnSortChildren(); // Shortcut commands void OnChangeTransparency( bool ); diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx index 5d158445f..23d894283 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx @@ -835,3 +835,30 @@ void GEOMToolsGUI::OnCreateFolder() _CAST(SObject, aFatherSO)->GetSObject() ); app->updateObjectBrowser( false ); } + +void GEOMToolsGUI::OnSortChildren() +{ + SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() ); + if ( !app ) return; + + SalomeApp_Study* appStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() ); + if ( !appStudy ) return; + + LightApp_SelectionMgr* aSelMgr = app->selectionMgr(); + if ( !aSelMgr ) return; + + SALOME_ListIO selected; + aSelMgr->selectedObjects( selected ); + if ( selected.IsEmpty() ) return; + + Handle(SALOME_InteractiveObject) anIObject = selected.First(); + + _PTR(Study) aStudy = appStudy->studyDS(); + if( !aStudy ) return; + _PTR(SObject) aFatherSO(aStudy->FindObjectID(anIObject->getEntry())); + if ( !aFatherSO ) return; + + aStudy->GetUseCaseBuilder()->SortChildren( aFatherSO, true/*AscendingOrder*/ ); + + app->updateObjectBrowser( true ); +} -- 2.39.2