SHAPER  9.12.0
XGUI_SelectionMgr Class Reference

Selection manager. More...

Inheritance diagram for XGUI_SelectionMgr:
Inheritance graph

Public Slots

void onObjectBrowserSelection ()
 Reaction on selectio0n in Object browser. More...
 
void onViewerSelection ()
 Reaction on selectio0n in Viewer. More...
 

Signals

void selectionChanged ()
 Emited when selection in a one of viewers was changed. More...
 

Public Member Functions

 XGUI_SelectionMgr (XGUI_Workshop *theParent)
 Constructor. More...
 
XGUI_Selectionselection () const
 Returns current selection. More...
 
ModuleBase_ISelection::SelectionPlace placeOfSelection () const
 
void connectViewers ()
 Connects the manager to all viewers accessible by Workshop. More...
 
void setSelectedOwners (const SelectMgr_IndexedMapOfOwner &theSelectedOwners, bool isUpdateViewer)
 Selects the owners in the context. More...
 
void clearSelection ()
 Clears selection in Viewer and object Browser. More...
 
void setSelected (const QList< std::shared_ptr< ModuleBase_ViewerPrs > > &theValues)
 Sets values selected in both, ObjectBrowser and V3d viewer Selection is not synchronized between these controls. More...
 
void deselectPresentation (const HandlettheObject)
 Find all selected owners of the object and remove the owners from selection. More...
 
void updateSelectionBy (const ModuleBase_ISelection::SelectionPlace &thePlace)
 Updates selection, which are depend on the selection in the given place. More...
 
std::list< FeaturePtr > getSelectedFeatures ()
 Returns list of selected features (ignores other selected objects and parts) More...
 

Detailed Description

Selection manager.

Provides selection event on selection in Object Browser and Viewer

Constructor & Destructor Documentation

◆ XGUI_SelectionMgr()

XGUI_SelectionMgr::XGUI_SelectionMgr ( XGUI_Workshop theParent)

Constructor.

Parameters
theParenta parent workshop

Member Function Documentation

◆ selection()

XGUI_Selection* XGUI_SelectionMgr::selection ( ) const
inline

Returns current selection.

◆ connectViewers()

void XGUI_SelectionMgr::connectViewers ( )

Connects the manager to all viewers accessible by Workshop.

◆ setSelectedOwners()

void XGUI_SelectionMgr::setSelectedOwners ( const SelectMgr_IndexedMapOfOwner &  theSelectedOwners,
bool  isUpdateViewer 
)

Selects the owners in the context.

Parameters
theSelectedOwnersa container of owners
isUpdateViewerthe parameter whether the viewer should be update immediatelly

previous selection should be cleared, else there will be decomposition of selections: as AddOrRemoveSelected inverts current selection

◆ clearSelection()

void XGUI_SelectionMgr::clearSelection ( )

Clears selection in Viewer and object Browser.

◆ setSelected()

void XGUI_SelectionMgr::setSelected ( const QList< std::shared_ptr< ModuleBase_ViewerPrs > > &  theValues)

Sets values selected in both, ObjectBrowser and V3d viewer Selection is not synchronized between these controls.

Parameters
theValuesa container of values to be selected.

◆ deselectPresentation()

void XGUI_SelectionMgr::deselectPresentation ( const  HandlettheObject)

Find all selected owners of the object and remove the owners from selection.

Parameters
theObjectan interactive object

◆ updateSelectionBy()

void XGUI_SelectionMgr::updateSelectionBy ( const ModuleBase_ISelection::SelectionPlace thePlace)

Updates selection, which are depend on the selection in the given place.

Parameters
thePlacea widget where selection has happened.

◆ getSelectedFeatures()

std::list< FeaturePtr > XGUI_SelectionMgr::getSelectedFeatures ( )

Returns list of selected features (ignores other selected objects and parts)

◆ selectionChanged

void XGUI_SelectionMgr::selectionChanged ( )
signal

Emited when selection in a one of viewers was changed.

◆ onObjectBrowserSelection

void XGUI_SelectionMgr::onObjectBrowserSelection ( )
slot

Reaction on selectio0n in Object browser.

◆ onViewerSelection

void XGUI_SelectionMgr::onViewerSelection ( )
slot

Reaction on selectio0n in Viewer.