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 = 0,
double length = 1,
bool visible =
true,
56 bool doubleHeaded =
false, Symbol symbol = SolidLine,
57 double relSize = 1,
double dir = 0);
69 ArrowItem(
const KConfigGroup* plo,
unsigned color = 0,
70 QGraphicsItem* parent = 0);
74 virtual QRectF boundingRect()
const;
78 virtual void paint(QPainter* painter,
const QStyleOptionGraphicsItem* option,
95 void setProperties(
const QTransform& m);
100 inline void setSymbol(Symbol symbol) { m_symbol = symbol; };
102 inline Symbol
symbol()
const {
return m_symbol; };
104 virtual int type()
const {
return Type; };
111 void writePlo(KConfigGroup* plo)
const;
115 virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* event);
117 void setProperties();
Symbol symbol() const
Returns line type.
Definition: arrowitem.h:102
void writePlo(KConfigGroup *plo, bool visible) const
Writes into plot file.
void setDoubleHeaded(bool b)
Sets doubleheaded mode.
Definition: arrowitem.h:86
Arrow item class.
Definition: arrowitem.h:31
static QPixmap pixmap(Symbol symbol)
Returns black decoration pixmap of plot symbol for use in dialog GUI.
Vector item class.
Definition: vectoritem.h:33
void setSymbol(Symbol symbol)
Sets line type.
Definition: arrowitem.h:100
virtual int type() const
Returns specific QGraphicsItem type number.
Definition: arrowitem.h:104
bool doubleHeaded() const
Returns true for doubleheaded arrow.
Definition: arrowitem.h:76