18#ifndef PART_RECTANGLE_H
19#define PART_RECTANGLE_H
55 enum {
Type = UserType + 1109 };
61 void paint (QPainter *,
const QStyleOptionGraphicsItem *, QWidget * =
nullptr)
override;
62 QString
name ()
const override {
return(QObject::tr(
"rectangle",
"element part name")); }
64 QString
xmlName ()
const override {
return(QString(
"rect")); }
65 const QDomElement
toXml (QDomDocument &)
const override;
66 void fromXml (
const QDomElement &)
override;
80 QPainterPath
shape ()
const override;
93 QVariant
itemChange(GraphicsItemChange change,
const QVariant &value)
override;
The CustomElementGraphicPart class This class is the base for all home-made primitive like line,...
Definition customelementgraphicpart.h:36
Definition partrectangle.h:31
bool isUseless() const override
PartRectangle::isUseless.
Definition partrectangle.cpp:256
qreal m_old_xRadius
Definition partrectangle.h:112
int m_resize_mode
Definition partrectangle.h:107
void setYRadius(qreal Y)
Definition partrectangle.cpp:166
void handlerMouseReleaseEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event)
Definition partrectangle.cpp:479
QVector< QetGraphicsHandlerItem * > m_handler_vector
Definition partrectangle.h:109
QPainterPath shadowShape() const override
Definition partrectangle.cpp:223
void removeHandler() override
PartRectangle::removeHandler Remove the handlers of this item.
Definition partrectangle.cpp:538
QString xmlName() const override
Definition partrectangle.h:64
QRectF m_old_rect
Definition partrectangle.h:105
QRectF rect
Definition partrectangle.h:34
int m_vector_index
Definition partrectangle.h:108
qreal yRadius
Definition partrectangle.h:36
void handlerMousePressEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event)
PartRectangle::handlerMousePressEvent.
Definition partrectangle.cpp:430
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *=nullptr) override
PartRectangle::paint Draw this Rectangle.
Definition partrectangle.cpp:52
virtual QPointF sceneTopLeft() const
PartRectangle::sceneTopLeft.
Definition partrectangle.cpp:202
const QDomElement toXml(QDomDocument &) const override
PartRectangle::toXml Export this rectangle in xml.
Definition partrectangle.cpp:90
qreal xRadius
Definition partrectangle.h:35
void adjusteHandlerPos()
PartRectangle::adjusteHandlerPos.
Definition partrectangle.cpp:396
QString name() const override
Definition partrectangle.h:62
void setRect(const QRectF &rect)
PartRectangle::setRect Sets the item's rectangle to be the given rectangle.
Definition partrectangle.cpp:149
QPainterPath shape() const override
PartRectangle::shape.
Definition partrectangle.cpp:211
void setRotation(qreal angle)
Definition partrectangle.cpp:174
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override
PartRectangle::itemChange.
Definition partrectangle.cpp:306
void handlerMouseMoveEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event)
PartRectangle::handlerMouseMoveEvent.
Definition partrectangle.cpp:448
qreal XRadius() const
Definition partrectangle.h:70
void addHandler() override
PartRectangle::addHandler Add handlers for this item.
Definition partrectangle.cpp:508
void startUserTransformation(const QRectF &) override
PartRectangle::startUserTransformation Start the user-induced transformation, provided this primitive...
Definition partrectangle.cpp:267
qreal YRadius() const
Definition partrectangle.h:72
QRectF boundingRect() const override
PartRectangle::boundingRect.
Definition partrectangle.cpp:238
@ Type
Definition partrectangle.h:55
int type() const override
Definition partrectangle.h:60
QList< QPointF > saved_points_
Definition partrectangle.h:106
qreal m_rot
Definition partrectangle.h:115
QRectF sceneGeometricRect() const override
PartRectangle::sceneGeometricRect.
Definition partrectangle.cpp:193
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override
PartRectangle::mouseReleaseEvent Handle mouse release event.
Definition partrectangle.cpp:292
qreal m_old_yRadius
Definition partrectangle.h:113
qreal rotation
Definition partrectangle.h:37
void handleUserTransformation(const QRectF &, const QRectF &) override
PartRectangle::handleUserTransformation Handle the user-induced transformation from initial_selection...
Definition partrectangle.cpp:281
void switchResizeMode()
PartRectangle::switchResizeMode.
Definition partrectangle.cpp:363
qreal m_yRadius
Definition partrectangle.h:111
bool sceneEventFilter(QGraphicsItem *watched, QEvent *event) override
PartRectangle::sceneEventFilter.
Definition partrectangle.cpp:326
void fromXml(const QDomElement &) override
PartRectangle::fromXml Import the properties of this rectangle from a xml element.
Definition partrectangle.cpp:121
qreal m_xRadius
Definition partrectangle.h:110
void setXRadius(qreal X)
Definition partrectangle.cpp:158
bool m_modifie_radius_equaly
Definition partrectangle.h:114
QRectF m_rect
Definition partrectangle.h:104
Definition qetelementeditor.h:39
The QetGraphicsHandlerItem class This graphics item represents a point, destined to be used as an han...
Definition qetgraphicshandleritem.h:37