Basic Shapes: DXF Export added.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2886 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
abhishekm71
2014-02-28 08:20:00 +00:00
parent f131790f5d
commit 0af7b828b0
3 changed files with 61 additions and 20 deletions

View File

@@ -25,6 +25,37 @@ void QetShapeItem::setFullyBuilt(bool isBuilt)
setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable | QGraphicsItem::ItemIsFocusable);
}
QLineF *QetShapeItem::getLine()
{
QRectF rect = boundingRect();
QLineF *line = 0;
if (_shapeType == Line) {
if (_lineAngle)
line = new QLineF(rect.topRight(), rect.bottomLeft());
else
line = new QLineF(rect.topLeft(), rect.bottomRight());
}
return line;
}
QRectF *QetShapeItem::getRectangle()
{
QRectF rect = boundingRect();
QRectF *rec = 0;
if (_shapeType == Rectangle)
rec = new QRectF(rect);
return rec;
}
QRectF *QetShapeItem::getEllipse()
{
QRectF rect = boundingRect();
QRectF *rec = 0;
if (_shapeType == Ellipse)
rec = new QRectF(rect);
return rec;
}
QRectF QetShapeItem::boundingRect() const
{
return _boundingRect;