|
SHAPER
9.15.0
|
A class which implements activation/deactivate selection modes and using selection filters. More...

Public Types | |
| enum | SelectionPlace { Workshop , PropertyPanel , FacesPanel } |
| Types of the activation place. More... | |
Public Member Functions | |
| XGUI_SelectionActivate (ModuleBase_IWorkshop *theWorkshop) | |
| Constructor. More... | |
| ~XGUI_SelectionActivate () | |
| Destructor. More... | |
| SelectionPlace | activeSelectionPlace () const |
| Returns place of activation modes that now is active. More... | |
| virtual void | updateSelectionModes () |
| Updates active selection modes in the viewer depending on the application state. More... | |
| virtual void | updateSelectionFilters () |
| Updates active selection filters in the viewer depending on the application state. More... | |
| virtual void | activateSelectionFilters (const SelectMgr_ListOfFilter &theSelectionFilters) |
| Activates parameter filters in the workshop, deactivate active out of the container Please find a possibility to use updateSelectionFilters instead of direct call this method. More... | |
| QIntList | activeSelectionModes () const |
| Returns list of currently active selection modes Selection modes will be returned according to TopAbs_ShapeEnum. More... | |
| bool | isActive (ObjectPtr theObject) const |
| Returns true if the given object can be selected. More... | |
| void | activateObjects (const QIntList &theModes, const QObjectPtrList &theObjList, const bool theUpdateViewer=true) |
| Activates in local context displayed outside of the context. More... | |
| void | setSelectionModes (const QIntList &theModes) |
| Fill container of current selection modes. More... | |
| void | activateOnDisplay (const Handle &&theIO, const bool theUpdateViewer) |
| Activate object in the selection modes. More... | |
| void | activateAIS (const Handle &&theIO, const int theMode, const bool theUpdateViewer) const |
| Activate interactive object. More... | |
| void | deactivateAIS (const Handle &&theIO, const int theMode=-1) const |
| Activate interactive object. More... | |
| bool | activate (const Handle &&theIO, const bool theUpdateViewer) const |
| Activates the interactive object in the local context. More... | |
| void | deactivate (const std::shared_ptr< ModelAPI_Object > &theObject, const bool theUpdateViewer) |
| Deactivates the given object (not allow selection) More... | |
| bool | isTrihedronActive () const |
| Returns true if the trihedron should be activated in current selection modes. More... | |
| void | activateTrihedron (bool theIsActive) |
| Set trihedron active (used in selection) or non active. More... | |
| void | deactivateTrihedron (const bool theUpdateViewer) const |
| Find a trihedron in a list of displayed presentations and deactivate it. More... | |
| void | deactivateTrihedronInSelectionModes () |
| Get selection modes of trihedron and deactivate it in it. More... | |
Protected Member Functions | |
| void | getSelectionModes (ModuleBase_ModelWidget *theWidget, QIntList &theModes) |
| Returns selection modes of the widget. More... | |
| HandleggetTrihedron () const | |
| Returns Trihedron object if it is displayed. More... | |
| HandleAAISContext () const | |
| Returns context of the 3D viewer. More... | |
| XGUI_Displayer * | getDisplayer () const |
| Returns displayer. More... | |
| AISObjectPtr | getDisplayedAISObject (std::shared_ptr< ModelAPI_Object > theObject) const |
| Returns AIS object displayed in 3D viewer for the given model object. More... | |
Static Protected Member Functions | |
| static int | getSelectionMode (int theShapeType) |
| Converts shape type (TopAbs_ShapeEnum) to selection mode. More... | |
Protected Attributes | |
| QIntList | myActiveSelectionModes |
| Current activated selection modes. More... | |
| bool | myIsTrihedronActive |
| Flag: use trihedgon for selection or not. More... | |
| ModuleBase_IWorkshop * | myWorkshop |
| active workshop More... | |
A class which implements activation/deactivate selection modes and using selection filters.
Types of the activation place.
| XGUI_SelectionActivate::XGUI_SelectionActivate | ( | ModuleBase_IWorkshop * | theWorkshop | ) |
Constructor.
|
inline |
Destructor.
| XGUI_SelectionActivate::SelectionPlace XGUI_SelectionActivate::activeSelectionPlace | ( | ) | const |
Returns place of activation modes that now is active.
|
virtual |
Updates active selection modes in the viewer depending on the application state.
Implements ModuleBase_ISelectionActivate.
|
virtual |
Updates active selection filters in the viewer depending on the application state.
Implements ModuleBase_ISelectionActivate.
|
virtual |
Activates parameter filters in the workshop, deactivate active out of the container Please find a possibility to use updateSelectionFilters instead of direct call this method.
| theSelectionFilters | a filtes |
Implements ModuleBase_ISelectionActivate.
| QIntList XGUI_SelectionActivate::activeSelectionModes | ( | ) | const |
Returns list of currently active selection modes Selection modes will be returned according to TopAbs_ShapeEnum.
| bool XGUI_SelectionActivate::isActive | ( | ObjectPtr | theObject | ) | const |
Returns true if the given object can be selected.
| theObject | object to check |
| void XGUI_SelectionActivate::activateObjects | ( | const QIntList & | theModes, |
| const QObjectPtrList & | theObjList, | ||
| const bool | theUpdateViewer = true |
||
| ) |
Activates in local context displayed outside of the context.
| theModes | - modes on which it has to be activated (can be empty) |
| theObjList | - list of objects which has to be activated. |
| theUpdateViewer | an update viewer flag |
| void XGUI_SelectionActivate::setSelectionModes | ( | const QIntList & | theModes | ) |
Fill container of current selection modes.
| theModes | selection modes |
| void XGUI_SelectionActivate::activateOnDisplay | ( | const Handle && | theIO, |
| const bool | theUpdateViewer | ||
| ) |
Activate object in the selection modes.
| theIO | an object |
| theUpdateViewer | an update viewer flag |
| void XGUI_SelectionActivate::activateAIS | ( | const Handle && | theIO, |
| const int | theMode, | ||
| const bool | theUpdateViewer | ||
| ) | const |
Activate interactive object.
| theIO | an interactive object |
| theMode | activation mode |
| theUpdateViewer | update viewer flag |
| void XGUI_SelectionActivate::deactivateAIS | ( | const Handle && | theIO, |
| const int | theMode = -1 |
||
| ) | const |
Activate interactive object.
It is necessary to call ClearOutdatedSelection after deactivation
| theIO | an interactive object |
| theMode | a mode to deactivate. When theMode=-1 then all modes will be deactivated |
| bool XGUI_SelectionActivate::activate | ( | const Handle && | theIO, |
| const bool | theUpdateViewer | ||
| ) | const |
Activates the interactive object in the local context.
| theIO | an interactive object |
| theUpdateViewer | the parameter whether the viewer should be updated immediately |
| void XGUI_SelectionActivate::deactivate | ( | const std::shared_ptr< ModelAPI_Object > & | theObject, |
| const bool | theUpdateViewer | ||
| ) |
Deactivates the given object (not allow selection)
| theObject | object to deactivate |
| theUpdateViewer | the parameter whether the viewer should be updated immediately |
|
inline |
Returns true if the trihedron should be activated in current selection modes.
| void XGUI_SelectionActivate::activateTrihedron | ( | bool | theIsActive | ) |
Set trihedron active (used in selection) or non active.
#1136 hidden axis are selected in sketch
| void XGUI_SelectionActivate::deactivateTrihedron | ( | const bool | theUpdateViewer | ) | const |
Find a trihedron in a list of displayed presentations and deactivate it.
| theUpdateViewer | the parameter whether the viewer should be updated immediately |
#1136 hidden axis are selected in sketch
| void XGUI_SelectionActivate::deactivateTrihedronInSelectionModes | ( | ) |
Get selection modes of trihedron and deactivate it in it.
deactivate trihedron in selection modes
|
protected |
Returns selection modes of the widget.
| theWidget | model widget |
| theModes | selection modes |
|
protected |
Returns Trihedron object if it is displayed.
|
protected |
Returns context of the 3D viewer.
|
protected |
Returns displayer.
|
protected |
Returns AIS object displayed in 3D viewer for the given model object.
| theObject | source object |
|
staticprotected |
Converts shape type (TopAbs_ShapeEnum) to selection mode.
| theShapeType | a shape type from TopAbs_ShapeEnum |
|
protected |
Current activated selection modes.
|
protected |
Flag: use trihedgon for selection or not.
|
protectedinherited |
active workshop