ACF $AcfVersion:0$
CAnnulusSegmentShape.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
6
7
8namespace iview
9{
10
11
13{
14public:
17
19
20 virtual bool IsEditableAngles() const;
21 virtual void SetEditableAngles(bool editable = true);
22
23 // reimplemented (iview::IMouseActionObserver)
24 virtual bool OnMouseButton(istd::CIndex2d position, Qt::MouseButton buttonType, bool downFlag) override;
25 virtual bool OnMouseMove(istd::CIndex2d position) override;
26
27 // reimplemented (iview::IVisualizable)
28 virtual void Draw(QPainter& drawContext) const override;
29
30 // reimplemented (imod::IObserver)
31 virtual bool OnModelAttached(imod::IModel* modelPtr, istd::IChangeable::ChangeSet& changeMask) override;
32
33 // reimplemented (iview::ITouchable)
34 virtual TouchState IsTouched(istd::CIndex2d position) const override;
35
36protected:
37 virtual void DrawArea(
38 QPainter& painter,
39 i2d::CVector2d realCenter,
40 i2d::CVector2d center,
41 double realMinRadius,
42 double realMaxRadius,
43 int minRadius,
44 int maxRadius,
45 double startAngle,
46 double stopAngle,
47 bool fillFlag = true) const;
48
49 double GetDegreeAndleOfPoint(const i2d::CVector2d& center, const QPointF& point) const;
50
52
58};
59
60
62{
63 return m_editableAngle;
64}
65
66
67} // namespace iview
68
69
70
Definition of position or mathematical vector on 2D plane.
Definition CVector2d.h:29
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 bool OnModelAttached(imod::IModel *modelPtr, istd::IChangeable::ChangeSet &changeMask) override
Callback invoked when an observable model is about to be attached to this observer.
virtual void SetEditableAngles(bool editable=true)
virtual void Draw(QPainter &drawContext) const override
Draw this shape using draw context.
CInteractiveShapeBase ShapeBaseClass
virtual TouchState IsTouched(istd::CIndex2d position) const override
Check, if any shape is touched.
double GetDegreeAndleOfPoint(const i2d::CVector2d &center, const QPointF &point) const
virtual bool IsEditableAngles() const
virtual bool OnMouseMove(istd::CIndex2d position) override
It is called, when mouse is moved.
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 void DrawArea(QPainter &painter, i2d::CVector2d realCenter, i2d::CVector2d center, double realMinRadius, double realMaxRadius, int minRadius, int maxRadius, double startAngle, double stopAngle, bool fillFlag=true) const
TouchState
Enumeration for possible shape touch states.
Definition ITouchable.h:25
In this library is defined 2D view concept and standard visualisation objects.