21#include <QAbstractGraphicsShapeItem>
23#include "vectoritem.h"
32 public VectorItem,
public QAbstractGraphicsShapeItem
36 enum {Type = UserType + Arrow
54 ArrowItem(
double x0 = 0,
double y0 = 0,
unsigned color = 0,
55 QGraphicsItem* parent =
nullptr,
double length = 1,
56 bool visible =
true,
bool doubleHeaded =
false,
58 double relSize = 1,
double dir = 0);
70 ArrowItem(
const KConfigGroup* plo,
unsigned color = 0,
71 QGraphicsItem* parent =
nullptr);
79 virtual void paint(QPainter* painter,
const QStyleOptionGraphicsItem* option,
80 QWidget* widget =
nullptr)
override;
105 virtual int type()
const override {
return Type; };
Arrow item class.
Definition arrowitem.h:33
virtual ~ArrowItem()
Destructor.
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=nullptr) override
Paints item.
void setDoubleHeaded(bool b)
Sets doubleheaded mode.
Definition arrowitem.h:87
ArrowItem(const ArrowItem &a)
Copy constructor.
void setPenWidth()
Sets pen width.
void writePlo(KConfigGroup *plo) const
Writes into plot file.
QPixmap pixmap() const
Returns decoration pixmap for item list.
virtual int type() const override
Returns specific QGraphicsItem type number.
Definition arrowitem.h:105
virtual QRectF boundingRect() const override
Calculates bounding rectangle.
Symbol symbol() const
Returns line type.
Definition arrowitem.h:103
bool doubleHeaded() const
Returns true for doubleheaded arrow.
Definition arrowitem.h:77
void setHead()
Sets head shape.
ArrowItem(double x0=0, double y0=0, unsigned color=0, QGraphicsItem *parent=nullptr, double length=1, bool visible=true, bool doubleHeaded=false, Symbol symbol=SolidLine, double relSize=1, double dir=0)
Constructor.
void setProperties()
Sets properties according to transformation matrix.
void update()
Applies changes and forces redrawing.
void setProperties(const QTransform &m)
Sets properties according to transformation matrix.
ArrowItem(const KConfigGroup *plo, unsigned color=0, QGraphicsItem *parent=nullptr)
Constructor.
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override
Updates position.
void setSymbol(Symbol symbol)
Sets line type.
Definition arrowitem.h:101
Symbol
Symbol types.
Definition kplitem.h:83
Vector item class.
Definition vectoritem.h:34