50 if (event -> button() == Qt::LeftButton)
61 m_arc -> setProperty(
"startAngle", 0);
62 m_arc -> setProperty(
"spanAngle", 1440);
63 m_arc -> setProperty(
"antialias",
true);
88 if (!
m_arc)
return false;
102 if (event -> button() == Qt::RightButton) {
116 if (
m_arc && event->key() == Qt::Key_Space) {
132 if (width < 0) width *= -1;
134 if (height < 0) height *= -1;
146 pos_.ry() -= height/2;
151 pos_.rx() -= width/2;
160 pos_.rx() -= width/2;
166 pos_.ry() -= height/2;
179 pos_.rx() -= width/2;
185 pos_.ry() -= height/2;
193 pos_.ry() -= height/2;
198 pos_.rx() -= width/2;
205 m_arc -> setRect(QRectF(pos_, QSizeF(width, height)));
QETElementEditor * m_editor
bool mouseMoveEvent(QGraphicsSceneMouseEvent *event) override
ESEventAddArc::mouseMoveEvent.
~ESEventAddArc() override
ESEventAddArc::~ESEventAddArc.
void setStartAngle(const int &start_angle) override
AbstractPartEllipse::setStartAngle Sets the start angle for an ellipse segment to angle...
void updateHelpCross(const QPointF &p)
bool keyPressEvent(QKeyEvent *event) override
ESEventAddArc::keyPressEvent.
ESEventAddArc(ElementScene *scene)
ESEventAddArc::ESEventAddArc.
QRectF rect
AbstractPartEllipse::rect Returns the item's ellipse geometry as a QRectF.
virtual bool keyPressEvent(QKeyEvent *event)
ESEventInterface::keyPressEvent By default, press escape key abort the curent action.
void updateArc()
ESEventAddArc::updateArc Redraw the arc with curent value.
QPointF snapToGrid(QPointF point)
bool mousePressEvent(QGraphicsSceneMouseEvent *event) override
ESEventAddPolygon::mousePressEvent.
bool mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override
ESEventAddArc::mouseReleaseEvent.