18 #ifndef PART_RECTANGLE_H 19 #define PART_RECTANGLE_H 53 enum {
Type = UserType + 1109 };
59 void paint (QPainter *,
const QStyleOptionGraphicsItem *, QWidget * =
nullptr)
override;
60 QString
name ()
const override {
return(
QObject::tr(
"rectangle",
"element part name")); }
62 QString
xmlName ()
const override {
return(QString(
"rect")); }
63 const QDomElement
toXml (QDomDocument &)
const override;
64 void fromXml (
const QDomElement &)
override;
76 QPainterPath
shape ()
const override;
86 QVariant
itemChange(GraphicsItemChange change,
const QVariant &value)
override;
void sceneSelectionChanged()
PartRectangle::sceneSelectionChanged When the scene selection change, if there are several primitive ...
void adjusteHandlerPos()
PartRectangle::adjusteHandlerPos.
virtual QPointF sceneTopLeft() const
PartRectangle::sceneTopLeft.
void handlerMouseReleaseEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event)
bool m_modifie_radius_equaly
QRectF boundingRect() const override
PartRectangle::boundingRect.
const QDomElement toXml(QDomDocument &) const override
PartRectangle::toXml Export this rectangle in xml.
The QetGraphicsHandlerItem class This graphics item represents a point, destined to be used as an han...
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *=nullptr) override
PartRectangle::paint Draw this Rectangle.
QPainterPath shape() const override
PartRectangle::shape.
bool sceneEventFilter(QGraphicsItem *watched, QEvent *event) override
PartRectangle::sceneEventFilter.
void setRect(const QRectF &rect)
PartRectangle::setRect Sets the item's rectangle to be the given rectangle.
The CustomElementGraphicPart class This class is the base for all home-made primitive like line...
void handlerMouseMoveEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event)
PartRectangle::handlerMouseMoveEvent.
void addHandler()
PartRectangle::addHandler Add handlers for this item.
QList< QPointF > saved_points_
void fromXml(const QDomElement &) override
PartRectangle::fromXml Import the properties of this rectangle from a xml element.
void handleUserTransformation(const QRectF &, const QRectF &) override
PartRectangle::handleUserTransformation Handle the user-induced transformation from initial_selection...
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override
PartRectangle::mouseReleaseEvent Handle mouse release event.
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override
PartRectangle::itemChange.
void removeHandler()
PartRectangle::removeHandler Remove the handlers of this item.
QPainterPath shadowShape() const override
bool isUseless() const override
PartRectangle::isUseless.
QString name() const override
int type() const override
QString xmlName() const override
QVector< QetGraphicsHandlerItem * > m_handler_vector
QRectF sceneGeometricRect() const override
PartRectangle::sceneGeometricRect.
void handlerMousePressEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event)
PartRectangle::handlerMousePressEvent.
void switchResizeMode()
PartRectangle::switchResizeMode.
void startUserTransformation(const QRectF &) override
PartRectangle::startUserTransformation Start the user-induced transformation, provided this primitive...