IViewLayer.h
Go to the documentation of this file.
1 #ifndef iview_IViewLayer_included
2 #define iview_IViewLayer_included
3 
4 
5 // ACF includes
6 #include <iview/IDisplay.h>
7 #include <iview/ITouchable.h>
8 
9 
10 class QPainter;
11 
12 
13 namespace iview
14 {
15 
16 class IShape;
17 class IShapeView;
18 
19 
24 class IViewLayer:
25  virtual public IDisplay,
26  virtual public ITouchable
27 {
28 public:
29  enum LayerType
30  {
35 
40 
45 
50 
55  };
56 
60  virtual void OnConnectView(IShapeView* viewPtr) = 0;
61 
65  virtual void OnDisconnectView(IShapeView* viewPtr) = 0;
66 
71  virtual IShapeView* GetViewPtr() const = 0;
72 
76  virtual bool IsShapeConnected(IShape* shapePtr) = 0;
77 
84  virtual bool ConnectShape(IShape* shapePtr) = 0;
85 
89  virtual int GetShapesCount() const = 0;
90 
94  virtual void UpdateAllShapes(const istd::IChangeable::ChangeSet& changeSet) = 0;
95 
99  virtual void DisconnectAllShapes() = 0;
100 
104  virtual void DrawShapes(QPainter& drawContext) = 0;
105 
109  virtual bool IsVisible() const = 0;
110 
114  virtual void SetVisible(bool state = true) = 0;
115 };
116 
117 
118 } // namespace iview
119 
120 
121 #endif // !iview_IViewLayer_included
122 
123 
Interface for a logical layer in the console view.
Definition: IViewLayer.h:24
virtual bool ConnectShape(IShape *shapePtr)=0
Connect shape object to view.
Common interface for a general shape view implementations.
Definition: IShapeView.h:24
virtual void DisconnectAllShapes()=0
Disconnect all shapes from this layer.
virtual void DrawShapes(QPainter &drawContext)=0
Draw all shapes using specified draw context.
Layer with active shapes.
Definition: IViewLayer.h:49
virtual void UpdateAllShapes(const istd::IChangeable::ChangeSet &changeSet)=0
Send update to all shapes after view changes.
virtual void SetVisible(bool state=true)=0
Make this layer visible.
virtual IShapeView * GetViewPtr() const =0
Get parent view of this layer.
Common interface for all display console shapes.
Definition: IShape.h:27
virtual int GetShapesCount() const =0
Get count of all shapes on this layer.
This interface describes all untransparent GUI objects, which can be touched.
Definition: ITouchable.h:17
Set of change flags (its IDs).
Definition: IChangeable.h:30
virtual bool IsShapeConnected(IShape *shapePtr)=0
Check, if the shape is connected to the layer.
Layer with inactive shapes.
Definition: IViewLayer.h:44
virtual bool IsVisible() const =0
Check, if this layer is visible.
Layer type is not set.
Definition: IViewLayer.h:34
virtual void OnConnectView(IShapeView *viewPtr)=0
Called after layer is connected to view.
virtual void OnDisconnectView(IShapeView *viewPtr)=0
Called before layer is disconnected from view.

© 2007-2017 Witold Gantzke and Kirill Lepskiy