22 #ifndef QGSPROJECTPROPERTY_H
23 #define QGSPROJECTPROPERTY_H
27 #include <QStringList>
62 virtual void dump(
int 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;
131 virtual bool isKey()
const {
return false; }
136 QVariant
value()
const {
return value_; }
145 void dump(
int tabs = 0 )
const;
147 bool readXML( QDomNode & keyNode );
149 bool writeXML(
const QString & nodeName,
150 QDomElement & element,
151 QDomDocument & document );
159 void entryList( QStringList & keyName, QStringList & entries )
const
160 { Q_UNUSED( keyName ); Q_UNUSED( entries ); }
198 const QString &name()
const
209 QVariant
value()
const;
215 delete mProperties.take( keyName );
218 return dynamic_cast<QgsPropertyKey*
>( mProperties.value( keyName ) );
223 void removeKey(
const QString & keyName )
225 delete mProperties.take( keyName );
235 delete mProperties.take( name );
248 return setValue( name(), value );
253 void dump(
int tabs = 0 )
const;
255 bool readXML( QDomNode & keyNode );
257 bool writeXML(
const QString &nodeName, QDomElement & element, QDomDocument & document );
260 int count()
const {
return mProperties.count(); }
263 bool isEmpty()
const {
return mProperties.isEmpty(); }
266 virtual bool isKey()
const {
return true; }
269 virtual bool isValue()
const {
return false; }
272 void entryList( QStringList & entries )
const;
275 void subkeyList( QStringList & entries )
const;
292 virtual void clearKeys()
294 qDeleteAll( mProperties );
300 return mProperties.
value( propertyName );