43 enum {
Type = UserType + 1101 };
49 void paint(QPainter *,
const QStyleOptionGraphicsItem *, QWidget * =
nullptr)
override;
52 QString
name()
const override {
return(
QObject::tr(
"arc",
"element part name")); }
53 QString
xmlName()
const override {
return(QString(
"arc")); }
54 const QDomElement
toXml (QDomDocument &)
const override;
55 void fromXml (
const QDomElement &)
override;
57 QPainterPath
shape()
const override;
65 QVariant
itemChange(GraphicsItemChange change,
const QVariant &value)
override;
void fromXml(const QDomElement &) override
PartArc::fromXml Import the properties of this arc from a xml element.
The QPropertyUndoCommand class This undo command manage QProperty of a QObject. This undo command can...
void setRect(const QRectF &rect) override
AbstractPartEllipse::setRect Sets the item's ellipse geometry to rect. The rectangle's left edge defi...
The QetGraphicsHandlerItem class This graphics item represents a point, destined to be used as an han...
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override
PartArc::mouseReleaseEvent Handle mouse release event.
void setStartAngle(const int &start_angle) override
AbstractPartEllipse::setStartAngle Sets the start angle for an ellipse segment to angle...
QPainterPath shape() const override
PartArc::shape.
virtual void setStartAngle(const int &start_angle)
AbstractPartEllipse::setStartAngle Sets the start angle for an ellipse segment to angle...
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override
PartArc::itemChange.
~PartArc() override
PartArc::~PartArc Destructor.
The AbstractPartEllipse class This is the base class for all ellipse based item like ellipse...
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *=nullptr) override
PartArc::paint Draw this arc.
void removeHandler()
PartArc::removeHandler Remove the handlers of this item.
void setSpanAngle(const int &span_angle) override
AbstractPartEllipse::setSpanAngle Returns the span angle of an ellipse segment in 16ths of a degree...
bool sceneEventFilter(QGraphicsItem *watched, QEvent *event) override
PartArc::sceneEventFilter.
int type() const override
QPainterPath shadowShape() const override
void switchResizeMode()
PartArc::switchResizeMode.
void adjusteHandlerPos()
PartArc::adjusteHandlerPos.
PartArc(QETElementEditor *editor, QGraphicsItem *parent=nullptr)
PartArc::PartArc Constructor.
const QDomElement toXml(QDomDocument &) const override
PartArc::toXml Export this arc in xml.
QPropertyUndoCommand * m_undo_command2
QString xmlName() const override
void addHandler()
PartArc::addHandler Add handlers for this item.
QString name() const override
void sceneSelectionChanged()
PartArc::sceneSelectionChanged When the scene selection change, if there are several primitive select...
virtual void setSpanAngle(const int &span_angle)
AbstractPartEllipse::setSpanAngle Returns the span angle of an ellipse segment in 16ths of a degree...
QVector< QetGraphicsHandlerItem * > m_handler_vector
The PartArc class This class represents an elliptical arc primitive which may be used to compose the ...
virtual void setRect(const QRectF &rect)
AbstractPartEllipse::setRect Sets the item's ellipse geometry to rect. The rectangle's left edge defi...
void handlerMouseMoveEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event)
PartArc::handlerMouseMoveEvent.
QPropertyUndoCommand * m_undo_command
void handlerMouseReleaseEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event)
PartArc::handlerMouseReleaseEvent.
void handlerMousePressEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event)
PartArc::handlerMousePressEvent.