6#ifndef iview_CInteractiveViewLayer_included
7#define iview_CInteractiveViewLayer_included
90 Q_ASSERT(viewPtr !=
nullptr);
99 Q_ASSERT(viewPtr !=
nullptr);
Simple rectangle with integer bounds.
Index implementation for addressing elements in 2D-space.
Set of change flags (its IDs).
virtual int GetUnselectedShapesCount() const
Get number of unselected shapes.
virtual void EndDrag()
Called after dragging.
virtual void DrawShapes(QPainter &drawContext)
Draw all shapes using specified draw context.
IInteractiveShape * GetFirstActiveShape() const
virtual bool IsDraggable() const
Check if drag is enabled.
virtual int GetSelectedShapesCount() const
Get count of selected shapes.
virtual void DisconnectAllShapes()
Disconnect all shapes from this layer.
virtual int GetEditMode() const
Get actual edit mode.
virtual bool ConnectInteractiveShape(IInteractiveShape *shapePtr)
Connect active shape object.
virtual bool OnMouseButton(istd::CIndex2d position, Qt::MouseButton buttonType, bool downFlag)
Called, when mouse button was pushed down or up.
virtual void OnShapeFocused(IInteractiveShape *shapePtr)
Called when shape get focus.
virtual bool OnFocusedMouseMove(istd::CIndex2d position)
Called, when this layer has focus, and mouse was moved.
virtual void DeselectAllShapes()
Set all shapes to be deselected.
virtual void DrawFocusedShape(QPainter &drawContext)
Draw only focused shape.
virtual TouchState IsTouched(istd::CIndex2d position, IInteractiveShape **shapePtrPtr=nullptr) const
Check, if any shape is touched.
virtual bool IsShapeConnected(IShape *shapePtr)
Check, if the shape is connected to the layer.
virtual int GetShapesCount() const
Get count of all shapes on this layer.
virtual void InsertSelectedShapes(SelectedShapes &result) const
Get set of selected shapes.
virtual void BeginDrag(const istd::CIndex2d &reference)
Called before dragging is begin.
virtual bool ConnectShape(IShape *shapePtr)
Connect shape object to view.
i2d::CRect CalcBoundingBox() const
Calculate bounding box for all shapes.
virtual bool OnFocusedMouseButton(istd::CIndex2d position, Qt::MouseButton buttonType, bool downFlag)
Called, when this layer has focus, and mouse button was pushed down or up on this object.
virtual ~CInteractiveViewLayer()
virtual void OnChangeShape(IShape *shapePtr)
Invalidate a shape.
virtual TouchState IsTouched(istd::CIndex2d position) const
Check, if any shape is touched.
virtual void OnShapeSelected(IInteractiveShape &shape, bool state=true)
It is called after change shape selection state.
virtual bool DisconnectShape(IShape *shapePtr)
Disconnect shape object from view.
virtual int GetKeysState() const
Get state of system keys.
virtual i2d::CRect RecalcAllShapes(const istd::IChangeable::ChangeSet &changeSet)
Recalculate all shapes after view changes.
virtual void SetDragPosition(const istd::CIndex2d &position)
Set new drag position.
virtual void OnShapeDefocused(IInteractiveShape *shapePtr)
Called when shape loose focus.
virtual QString GetShapeDescriptionAt(istd::CIndex2d position) const
Get description to shape at specified position.
Standard implementation of view layer.
virtual IShapeView * GetViewPtr() const
Get parent view of this layer.
QVector< ShapeWithBoundingBox > ShapeList
Common interface for all display console shapes which can interacts with user.
virtual int GetKeysState() const =0
Get state of system keys.
QSet< IInteractiveShape * > SelectedShapes
virtual int GetEditMode() const =0
Get actual edit mode.
Common interface for all display console shapes.
Common interface for a general shape view implementations.
TouchState
Enumeration for possible shape touch states.
In this library is defined 2D view concept and standard visualisation objects.