20 #ifndef XGUI_ISelectionActivate_H
21 #define XGUI_ISelectionActivate_H
25 #include "ModuleBase_Definitions.h"
26 #include "ModuleBase_ISelectionActivate.h"
28 #include "SelectMgr_ListOfFilter.hxx"
67 (
const SelectMgr_ListOfFilter& theSelectionFilters);
75 XGUI_EXPORT
bool isActive(ObjectPtr theObject)
const;
81 XGUI_EXPORT
void activateObjects(
const QIntList& theModes,
const QObjectPtrList& theObjList,
82 const bool theUpdateViewer =
true);
92 const bool theUpdateViewer);
99 const bool theUpdateViewer)
const;
106 const int theMode = -1)
const;
113 const bool theUpdateViewer)
const;
118 XGUI_EXPORT
void deactivate(
const std::shared_ptr<ModelAPI_Object>& theObject,
119 const bool theUpdateViewer);
Represents any object in the data model and in the object browser.
Definition: ModelAPI_Object.h:45
A class which provides interface of activation/deactivate selection modes and using selection filters...
Definition: ModuleBase_ISelectionActivate.h:36
Class which provides access to Workshop object services.
Definition: ModuleBase_IWorkshop.h:48
Displayer.
Definition: XGUI_Displayer.h:172
A class which implements activation/deactivate selection modes and using selection filters.
Definition: XGUI_SelectionActivate.h:41
virtual void updateSelectionFilters()
Updates active selection filters in the viewer depending on the application state.
Definition: XGUI_SelectionActivate.cpp:104
XGUI_Displayer * getDisplayer() const
Returns displayer.
Definition: XGUI_SelectionActivate.cpp:581
SelectionPlace
Types of the activation place.
Definition: XGUI_SelectionActivate.h:44
void activateTrihedron(bool theIsActive)
Set trihedron active (used in selection) or non active.
Definition: XGUI_SelectionActivate.cpp:524
bool isTrihedronActive() const
Returns true if the trihedron should be activated in current selection modes.
Definition: XGUI_SelectionActivate.h:122
XGUI_SelectionActivate(ModuleBase_IWorkshop *theWorkshop)
Constructor.
Definition: XGUI_SelectionActivate.cpp:58
virtual void updateSelectionModes()
Updates active selection modes in the viewer depending on the application state.
Definition: XGUI_SelectionActivate.cpp:78
void deactivateTrihedronInSelectionModes()
Get selection modes of trihedron and deactivate it in it.
Definition: XGUI_SelectionActivate.cpp:558
QIntList activeSelectionModes() const
Returns list of currently active selection modes Selection modes will be returned according to TopAbs...
Definition: XGUI_SelectionActivate.cpp:162
void deactivateAIS(const Handle &&theIO, const int theMode=-1) const
Activate interactive object.
Definition: XGUI_SelectionActivate.cpp:386
AISObjectPtr getDisplayedAISObject(std::shared_ptr< ModelAPI_Object > theObject) const
Returns AIS object displayed in 3D viewer for the given model object.
Definition: XGUI_SelectionActivate.cpp:593
SelectionPlace activeSelectionPlace() const
Returns place of activation modes that now is active.
Definition: XGUI_SelectionActivate.cpp:64
void activateAIS(const Handle &&theIO, const int theMode, const bool theUpdateViewer) const
Activate interactive object.
Definition: XGUI_SelectionActivate.cpp:335
bool activate(const Handle &&theIO, const bool theUpdateViewer) const
Activates the interactive object in the local context.
Definition: XGUI_SelectionActivate.cpp:406
void activateObjects(const QIntList &theModes, const QObjectPtrList &theObjList, const bool theUpdateViewer=true)
Activates in local context displayed outside of the context.
Definition: XGUI_SelectionActivate.cpp:189
QIntList myActiveSelectionModes
Current activated selection modes.
Definition: XGUI_SelectionActivate.h:161
void deactivate(const std::shared_ptr< ModelAPI_Object > &theObject, const bool theUpdateViewer)
Deactivates the given object (not allow selection)
Definition: XGUI_SelectionActivate.cpp:488
void activateOnDisplay(const Handle &&theIO, const bool theUpdateViewer)
Activate object in the selection modes.
Definition: XGUI_SelectionActivate.cpp:322
void deactivateTrihedron(const bool theUpdateViewer) const
Find a trihedron in a list of displayed presentations and deactivate it.
Definition: XGUI_SelectionActivate.cpp:532
bool isActive(ObjectPtr theObject) const
Returns true if the given object can be selected.
Definition: XGUI_SelectionActivate.cpp:173
void setSelectionModes(const QIntList &theModes)
Fill container of current selection modes.
Definition: XGUI_SelectionActivate.cpp:289
virtual void activateSelectionFilters(const SelectMgr_ListOfFilter &theSelectionFilters)
Activates parameter filters in the workshop, deactivate active out of the container Please find a pos...
Definition: XGUI_SelectionActivate.cpp:135
~XGUI_SelectionActivate()
Destructor.
Definition: XGUI_SelectionActivate.h:51
static int getSelectionMode(int theShapeType)
Converts shape type (TopAbs_ShapeEnum) to selection mode.
Definition: XGUI_SelectionActivate.cpp:599
void getSelectionModes(ModuleBase_ModelWidget *theWidget, QIntList &theModes)
Returns selection modes of the widget.
Definition: XGUI_SelectionActivate.cpp:150
bool myIsTrihedronActive
Flag: use trihedgon for selection or not.
Definition: XGUI_SelectionActivate.h:162