20 #ifndef ModuleBase_ViewerFilters_H
21 #define ModuleBase_ViewerFilters_H
23 #include <QStringList>
25 #include <SelectMgr_Filter.hxx>
26 #include <SelectMgr_EntityOwner.hxx>
28 #include <GeomAPI_Pln.h>
49 myWorkshop(theWorkshop) {}
53 Standard_EXPORT
virtual
54 Standard_Boolean
IsOk(
const Handle(SelectMgr_EntityOwner)& theOwner)
const;
60 if (!myNonSelectableTypes.contains(theType))
61 myNonSelectableTypes.append(theType);
68 if (myNonSelectableTypes.contains(theType))
69 myNonSelectableTypes.removeAll(theType);
75 return myNonSelectableTypes;
84 QStringList myNonSelectableTypes;
102 void setPlane(
const std::shared_ptr<GeomAPI_Pln>& thePlane) { myPlane = thePlane; }
105 std::shared_ptr<GeomAPI_Pln>
plane()
const {
return myPlane; }
109 Standard_EXPORT
virtual
110 Standard_Boolean
IsOk(
const Handle(SelectMgr_EntityOwner)& theOwner)
const;
115 std::shared_ptr<GeomAPI_Pln> myPlane;
Class which provides access to Workshop object services.
Definition: ModuleBase_IWorkshop.h:48
A filter which provides filtering of selection in 3d viewer.
Definition: ModuleBase_ViewerFilters.h:43
virtual Standard_Boolean IsOk(const Handle &&theOwner) const
Returns True if the given owner is acceptable for selection.
Definition: ModuleBase_ViewerFilters.cpp:60
void addNonSelectableType(const QString &theType)
Add an object type name to list of non selectable objects.
Definition: ModuleBase_ViewerFilters.h:58
QStringList nonSelectableTypes() const
Returns list of non-selectable an object type names.
Definition: ModuleBase_ViewerFilters.h:73
void removeNonSelectableType(const QString &theType)
Removes an object type name from list of non selectable objects.
Definition: ModuleBase_ViewerFilters.h:66
ModuleBase_ShapeDocumentFilter(ModuleBase_IWorkshop *theWorkshop)
Constructor.
Definition: ModuleBase_ViewerFilters.h:48
A filter which provides filtering of selection in 3d viewer.
Definition: ModuleBase_ViewerFilters.h:95
void setPlane(const std::shared_ptr< GeomAPI_Pln > &thePlane)
Set working plane.
Definition: ModuleBase_ViewerFilters.h:102
ModuleBase_ShapeInPlaneFilter()
Constructor.
Definition: ModuleBase_ViewerFilters.h:98
std::shared_ptr< GeomAPI_Pln > plane() const
Returns current working plane.
Definition: ModuleBase_ViewerFilters.h:105
virtual Standard_Boolean IsOk(const Handle &&theOwner) const
Returns True if the given owner is acceptable for selection.
Definition: ModuleBase_ViewerFilters.cpp:104