Implementation of ModuleBase_ISelection interface.
More...
|
enum | SelectionPlace { Browser
, Viewer
, AllControls
} |
| Types of the selection place, where the selection is obtained. More...
|
|
Implementation of ModuleBase_ISelection interface.
◆ SelectionPlace
Types of the selection place, where the selection is obtained.
◆ XGUI_Selection()
Constructor.
- Parameters
-
theWorkshop | reference to workshop instance |
◆ getSelected()
QList< ModuleBase_ViewerPrsPtr > XGUI_Selection::getSelected |
( |
const SelectionPlace & |
thePlace = Browser | ) |
const |
|
virtual |
Returns a list of viewer selected presentations.
- Returns
- list of presentations
Implements ModuleBase_ISelection.
◆ fillPresentation()
void XGUI_Selection::fillPresentation |
( |
std::shared_ptr< ModuleBase_ViewerPrs > & |
thePrs, |
|
|
const Handle && |
theOwner |
|
) |
| const |
|
virtual |
Fills the viewer presentation parameters by the parameters from the owner.
- Parameters
-
thePrs | a container for selection |
theOwner | a selection owner |
find axis direction
Implements ModuleBase_ISelection.
◆ getHighlighted()
QList< ModuleBase_ViewerPrsPtr > XGUI_Selection::getHighlighted |
( |
| ) |
const |
|
virtual |
Returns a list of viewer highlited presentations.
- Returns
- list of presentations
Implements ModuleBase_ISelection.
◆ selectedObjects()
QObjectPtrList XGUI_Selection::selectedObjects |
( |
| ) |
const |
|
virtual |
◆ selectedPresentations()
QObjectPtrList XGUI_Selection::selectedPresentations |
( |
| ) |
const |
|
virtual |
◆ selectedIndexes()
QModelIndexList XGUI_Selection::selectedIndexes |
( |
| ) |
const |
|
virtual |
◆ selectedOwners()
void XGUI_Selection::selectedOwners |
( |
SelectMgr_IndexedMapOfOwner & |
theSelectedOwners | ) |
const |
Returns list of currently selected owners.
- Returns
- list of owners
◆ entityOwners()
void XGUI_Selection::entityOwners |
( |
const Handle && |
theObject, |
|
|
SelectMgr_IndexedMapOfOwner & |
theOwners |
|
) |
| const |
Returns a list of selection entity owners of the interactive object It depends on the modes, in which the object is activated in the context.
- Parameters
-
theObject | an object |
theOwners | a map of entity owners |
◆ HandleggetIO()
Return the IO from the viewer presentation.
- Parameters
-
- Returns
- an interactive object
Implements ModuleBase_ISelection.
◆ getSelectableObject()
ObjectPtr XGUI_Selection::getSelectableObject |
( |
const Handle && |
theOwner | ) |
const |
|
protectedvirtual |
Return a selectable object by the entity owner.
It founds AIS object in the viewer and returns the corresponded object
- Parameters
-
- Returns
- a found object or NULL
Implements ModuleBase_ISelection.
◆ getSelectedInViewer()
void XGUI_Selection::getSelectedInViewer |
( |
QList< std::shared_ptr< ModuleBase_ViewerPrs >> & |
thePresentations | ) |
const |
|
protected |
Fills the list of presentations by objects selected in the viewer.
- Parameters
-
thePresentations | an output list of presentation |
◆ getSelectedInBrowser()
void XGUI_Selection::getSelectedInBrowser |
( |
QList< std::shared_ptr< ModuleBase_ViewerPrs >> & |
thePresentations | ) |
const |
|
protected |
Fills the list of presentations by objects selected in the object browser.
ViewerPrs contains only object parameter not empty. If the given list of presentations already has a viewer presentation with the same object as selected in the browser, a new item is not appended to the list of presentations.
- Parameters
-
thePresentations | an output list of presentation |
◆ appendSelected()
The values are appended to the first parameter list if the first list does not contain an item with the same object.
- Parameters
-
theValues | a list of new values |
theValuesTo | a list, that will be changed |
◆ getResult()
ResultPtr ModuleBase_ISelection::getResult |
( |
const std::shared_ptr< ModuleBase_ViewerPrs > & |
thePrs | ) |
|
|
inherited |
Return the shape from the viewer presentation.
If the shape is equal to the shape of selected object, it returns an empty shape
- Parameters
-
- Returns
- a shape
◆ getShape()
GeomShapePtr ModuleBase_ISelection::getShape |
( |
const std::shared_ptr< ModuleBase_ViewerPrs > & |
thePrs | ) |
|
|
inherited |
Return the shape from the viewer presentation.
If the shape is equal to the shape of selected object, it returns an empty shape
- Parameters
-
- Returns
- a shape
◆ getViewerPrs()
QList< ModuleBase_ViewerPrsPtr > ModuleBase_ISelection::getViewerPrs |
( |
const QObjectPtrList & |
theObjects | ) |
|
|
staticinherited |
Wraps the object list into the viewer prs list.
- Parameters
-
theObjects | a list of objects |
- Returns
- a list of prs, where only object is not empty
◆ filterSelectionOnEqualPoints()
void ModuleBase_ISelection::filterSelectionOnEqualPoints |
( |
QList< std::shared_ptr< ModuleBase_ViewerPrs >> & |
theSelected | ) |
|
|
staticinherited |
Removes selection items where owners have equal vertices.
The first owner with the qual vertex stays in the list.