35 SIGNAL(graphicsSceneClicked(
const QPointF&)),
44 prepareGeometryChange();
45 this->boundingBox = boundingBox;
61 this->penColor = penColor;
69 this->pixmap = pixmap;
84 const QStyleOptionGraphicsItem*
option,
89 QBrush penBrush(penColor);
90 QPen pen(penBrush, 3, Qt::SolidLine, Qt::FlatCap, Qt::RoundJoin);
92 QBrush brush(Qt::lightGray);
97 painter->setBrush(brush);
101 painter->setBrush(Qt::NoBrush);
104 painter->drawEllipse(boundingBox);
108 if (text.length() > 0)
110 QPen pen(Qt::black, 1, Qt::SolidLine, Qt::FlatCap, Qt::RoundJoin);
111 painter->setPen(pen);
112 painter->drawText(boundingBox, Qt::AlignCenter, text);
120 QRect bbPixmap(boundingBox.center().x() - boundingBox.width() / 4,
121 boundingBox.center().y() - boundingBox.height() / 4,
122 boundingBox.width() / 2,
123 boundingBox.height() / 2);
124 painter->drawPixmap(bbPixmap, pixmap);
156 QPointF inLocal = point - scenePos();