mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-29 23:40:51 +01:00
Independent text can have custom font.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5766 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -52,6 +52,12 @@ void IndependentTextItem::fromXml(const QDomElement &e) {
|
||||
setPos(e.attribute("x").toDouble(), e.attribute("y").toDouble());
|
||||
setHtml(e.attribute("text"));
|
||||
setRotation(e.attribute("rotation").toDouble());
|
||||
if (e.hasAttribute("font"))
|
||||
{
|
||||
QFont font;
|
||||
font.fromString(e.attribute("font"));
|
||||
setFont(font);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -65,6 +71,7 @@ QDomElement IndependentTextItem::toXml(QDomDocument &document) const
|
||||
result.setAttribute("y", QString("%1").arg(pos().y()));
|
||||
result.setAttribute("text", toHtml());
|
||||
result.setAttribute("rotation", QString::number(QET::correctAngle(rotation())));
|
||||
result.setAttribute("font", font().toString());
|
||||
|
||||
return(result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user