ACF $AcfVersion:0$
CToolsViewLayer.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
7#include <iview/CViewLayer.h>
8
9
10namespace iview
11{
12
13
15 public CViewLayer,
16 virtual public ISelectableLayer
17{
18public:
20
21 // reimplemented (iview::ISelectableLayer)
22 virtual bool ConnectInteractiveShape(IInteractiveShape* shapePtr) override;
23 virtual int GetUnselectedShapesCount() const override;
24 virtual void DrawFocusedShape(QPainter& drawContext) override;
25 virtual bool OnKeyPress(int key, Qt::KeyboardModifiers modifiers) override;
26 virtual bool OnMouseButton(istd::CIndex2d position, Qt::MouseButton buttonType, bool downFlag) override;
27 virtual bool OnFocusedMouseButton(istd::CIndex2d position, Qt::MouseButton buttonType, bool downFlag) override;
28 virtual bool OnFocusedMouseMove(istd::CIndex2d position) override;
29 virtual TouchState IsTouched(istd::CIndex2d position, IInteractiveShape** shapePtrPtr = NULL) const override;
30
31 // reimplemented (iview::ISelectable)
32 virtual int GetSelectedShapesCount() const override;
33 virtual void InsertSelectedShapes(SelectedShapes& result) const override;
34 virtual void DeselectAllShapes() override;
35 virtual int GetKeysState() const override;
36 virtual int GetEditMode() const override;
37 virtual int GetDisplayMode() const override;
38 virtual void OnShapeFocused(IInteractiveShape* shapePtr) override;
39 virtual void OnShapeDefocused(IInteractiveShape* shapePtr) override;
40 virtual void OnShapeSelected(IInteractiveShape& shape, bool state = true) override;
41
42 // reimplemented (iview::ITouchable)
43 virtual TouchState IsTouched(istd::CIndex2d position) const override;
44
45 // reimplemented (iview::IDraggable)
46 virtual void BeginDrag(const istd::CIndex2d& reference) override;
47 virtual void SetDragPosition(const istd::CIndex2d& position) override;
48 virtual void EndDrag() override;
49 virtual bool IsDraggable() const override;
50};
51
52
53} // namespace iview
54
55
56
57
Index implementation for addressing elements in 2D-space.
Definition CIndex2d.h:21
virtual int GetKeysState() const override
Get state of system keys.
virtual int GetDisplayMode() const override
Get actual display mode.
virtual int GetEditMode() const override
Get actual edit mode.
virtual void EndDrag() override
Called after dragging.
virtual void DrawFocusedShape(QPainter &drawContext) override
Draw only focused shape.
virtual void OnShapeDefocused(IInteractiveShape *shapePtr) override
Called when shape loose focus.
virtual void SetDragPosition(const istd::CIndex2d &position) override
Set new drag position.
virtual void OnShapeFocused(IInteractiveShape *shapePtr) override
Called when shape get focus.
virtual bool OnKeyPress(int key, Qt::KeyboardModifiers modifiers) override
Called, when key has been pressed.
virtual bool IsDraggable() const override
Check if drag is enabled.
virtual void DeselectAllShapes() override
Set all shapes to be deselected.
virtual bool ConnectInteractiveShape(IInteractiveShape *shapePtr) override
Connect active shape object.
virtual void OnShapeSelected(IInteractiveShape &shape, bool state=true) override
It is called after change shape selection state.
virtual void InsertSelectedShapes(SelectedShapes &result) const override
Get set of selected shapes.
virtual TouchState IsTouched(istd::CIndex2d position) const override
Check, if any shape is touched.
virtual TouchState IsTouched(istd::CIndex2d position, IInteractiveShape **shapePtrPtr=NULL) const override
Check, if any shape is touched.
virtual bool OnFocusedMouseMove(istd::CIndex2d position) override
Called, when this layer has focus, and mouse was moved.
virtual bool OnFocusedMouseButton(istd::CIndex2d position, Qt::MouseButton buttonType, bool downFlag) override
Called, when this layer has focus, and mouse button was pushed down or up on this object.
virtual bool OnMouseButton(istd::CIndex2d position, Qt::MouseButton buttonType, bool downFlag) override
Called, when mouse button was pushed down or up.
virtual int GetSelectedShapesCount() const override
Get count of selected shapes.
virtual int GetUnselectedShapesCount() const override
Get number of unselected shapes.
virtual void BeginDrag(const istd::CIndex2d &reference) override
Called before dragging is begin.
Standard implementation of view layer.
Definition CViewLayer.h:22
Common interface for all display console shapes which can interacts with user.
QSet< IInteractiveShape * > SelectedShapes
Definition ISelectable.h:23
TouchState
Enumeration for possible shape touch states.
Definition ITouchable.h:25
#define NULL
Definition istd.h:74
In this library is defined 2D view concept and standard visualisation objects.