mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-21 16:50:53 +01:00
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:
@@ -122,6 +122,16 @@ void PartArc::fromXml(const QDomElement &qde) {
|
||||
m_span_angle = qde.attribute("angle", "-1440").toInt() * 16;
|
||||
}
|
||||
|
||||
QRectF PartArc::boundingRect() const
|
||||
{
|
||||
QRectF r = AbstractPartEllipse::boundingRect();
|
||||
|
||||
foreach(QRectF rect, m_handler.handlerRect(m_handler.pointsForRect(m_rect)))
|
||||
r |= rect;
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief PartArc::shape
|
||||
* @return the shape of this item
|
||||
@@ -143,6 +153,18 @@ QPainterPath PartArc::shape() const
|
||||
return shape;
|
||||
}
|
||||
|
||||
QPainterPath PartArc::shadowShape() const
|
||||
{
|
||||
QPainterPath shape;
|
||||
shape.arcMoveTo(m_rect, m_start_angle/16);
|
||||
shape.arcTo(m_rect, m_start_angle/16, m_span_angle/16);
|
||||
|
||||
QPainterPathStroker pps;
|
||||
pps.setWidth(penWeight());
|
||||
|
||||
return (pps.createStroke(shape));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief PartArc::mousePressEvent
|
||||
* Handle mouse press event
|
||||
|
||||
Reference in New Issue
Block a user