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 * \class ModuleBase_ShapeDocumentFilter
24 * A filter which provides filtering of selection in 3d viewer.
25 * Installing of this filter lets to select objects which belong to
26 * currently active document or to global document
28 DEFINE_STANDARD_HANDLE(ModuleBase_ShapeDocumentFilter, SelectMgr_Filter);
29 class ModuleBase_ShapeDocumentFilter: public SelectMgr_Filter
33 /// \param theWorkshop instance of workshop interface
34 Standard_EXPORT ModuleBase_ShapeDocumentFilter(ModuleBase_IWorkshop* theWorkshop): SelectMgr_Filter(),
35 myWorkshop(theWorkshop) {}
37 /// Returns True if the given owner is acceptable for selection
38 /// \param theOwner the selected owner
39 Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const;
41 DEFINE_STANDARD_RTTI(ModuleBase_ShapeDocumentFilter)
44 /// Reference to workshop
45 ModuleBase_IWorkshop* myWorkshop;
49 * \class ModuleBase_ShapeInPlaneFilter
51 * A filter which provides filtering of selection in 3d viewer.
52 * Installing of this filter lets to select of Vertexes and Edges which belongs to the given plane
54 DEFINE_STANDARD_HANDLE(ModuleBase_ShapeInPlaneFilter, SelectMgr_Filter);
55 class ModuleBase_ShapeInPlaneFilter: public SelectMgr_Filter
59 Standard_EXPORT ModuleBase_ShapeInPlaneFilter(): SelectMgr_Filter() {}
62 /// \param thePane plane object
63 void setPlane(const gp_Pln& thePane) { myPlane = thePane; }
65 /// Returns current working plane
66 gp_Pln plane() const { return myPlane; }
68 /// Returns True if the given owner is acceptable for selection
69 /// \param theOwner the selected owner
70 Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const;
72 DEFINE_STANDARD_RTTI(ModuleBase_ShapeInPlaneFilter)