ICF 3.0.5.47
Technical documentation of ICF Libraries
CToolsViewLayer.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#ifndef iview_CToolsViewLayer_included
7#define iview_CToolsViewLayer_included
8
9
10// ICF includes
12#include <iview/CViewLayer.h>
13
14
15namespace iview
16{
17
18
20 public CViewLayer,
21 virtual public ISelectableLayer
22{
23public:
25
26 // reimplemented (iview::ISelectableLayer)
28 virtual int GetUnselectedShapesCount() const;
29 virtual void DrawFocusedShape(QPainter& drawContext);
30 virtual bool OnMouseButton(istd::CIndex2d position, Qt::MouseButton buttonType, bool downFlag);
31 virtual bool OnFocusedMouseButton(istd::CIndex2d position, Qt::MouseButton buttonType, bool downFlag);
32 virtual bool OnFocusedMouseMove(istd::CIndex2d position);
33 virtual TouchState IsTouched(istd::CIndex2d position, IInteractiveShape** shapePtrPtr = nullptr) const;
34
35 // reimplemented (iview::ISelectable)
36 virtual int GetSelectedShapesCount() const;
37 virtual void InsertSelectedShapes(SelectedShapes& result) const;
38 virtual void DeselectAllShapes();
39 virtual int GetKeysState() const;
40 virtual int GetEditMode() const;
41 virtual void OnShapeFocused(IInteractiveShape* shapePtr);
42 virtual void OnShapeDefocused(IInteractiveShape* shapePtr);
43 virtual void OnShapeSelected(IInteractiveShape& shape, bool state = true);
44
45 // reimplemented (iview::ITouchable)
46 virtual TouchState IsTouched(istd::CIndex2d position) const;
47
48 // reimplemented (iview::IDraggable)
49 virtual void BeginDrag(const istd::CIndex2d& reference);
50 virtual void SetDragPosition(const istd::CIndex2d& position);
51 virtual void EndDrag();
52 virtual bool IsDraggable() const;
53};
54
55
56} // namespace iview
57
58
59#endif // !iview_CToolsViewLayer_included
60
61
Index implementation for addressing elements in 2D-space.
Definition CIndex2d.h:25
virtual void DeselectAllShapes()
Set all shapes to be deselected.
virtual void OnShapeSelected(IInteractiveShape &shape, bool state=true)
It is called after change shape selection state.
virtual bool IsDraggable() const
Check if drag is enabled.
virtual bool OnFocusedMouseMove(istd::CIndex2d position)
Called, when this layer has focus, and mouse was moved.
virtual void InsertSelectedShapes(SelectedShapes &result) const
Get set of selected shapes.
virtual TouchState IsTouched(istd::CIndex2d position) const
Check, if any shape is touched.
virtual void OnShapeFocused(IInteractiveShape *shapePtr)
Called when shape get focus.
virtual void BeginDrag(const istd::CIndex2d &reference)
Called before dragging is begin.
virtual void SetDragPosition(const istd::CIndex2d &position)
Set new drag position.
virtual int GetKeysState() const
Get state of system keys.
virtual TouchState IsTouched(istd::CIndex2d position, IInteractiveShape **shapePtrPtr=nullptr) const
Check, if any shape is touched.
virtual void EndDrag()
Called after dragging.
virtual int GetSelectedShapesCount() const
Get count of selected shapes.
virtual bool ConnectInteractiveShape(IInteractiveShape *shapePtr)
Connect active shape object.
virtual void OnShapeDefocused(IInteractiveShape *shapePtr)
Called when shape loose focus.
virtual int GetEditMode() const
Get actual edit mode.
virtual void DrawFocusedShape(QPainter &drawContext)
Draw only focused shape.
virtual int GetUnselectedShapesCount() const
Get number of unselected 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 bool OnMouseButton(istd::CIndex2d position, Qt::MouseButton buttonType, bool downFlag)
Called, when mouse button was pushed down or up.
Standard implementation of view layer.
Definition CViewLayer.h:27
Common interface for all display console shapes which can interacts with user.
QSet< IInteractiveShape * > SelectedShapes
Definition ISelectable.h:29
TouchState
Enumeration for possible shape touch states.
Definition ITouchable.h:30
In this library is defined 2D view concept and standard visualisation objects.

© Witold Gantzke and Kirill Lepskiy