22 #include <QDomElement>
40 mStoredExpressions.removeAt( i );
56 newStoredExpression.
name = name;
58 newStoredExpression.
tag = tag;
59 mStoredExpressions.replace( i, newStoredExpression );
112 mStoredExpressions.clear();
117 QDomElement aStoredExpressions = layerNode.ownerDocument().createElement( QStringLiteral(
"storedexpressions" ) );
121 QDomElement aStoredExpression = layerNode.ownerDocument().createElement( QStringLiteral(
"storedexpression" ) );
125 aStoredExpressions.appendChild( aStoredExpression );
127 layerNode.appendChild( aStoredExpressions );
136 QDomNode aaNode = layerNode.namedItem( QStringLiteral(
"storedexpressions" ) );
138 if ( !aaNode.isNull() )
140 QDomNodeList aStoredExpressions = aaNode.toElement().elementsByTagName( QStringLiteral(
"storedexpression" ) );
141 for (
int i = 0; i < aStoredExpressions.size(); ++i )
143 QDomElement aStoredExpression = aStoredExpressions.at( i ).toElement();
144 addStoredExpression( aStoredExpression.attribute( QStringLiteral(
"name" ) ), aStoredExpression.attribute( QStringLiteral(
"expression" ) ),
QgsStoredExpression::Category( aStoredExpression.attribute( QStringLiteral(
"tag" ) ).toInt() ) );