]> SALOME platform Git repositories - modules/shaper.git/blob - src/XGUI/XGUI_Displayer.h
Salome HOME
Merge branch 'master' of newgeom:newgeom
[modules/shaper.git] / src / XGUI / XGUI_Displayer.h
1 // File:        XGUI_Displayer.h
2 // Created:     20 Apr 2014
3 // Author:      Natalia ERMOLAEVA
4
5 #ifndef XGUI_Displayer_H
6 #define XGUI_Displayer_H
7
8 #include "XGUI.h"
9
10 #include <QString>
11 #include <boost/shared_ptr.hpp>
12
13 #include <TopoDS_Shape.hxx>
14
15 class XGUI_Viewer;
16 class ModelAPI_Feature;
17
18 /**\class XGUI_Displayer
19  * \ingroup GUI
20  * \brief Displayer. Provides mechanizm of display/erase of objects in the viewer
21  */
22 class XGUI_EXPORT XGUI_Displayer
23 {
24 public:
25   /// Constructor
26   /// \param theViewer the viewer
27   XGUI_Displayer(XGUI_Viewer* theViewer);
28   /// Destructor
29   virtual ~XGUI_Displayer();
30
31   /// Display the feature. Obtain the visualized object from the feature.
32   /// \param theFeature a feature instance
33   void Display(boost::shared_ptr<ModelAPI_Feature> theFeature);
34
35   /// Display the feature and a shape. This shape would be associated to the given feature
36   /// \param theFeature a feature instance
37   /// \param theFeature a shape
38   void Display(boost::shared_ptr<ModelAPI_Feature> theFeature, const TopoDS_Shape& theShape);
39
40   /// Erase the feature and a shape.
41   /// \param theFeature a feature instance
42   /// \param theFeature a shape
43   void Erase(boost::shared_ptr<ModelAPI_Feature> theFeature, const TopoDS_Shape& theShape);
44
45 protected:
46   XGUI_Viewer* myViewer; ///< the viewer where the objects should be visualized
47 };
48
49 #endif