mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
Basic shape add new CustomDashLine style with
Dash Pattern (<< 10 << 10 ); git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5194 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -39,6 +39,7 @@ QDomElement QETXML::penToXml(QDomDocument &parent_document,QPen pen)
|
||||
case Qt::DotLine : style = "DotLine"; break;
|
||||
case Qt::DashDotLine : style = "DashDotLine"; break;
|
||||
case Qt::DashDotDotLine : style = "DashDotDotLine"; break;
|
||||
case Qt::CustomDashLine : style = "CustomDashLine"; break;
|
||||
default : style = "Unknow"; break;
|
||||
}
|
||||
|
||||
@@ -71,6 +72,8 @@ QPen QETXML::penFromXml(const QDomElement &element)
|
||||
else if (style == "DotLine") pen.setStyle(Qt::DotLine);
|
||||
else if (style == "DashDotLine") pen.setStyle(Qt::DashDotLine);
|
||||
else if (style == "DashDotDotLine") pen.setStyle(Qt::DashDotDotLine);
|
||||
else if (style == "CustomDashLine") pen.setStyle(Qt::CustomDashLine),
|
||||
pen.setDashPattern( QVector<qreal>() << 10 << 10 );
|
||||
else pen.setStyle(Qt::DashLine);
|
||||
|
||||
pen.setColor(QColor(element.attribute("color", "#000000")));
|
||||
|
||||
Reference in New Issue
Block a user