ACF $AcfVersion:0$
CCircleShape.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#include <iview/CPinShape.h>
6
7
8namespace iview
9{
10
11
13{
14public:
17
19
20 virtual bool IsEditableRadius() const;
21 virtual void SetEditableRadius(bool editable = true);
22 virtual bool IsCenterVisible() const;
23 virtual void SetCenterVisible(bool state = true);
24
25 // reimplemented (iview::IMouseActionObserver)
26 virtual bool OnMouseButton(istd::CIndex2d position, Qt::MouseButton buttonType, bool downFlag) override;
27 virtual bool OnMouseMove(istd::CIndex2d position) override;
28
29 // reimplemented (iview::IVisualizable)
30 virtual void Draw(QPainter& drawContext) const override;
31
32 // reimplemented (imod::IObserver)
33 virtual bool OnModelAttached(imod::IModel* modelPtr, istd::IChangeable::ChangeSet& changeMask) override;
34
35 // reimplemented (iview::ITouchable)
36 virtual TouchState IsTouched(istd::CIndex2d position) const override;
37
38protected:
39 // reimplemented (iview::CShapeBase)
40 virtual i2d::CRect CalcBoundingBox() const override;
41
44
50
52};
53
54
55} // namespace iview
56
57
58
59
Simple rectangle with integer bounds.
Definition CRect.h:22
Common interface for model objects, that supports Model/Observer design pattern.
Definition IModel.h:25
Index implementation for addressing elements in 2D-space.
Definition CIndex2d.h:21
Set of change flags (its IDs).
Definition IChangeable.h:36
virtual TouchState IsTouched(istd::CIndex2d position) const override
Check, if any shape is touched.
virtual bool OnMouseButton(istd::CIndex2d position, Qt::MouseButton buttonType, bool downFlag) override
It is called, when mouse button is pushed down or up on this object.
virtual bool IsCenterVisible() const
virtual void Draw(QPainter &drawContext) const override
Draw this shape using draw context.
virtual void SetEditableRadius(bool editable=true)
CInteractiveShapeBase ShapeBaseClass
virtual bool OnMouseMove(istd::CIndex2d position) override
It is called, when mouse is moved.
virtual i2d::CRect CalcBoundingBox() const override
Calculate bounding box.
virtual bool IsEditableRadius() const
virtual void SetCenterVisible(bool state=true)
virtual bool OnModelAttached(imod::IModel *modelPtr, istd::IChangeable::ChangeSet &changeMask) override
Callback invoked when an observable model is about to be attached to this observer.
TouchState
Enumeration for possible shape touch states.
Definition ITouchable.h:25
In this library is defined 2D view concept and standard visualisation objects.