17#include <QGraphicsItem>
20const double PI = 3.14159265;
28 QArrow(qreal l, qreal a, qreal hl, qreal hw, QPen& pen,
29 QGraphicsItem* parent =
nullptr);
30 QArrow(qreal l, qreal a, QPen& pen, QGraphicsItem* parent =
nullptr);
35 void paint(QPainter* painter,
const QStyleOptionGraphicsItem* option,
36 QWidget* widget)
override;
An arrow as a QGraphicsObject.
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
void setLength(qreal l)
Changes the length of the arrow.
QArrow(qreal l, qreal a, qreal hl, qreal hw, QPen &pen, QGraphicsItem *parent=nullptr)
QRectF boundingRect() const override
The bounding box of the arrow.
double getLength()
Returns the length of the arrow.
double calcSin(double angle)
double calcCos(double angle)
double getAngle()
Returns the orientation of the arrow.
void setAngle(qreal a)
Changes orientation of the arrow.