From 7c7b4b0636cbb5fdb2ae67658ec9709be1c58812 Mon Sep 17 00:00:00 2001 From: akl Date: Tue, 9 Jul 2013 08:32:08 +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/SMESH/images/smesh_sort.png | Bin 0 -> 14446 bytes .../input/arranging_study_objects_page.doc | 11 ++++ doc/salome/gui/SMESH/input/index.doc | 3 + idl/SMESH_Gen.idl | 14 +++++ src/SMESHGUI/SMESHGUI.cxx | 30 ++++++++++ src/SMESHGUI/SMESHGUI_Selection.cxx | 47 ++++++++++++++++ src/SMESHGUI/SMESHGUI_Selection.h | 3 + src/SMESHGUI/SMESH_msg_en.ts | 8 +++ src/SMESHGUI/SMESH_msg_fr.ts | 8 +++ src/SMESH_I/SMESH_Gen_i.cxx | 52 ++++++++++++++++++ src/SMESH_I/SMESH_Gen_i.hxx | 5 ++ src/SMESH_I/SMESH_Gen_i_1.cxx | 13 +++++ 12 files changed, 194 insertions(+) create mode 100644 doc/salome/gui/SMESH/images/smesh_sort.png create mode 100644 doc/salome/gui/SMESH/input/arranging_study_objects_page.doc diff --git a/doc/salome/gui/SMESH/images/smesh_sort.png b/doc/salome/gui/SMESH/images/smesh_sort.png new file mode 100644 index 0000000000000000000000000000000000000000..0b00568c3a3cae65f39cc8207aa0be22694a85e2 GIT binary patch literal 14446 zcma*O1yCGO8znlp26uM}9tf_3y9NjZPk<2IT?f|?+$C6WcZcBa!QI{cHUGc+cDG*D z)}xpPdYIdN@BQqY^L40-lJq-dB4iK<^iEbrLJb6hG6Y`Ki15G})Y8Q$;0Kh0nlu_7Dthze$e%K}BJ}TdH!FjH- zeH9LjNcoc%3Y3zXx_}MoAq2keF76T;m>DD#ts>Vx1R%Wo>ko%A|9Kt95ajAJ_jvRU zjJS^kHG6ms{6^J3Puv$&^CC^|gQG?`GBVJ=xV(*VoM!SS}cO~Qfoh<;>-j)euyoyxN3wEViDGKeV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\subpage arranging_study_objects_page section. + Mesh module preferences are described in the \subpage mesh_preferences_page section of SALOME Mesh Help. Almost all mesh module functionalities are accessible via diff --git a/idl/SMESH_Gen.idl b/idl/SMESH_Gen.idl index fbe8a35d6..aadfb1e33 100644 --- a/idl/SMESH_Gen.idl +++ b/idl/SMESH_Gen.idl @@ -36,6 +36,7 @@ module SMESH { + typedef sequence sobject_list; typedef sequence object_array; typedef sequence mesh_array; @@ -402,6 +403,19 @@ module SMESH * \brief Get names of meshes defined in file with the specified name. */ string_array GetMeshNames(in string theFileName); + + /*! + * \brief Moves objects to the specified position + * + * This function is used in the drag-n-drop functionality. + * + * \param what objects being moved + * \param where parent object where objects are moved to + * \param row position in the parent object's children list at which objects are moved + */ + void Move( in sobject_list what, + in SALOMEDS::SObject where, + in long row ); }; }; diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index 390621247..33de52b4d 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -162,6 +162,7 @@ #include #include #include +#include // OCCT includes #include @@ -1221,6 +1222,25 @@ } } + void sortChildren(){ + LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr(); + SALOME_ListIO selected; + if( aSel ) { + aSel->selectedObjects( selected ); + + if(selected.Extent()){ + Handle(SALOME_InteractiveObject) anIObject = selected.First(); + _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); + _PTR(SObject) aSObj = aStudy->FindObjectID(anIObject->getEntry()); + if (aSObj) { + if ( aStudy->GetUseCaseBuilder()->SortChildren( aSObj, true/*AscendingOrder*/ ) ) { + SMESHGUI::GetSMESHGUI()->updateObjBrowser(); + } + } + } + } + } + void SetDisplayMode(int theCommandID, SMESHGUI_StudyId2MarkerMap& theMarkerMap) { SALOME_ListIO selected; @@ -3533,6 +3553,10 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) dlg->show(); break; } + case 41: + ::sortChildren(); + break; + } anApp->updateActions(); //SRN: To update a Save button in the toolbar @@ -3830,6 +3854,8 @@ void SMESHGUI::initialize( CAM_Application* app ) 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 ), @@ -4512,6 +4538,10 @@ void SMESHGUI::initialize( CAM_Application* app ) popupMgr()->insert( separator(), -1, -1 ); + popupMgr()->insert( action( 41 ), -1, -1 ); + popupMgr()->setRule( action( 41 ), "$component={'SMESH'} and client='ObjectBrowser' and isContainer and nbChildren>1", QtxPopupMgr::VisibleRule ); + popupMgr()->insert( separator(), -1, -1 ); + connect( application(), SIGNAL( viewManagerActivated( SUIT_ViewManager* ) ), this, SLOT( onViewManagerActivated( SUIT_ViewManager* ) ) ); diff --git a/src/SMESHGUI/SMESHGUI_Selection.cxx b/src/SMESHGUI/SMESHGUI_Selection.cxx index 4b8c433f9..86a929214 100644 --- a/src/SMESHGUI/SMESHGUI_Selection.cxx +++ b/src/SMESHGUI/SMESHGUI_Selection.cxx @@ -127,6 +127,9 @@ QVariant SMESHGUI_Selection::parameter( const int ind, const QString& p ) const else if ( p=="groupType" ) val = QVariant( groupType( ind ) ); else if ( p=="quadratic2DMode") val = QVariant(quadratic2DMode(ind)); else if ( p=="isDistributionVisible") val = QVariant(isDistributionVisible(ind)); + else if ( p=="hasChildren") val = QVariant(hasChildren(ind)); + else if ( p=="nbChildren") val = QVariant(nbChildren(ind)); + else if ( p=="isContainer") val = QVariant(isContainer(ind)); if( val.isValid() ) return val; @@ -529,6 +532,50 @@ QVariant SMESHGUI_Selection::isVisible( int ind ) const return QVariant( false ); } +//======================================================================= +//function : hasChildren +//purpose : +//======================================================================= + +bool SMESHGUI_Selection::hasChildren( int ind ) const +{ + if ( ind >= 0 ) + { + _PTR(SObject) sobj = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() ); + return SMESH::GetActiveStudyDocument()->GetUseCaseBuilder()->HasChildren( sobj ); + } + return false; +} + +//======================================================================= +//function : hasChildren +//purpose : +//======================================================================= + +int SMESHGUI_Selection::nbChildren( int ind ) const +{ + int nb = 0; + if ( ind >= 0 ) + { + _PTR(SObject) sobj = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() ); + if ( sobj->GetStudy()->GetUseCaseBuilder()->IsUseCaseNode( sobj ) ) { + _PTR(UseCaseIterator) it = sobj->GetStudy()->GetUseCaseBuilder()->GetUseCaseIterator( sobj ); + for (it->Init(false); it->More(); it->Next()) nb++; + } + } + return nb; +} + +//======================================================================= +//function : isContainer +//purpose : +//======================================================================= + +bool SMESHGUI_Selection::isContainer( int ind ) const +{ + return ind >= 0 && ind < myTypes.count() && myTypes[ind] == "Unknown"; +} + //======================================================================= //function : type //purpose : diff --git a/src/SMESHGUI/SMESHGUI_Selection.h b/src/SMESHGUI/SMESHGUI_Selection.h index 4358bab07..5f2a50bdb 100644 --- a/src/SMESHGUI/SMESHGUI_Selection.h +++ b/src/SMESHGUI/SMESHGUI_Selection.h @@ -63,6 +63,9 @@ public: virtual QString quadratic2DMode(int ) const; virtual bool isDistributionVisible(int ) const; + virtual bool hasChildren( int ) const; + virtual int nbChildren( int ) const; + virtual bool isContainer( int ) const; // parameters got from actor return nothing if an actor is not visible virtual QList elemTypes( int ) const; diff --git a/src/SMESHGUI/SMESH_msg_en.ts b/src/SMESHGUI/SMESH_msg_en.ts index 6fd576050..6a8b6750f 100644 --- a/src/SMESHGUI/SMESH_msg_en.ts +++ b/src/SMESHGUI/SMESH_msg_en.ts @@ -4114,6 +4114,14 @@ It can't be deleted SMESH_GIGABYTE %1 GB + + MEN_SORT_CHILD_ITEMS + Sort children + + + STB_SORT_CHILD_ITEMS + Sort child items + SMESHGUI_Dialog diff --git a/src/SMESHGUI/SMESH_msg_fr.ts b/src/SMESHGUI/SMESH_msg_fr.ts index 65e5bb7b5..7423e43ea 100755 --- a/src/SMESHGUI/SMESH_msg_fr.ts +++ b/src/SMESHGUI/SMESH_msg_fr.ts @@ -4114,6 +4114,14 @@ avec le paramètre '%1' des préférences du module Mesh.L'objet sélectionné a été utilisé pour en créer un autre. Il ne peut pas être supprimé. + + MEN_SORT_CHILD_ITEMS + Sort children + + + STB_SORT_CHILD_ITEMS + Sort child items + SMESHGUI_Dialog diff --git a/src/SMESH_I/SMESH_Gen_i.cxx b/src/SMESH_I/SMESH_Gen_i.cxx index f710776b6..f393b918c 100644 --- a/src/SMESH_I/SMESH_Gen_i.cxx +++ b/src/SMESH_I/SMESH_Gen_i.cxx @@ -4790,6 +4790,18 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent, } pd << ""; // prevent optimizing pd out + // creation of tree nodes for all data objects in the study + // to support tree representation customization and drag-n-drop: + SALOMEDS::UseCaseBuilder_var useCaseBuilder = theComponent->GetStudy()->GetUseCaseBuilder(); + if ( !useCaseBuilder->IsUseCaseNode( theComponent ) ) { + useCaseBuilder->SetRootCurrent(); + useCaseBuilder->Append( theComponent ); // component object is added as the top level item + SALOMEDS::ChildIterator_var it = theComponent->GetStudy()->NewChildIterator( theComponent ); + for (it->InitEx(true); it->More(); it->Next()) { + useCaseBuilder->AppendTo( it->Value()->GetFather(), it->Value() ); + } + } + INFOS( "SMESH_Gen_i::Load completed" ); return true; } @@ -4997,6 +5009,46 @@ char* SMESH_Gen_i::getVersion() #endif } +//================================================================================= +// function : Move() +// purpose : Moves objects to the specified position. +// Is used in the drag-n-drop functionality. +//================================================================================= +void SMESH_Gen_i::Move( const SMESH::sobject_list& what, + SALOMEDS::SObject_ptr where, + CORBA::Long row ) +{ + if ( CORBA::is_nil( where ) ) return; + + SALOMEDS::Study_var study = where->GetStudy(); + SALOMEDS::StudyBuilder_var studyBuilder = study->NewBuilder(); + SALOMEDS::UseCaseBuilder_var useCaseBuilder = study->GetUseCaseBuilder(); + SALOMEDS::SComponent_var father = where->GetFatherComponent(); + std::string dataType = father->ComponentDataType(); + if ( dataType != "SMESH" ) return; // not a SMESH component + + SALOMEDS::SObject_var objAfter; + if ( row >= 0 && useCaseBuilder->HasChildren( where ) ) { + // insert at given row -> find insertion position + SALOMEDS::UseCaseIterator_var useCaseIt = useCaseBuilder->GetUseCaseIterator( where ); + int i; + for ( i = 0; i < row && useCaseIt->More(); i++, useCaseIt->Next() ); + if ( i == row && useCaseIt->More() ) { + objAfter = useCaseIt->Value(); + } + } + + for ( int i = 0; i < what.length(); i++ ) { + SALOMEDS::SObject_var sobj = what[i]; + if ( CORBA::is_nil( sobj ) ) continue; // skip bad object + // insert the object to the use case tree + if ( !CORBA::is_nil( objAfter ) ) + useCaseBuilder->InsertBefore( sobj, objAfter ); // insert at given row + else + useCaseBuilder->AppendTo( where, sobj ); // append to the end of list + } +} + //============================================================================= /*! * SMESHEngine_factory diff --git a/src/SMESH_I/SMESH_Gen_i.hxx b/src/SMESH_I/SMESH_Gen_i.hxx index bbd544fab..403fb7ee5 100644 --- a/src/SMESH_I/SMESH_Gen_i.hxx +++ b/src/SMESH_I/SMESH_Gen_i.hxx @@ -585,6 +585,11 @@ public: const std::string & GetLastObjEntry() const { return myLastObj; } std::vector< std::string > GetAllParameters(const std::string& theObjectEntry) const; + // Move objects to the specified position + void Move( const SMESH::sobject_list& what, + SALOMEDS::SObject_ptr where, + CORBA::Long row ); + private: // Create hypothesis of given type SMESH::SMESH_Hypothesis_ptr createHypothesis( const char* theHypName, diff --git a/src/SMESH_I/SMESH_Gen_i_1.cxx b/src/SMESH_I/SMESH_Gen_i_1.cxx index 4ac7ad8d3..fc50bc409 100644 --- a/src/SMESH_I/SMESH_Gen_i_1.cxx +++ b/src/SMESH_I/SMESH_Gen_i_1.cxx @@ -261,6 +261,7 @@ static SALOMEDS::SObject_ptr publish(SALOMEDS::Study_ptr theStudy, { SALOMEDS::SObject_wrap SO = SMESH_Gen_i::ObjectToSObject( theStudy, theIOR ); SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder(); + SALOMEDS::UseCaseBuilder_var useCaseBuilder = theStudy->GetUseCaseBuilder(); if ( SO->_is_nil() ) { if ( theTag == 0 ) SO = aStudyBuilder->NewObject( theFatherObject ); @@ -286,6 +287,10 @@ static SALOMEDS::SObject_ptr publish(SALOMEDS::Study_ptr theStudy, selAttr->SetSelectable( false ); } + // add object to the use case tree + // (to support tree representation customization and drag-n-drop) + useCaseBuilder->AppendTo( SO->GetFather(), SO ); + return SO._retn(); } @@ -377,6 +382,9 @@ static void addReference (SALOMEDS::Study_ptr theStudy, if ( !theSObject->FindSubObject( theTag, aReferenceSO.inout() )) aReferenceSO = aStudyBuilder->NewObjectToTag( theSObject, theTag ); aStudyBuilder->Addreference( aReferenceSO, aToObjSO ); + // add reference to the use case tree + // (to support tree representation customization and drag-n-drop) + theStudy->GetUseCaseBuilder()->AppendTo( aReferenceSO->GetFather(), aReferenceSO ); } } @@ -456,6 +464,7 @@ SALOMEDS::SComponent_ptr SMESH_Gen_i::PublishComponent(SALOMEDS::Study_ptr theSt return father._retn(); SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder(); + SALOMEDS::UseCaseBuilder_var useCaseBuilder = theStudy->GetUseCaseBuilder(); SALOMEDS::GenericAttribute_wrap anAttr; SALOMEDS::AttributePixMap_wrap aPixmap; @@ -466,6 +475,10 @@ SALOMEDS::SComponent_ptr SMESH_Gen_i::PublishComponent(SALOMEDS::Study_ptr theSt aPixmap->SetPixMap( "ICON_OBJBROWSER_SMESH" ); CORBA::String_var userName = aComp->componentusername(); SetName( father, userName.in(), "MESH" ); + // add component to the use case tree + // (to support tree representation customization and drag-n-drop) + useCaseBuilder->SetRootCurrent(); + useCaseBuilder->Append( father ); // component object is added as the top level item if(MYDEBUG) MESSAGE("PublishComponent--END"); return father._retn(); -- 2.39.2