2 #include "markeritem.h"
8 MarkerItem::MarkerItem(QGraphicsItem
*parent
) : QGraphicsItem(parent
)
13 QRectF
MarkerItem::boundingRect() const
15 return QRectF(-SIZE
/2, -SIZE
/2, SIZE
, SIZE
);
18 void MarkerItem::paint(QPainter
*painter
, const QStyleOptionGraphicsItem
*option
,
24 painter
->setRenderHint(QPainter::Antialiasing
, false);
25 painter
->setPen(QPen(_color
, WIDTH
));
26 painter
->drawLine(-SIZE
/2, 0, SIZE
/2, 0);
27 painter
->drawLine(0, -SIZE
/2, 0, SIZE
/2);
29 // painter->drawRect(boundingRect());
32 void MarkerItem::setColor(const QColor
&color
)