25 #include <QDomElement> 26 #include <QDomDocument> 34 if ( !defaultFontString.
isEmpty() )
50 if ( elem.
isNull() )
return;
69 if ( elem.
isNull() )
return;
106 if ( styleName ==
"hidden" )
return Hidden;
107 else if ( styleName ==
"title" )
return Title;
108 else if ( styleName ==
"group" )
return Group;
109 else if ( styleName ==
"subgroup" )
return Subgroup;
110 else if ( styleName ==
"symbol" )
return Symbol;
111 else if ( styleName ==
"symbolLabel" )
return SymbolLabel;
static Style styleFromName(const QString &styleName)
Get style from name, used in project file.
void readXML(const QDomElement &elem, const QDomDocument &doc)
QDomNode appendChild(const QDomNode &newChild)
void setMargin(Side side, double margin)
QString attribute(const QString &name, const QString &defValue) const
double toDouble(bool *ok) const
void writeXML(const QString &name, QDomElement &elem, QDomDocument &doc) const
QString tr(const char *sourceText, const char *disambiguation, int n)
bool qgsDoubleNear(double a, double b, double epsilon=4 *DBL_EPSILON)
Compare two doubles (but allow some difference)
static QString styleName(Style s)
Get name for style, used in project file.
QString number(int n, int base)
bool fromString(const QString &descrip)
void setAttribute(const QString &name, const QString &value)
static QString styleLabel(Style s)
Get style label, translated, used in UI.
static bool setFromXmlChildNode(QFont &font, const QDomElement &element, const QString &childNode)
Sets the properties of a font to match the properties stored in an XML child node.
QVariant value(const QString &key, const QVariant &defaultValue) const
void setFamily(const QString &family)
static QDomElement toXmlElement(const QFont &font, QDomDocument &document, const QString &elementName)
Returns a DOM element containing the properties of the font.
QDomElement createElement(const QString &tagName)