66 virtual void Draw(QPainter& drawContext)
const override;
112 if (linePtr !=
NULL){
Definition of a line in 2D-space.
Simple rectangle with integer bounds.
Definition of position or mathematical vector on 2D plane.
imod::IModel * GetObservedModel() const
Get access to observed model.
Common interface for model objects, that supports Model/Observer design pattern.
Index implementation for addressing elements in 2D-space.
Set of change flags (its IDs).
virtual void BeginLogDrag(const i2d::CVector2d &reference) override
CInteractiveShapeBase BaseClass
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.
void SetLineDisplayMode(int mode)
Set display mode of this line.
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 InvalidateBoundingBox() override
Invalidate bounding box.
virtual TouchState IsTouched(istd::CIndex2d position) const override
Check, if any shape is touched.
int GetLineDisplayMode() const
Get displayed of line.
double GetMaxArrowLineLength() const
Get maximal length of arrow lines.
void SetArrowLinesProportion(double value)
Set proportion of arrow side lines to line length.
void SetMaxArrowLineLength(double value)
Set maximal length of arrow lines.
virtual bool OnMouseMove(istd::CIndex2d position) override
It is called, when mouse is moved.
void CalcPoints(const i2d::CLine2d &line) const
void EnsurePointsAreValid() const
double GetArrowLinesProportion() const
Get proportion of arrow side lines to line length.
istd::CIndex2d m_points[4]
static bool CheckLine(const istd::CIndex2d &firstPoint, const istd::CIndex2d &secondPoint, const istd::CIndex2d &point, double maxDistance)
double m_arrowLinesProportion
virtual void Draw(QPainter &drawContext) const override
Draw this shape using draw context.
i2d::CVector2d m_referencePosition
virtual void SetLogDragPosition(const i2d::CVector2d &position) override
double m_maxArrowLineLength
virtual i2d::CRect CalcBoundingBox() const override
Calculate bounding box.
TouchState
Enumeration for possible shape touch states.
In this library is defined 2D view concept and standard visualisation objects.