We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e1d53f commit 7858b4cCopy full SHA for 7858b4c
src/core/qgsxmlutils.h
@@ -79,6 +79,15 @@ class CORE_EXPORT QgsXmlUtils
79
*/
80
static QVariant readVariant( const QDomElement &element );
81
82
+ /**
83
+ * Read a flag value from an attribute of the element.
84
+ * \param element the element to read the attribute from
85
+ * \param attributeName the attribute name
86
+ * \param defaultValue the default value as a flag
87
+ * \note The flag value is a text as returned by \see QMetaEnum::valueToKeys.
88
+ * The flag must have been declared with Q_ENUM macro.
89
+ * \since QGIS 3.4
90
+ */
91
template<class T> static T readFlagAttribute( const QDomElement &element, const QString &attributeName, T defaultValue ) SIP_SKIP
92
{
93
T value = defaultValue;
0 commit comments