22 #ifndef QGSPROJECTPROPERTY_H
23 #define QGSPROJECTPROPERTY_H
27 #include <QStringList>
62 virtual void dump(
size_t tabs = 0 )
const = 0;
65 virtual bool isKey()
const = 0;
68 virtual bool isValue()
const = 0;
77 virtual bool isLeaf()
const = 0;
84 virtual bool readXML( QDomNode & keyNode ) = 0;
95 virtual bool writeXML(
const QString & nodeName,
96 QDomElement & element,
97 QDomDocument & document ) = 0;
108 virtual QVariant value()
const = 0;
151 void dump(
size_t tabs = 0 )
const;
153 bool readXML( QDomNode & keyNode );
155 bool writeXML(
const QString & nodeName,
156 QDomElement & element,
157 QDomDocument & document );
167 void entryList( QStringList & keyName, QStringList & entries )
const
168 { Q_UNUSED( keyName ); Q_UNUSED( entries ); }
206 const QString &name()
const
217 QVariant
value()
const;
223 delete mProperties.take( keyName );
226 return dynamic_cast<QgsPropertyKey*
>( mProperties.value( keyName ) );
231 void removeKey(
const QString & keyName )
233 delete mProperties.take( keyName );
243 delete mProperties.take( name );
256 return setValue( name(), value );
261 void dump(
size_t tabs = 0 )
const;
263 bool readXML( QDomNode & keyNode );
265 bool writeXML(
const QString &nodeName, QDomElement & element, QDomDocument & document );
269 {
return mProperties.count(); }
273 {
return mProperties.isEmpty(); }
284 void entryList( QStringList & entries )
const;
287 void subkeyList( QStringList & entries )
const;
304 virtual void clearKeys()
306 qDeleteAll( mProperties );
312 return mProperties.
value( propertyName );