ACF $AcfVersion:0$
IViewLayer.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5// ACF includes
6#include <iview/IDisplay.h>
7#include <iview/ITouchable.h>
8
9
10class QPainter;
11
12
13namespace iview
14{
15
16class IShape;
17class IShapeView;
18
19
25 virtual public IDisplay,
26 virtual public ITouchable
27{
28public:
61
62 typedef QList<IShape*> Shapes;
63
67 virtual void OnConnectView(IShapeView* viewPtr) = 0;
68
72 virtual void OnDisconnectView(IShapeView* viewPtr) = 0;
73
78 virtual IShapeView* GetViewPtr() const = 0;
79
83 virtual bool IsShapeConnected(IShape* shapePtr) = 0;
84
91 virtual bool ConnectShape(IShape* shapePtr) = 0;
92
96 virtual int GetShapesCount() const = 0;
97
101 virtual Shapes GetShapes() const = 0;
102
106 virtual void UpdateAllShapes(const istd::IChangeable::ChangeSet& changeSet) = 0;
107
111 virtual void DisconnectAllShapes() = 0;
112
116 virtual void DrawShapes(QPainter& drawContext) = 0;
117
121 virtual bool IsVisible() const = 0;
122
126 virtual void SetVisible(bool state = true) = 0;
127};
128
129
130} // namespace iview
131
132
133
134
Set of change flags (its IDs).
Definition IChangeable.h:36
Common interface for all display console shapes.
Definition IShape.h:32
Common interface for a general shape view implementations.
Definition IShapeView.h:30
This interface describes all untransparent GUI objects, which can be touched.
Definition ITouchable.h:18
Interface for a logical layer in the console view.
Definition IViewLayer.h:27
virtual int GetShapesCount() const =0
Get count of all shapes on this layer.
virtual void UpdateAllShapes(const istd::IChangeable::ChangeSet &changeSet)=0
Send update to all shapes after view changes.
virtual IShapeView * GetViewPtr() const =0
Get parent view of this layer.
virtual void DisconnectAllShapes()=0
Disconnect all shapes from this layer.
virtual void DrawShapes(QPainter &drawContext)=0
Draw all shapes using specified draw context.
virtual bool IsShapeConnected(IShape *shapePtr)=0
Check, if the shape is connected to the layer.
QList< IShape * > Shapes
Definition IViewLayer.h:62
virtual bool ConnectShape(IShape *shapePtr)=0
Connect shape object to view.
virtual Shapes GetShapes() const =0
Get all shapes on this layer.
virtual void SetVisible(bool state=true)=0
Make this layer visible.
virtual void OnConnectView(IShapeView *viewPtr)=0
Called after layer is connected to view.
@ LT_BACKGROUND
Background layer.
Definition IViewLayer.h:39
@ LT_NONE
Layer type is not set.
Definition IViewLayer.h:34
@ LT_INACTIVE
Layer with inactive shapes.
Definition IViewLayer.h:44
@ LT_ACTIVE
Layer with active shapes.
Definition IViewLayer.h:49
@ LT_CALIBRATION
Calibration layer.
Definition IViewLayer.h:54
@ LT_TOOLS
Tools layer.
Definition IViewLayer.h:59
virtual void OnDisconnectView(IShapeView *viewPtr)=0
Called before layer is disconnected from view.
virtual bool IsVisible() const =0
Check, if this layer is visible.
In this library is defined 2D view concept and standard visualisation objects.