1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: ModuleBase_ViewerFilters.h
4 // Created: 07 Okt 2014
5 // Author: Vitaly SMETANNIKOV
8 #ifndef ModuleBase_ViewerFilters_H
9 #define ModuleBase_ViewerFilters_H
11 #include <QStringList>
13 #include <SelectMgr_Filter.hxx>
14 #include <SelectMgr_EntityOwner.hxx>
18 class ModuleBase_IWorkshop;
22 * A filter which provides filtering of selection in 3d viewer.
23 * Installing of this filter lets to select objects which belong to
24 * currently active document or to global document
26 DEFINE_STANDARD_HANDLE(ModuleBase_ShapeDocumentFilter, SelectMgr_Filter);
27 class ModuleBase_ShapeDocumentFilter: public SelectMgr_Filter
30 Standard_EXPORT ModuleBase_ShapeDocumentFilter(ModuleBase_IWorkshop* theWorkshop): SelectMgr_Filter(),
31 myWorkshop(theWorkshop) {}
33 Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const;
35 DEFINE_STANDARD_RTTI(ModuleBase_ShapeDocumentFilter)
38 ModuleBase_IWorkshop* myWorkshop;
42 * A filter which provides filtering of selection in 3d viewer.
43 * Installing of this filter lets to select of Vertexes and Edges which belongs to the given plane
45 DEFINE_STANDARD_HANDLE(ModuleBase_ShapeInPlaneFilter, SelectMgr_Filter);
46 class ModuleBase_ShapeInPlaneFilter: public SelectMgr_Filter
49 Standard_EXPORT ModuleBase_ShapeInPlaneFilter(): SelectMgr_Filter() {}
51 void setPlane(const gp_Pln& thePane) { myPlane = thePane; }
52 gp_Pln plane() const { return myPlane; }
54 Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const;
56 DEFINE_STANDARD_RTTI(ModuleBase_ShapeInPlaneFilter)
63 * A filter which provides filtering of selection in 3d viewer.
64 * Installing of this filter lets to select only object of requested type
66 DEFINE_STANDARD_HANDLE(ModuleBase_ObjectTypesFilter, SelectMgr_Filter);
67 class ModuleBase_ObjectTypesFilter: public ModuleBase_ShapeDocumentFilter
70 Standard_EXPORT ModuleBase_ObjectTypesFilter(ModuleBase_IWorkshop* theWorkshop, const QStringList& theTypes):
71 ModuleBase_ShapeDocumentFilter(theWorkshop), myTypes(theTypes) {}
73 Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const;
75 DEFINE_STANDARD_RTTI(ModuleBase_ObjectTypesFilter)