Element editor : minor improvement

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4061 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2015-07-21 12:29:43 +00:00
parent 012ba2ccd7
commit 50c61b4e03
13 changed files with 126 additions and 1 deletions

View File

@@ -125,6 +125,16 @@ void PartEllipse::fromXml(const QDomElement &qde)
QSizeF(width, height));
}
QRectF PartEllipse::boundingRect() const
{
QRectF r = AbstractPartEllipse::boundingRect();
foreach(QRectF rect, m_handler.handlerRect(m_handler.pointsForRect(m_rect)))
r |= rect;
return r;
}
/**
* @brief PartEllipse::shape
* @return the shape of this item
@@ -145,6 +155,17 @@ QPainterPath PartEllipse::shape() const
return shape;
}
QPainterPath PartEllipse::shadowShape() const
{
QPainterPath shape;
shape.addEllipse(m_rect);
QPainterPathStroker pps;
pps.setWidth(penWeight());
return (pps.createStroke(shape));
}
/**
* @brief PartEllipse::mousePressEvent
* Handle mouse press event