0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-24 16:44:39 +03:00

Font stylename property is now saved by XmlFontSerializator

This commit is contained in:
Arin Alexander 2016-05-27 00:05:33 +04:00
parent d595d76eb2
commit 9359caaf30

View File

@ -169,28 +169,27 @@ QVariant XmlBoolSerializator::loadValue()
void XmlFontSerializator::save(const QVariant &value, QString name)
{
QFont font = value.value<QFont>();
QDomElement _node = doc()->createElement(name);
_node.setAttribute("Type","QFont");
_node.setAttribute("family",font.family());
_node.setAttribute("pointSize",font.pointSize());
_node.setAttribute("stylename",font.styleName());
saveBool(_node,"bold",font.bold());
saveBool(_node,"italic",font.italic());
saveBool(_node,"underline",font.underline());
node()->appendChild(_node);
}
QVariant XmlFontSerializator::loadValue()
{
QFont font;
font.setFamily(node()->attribute("family"));
font.setPointSize(node()->attribute("pointSize").toInt());
font.setBold(node()->attribute("bold").toInt());
font.setItalic(node()->attribute("italic").toInt());
font.setUnderline(node()->attribute("underline").toInt());
font.setStyleName(node()->attribute("stylename"));
return font;
}