Allow setting diagram properties collection

This commit is contained in:
Nyall Dawson 2017-01-02 11:31:35 +10:00
parent 83139cc40e
commit a4ef9ad89c
2 changed files with 18 additions and 0 deletions

View File

@ -205,14 +205,23 @@ class QgsDiagramLayerSettings
/** Returns a reference to the diagram's property collection, used for data defined overrides.
* @note added in QGIS 2.16
* @see setProperties()
*/
QgsPropertyCollection& properties();
/** Returns a reference to the diagram's property collection, used for data defined overrides.
* @note added in QGIS 2.16
* @see setProperties()
*/
//const QgsPropertyCollection& properties() const;
/** Sets the diagram's property collection, used for data defined overrides.
* @param collection property collection. Existing properties will be replaced.
* @note adde in QGIS 2.16
* @see properties()
*/
void setProperties( const QgsPropertyCollection& collection );
};
/** \ingroup core

View File

@ -253,14 +253,23 @@ class CORE_EXPORT QgsDiagramLayerSettings
/** Returns a reference to the diagram's property collection, used for data defined overrides.
* @note added in QGIS 3.0
* @see setProperties()
*/
QgsPropertyCollection& properties() { return mProperties; }
/** Returns a reference to the diagram's property collection, used for data defined overrides.
* @note added in QGIS 3.0
* @see setProperties()
*/
const QgsPropertyCollection& properties() const { return mProperties; }
/** Sets the diagram's property collection, used for data defined overrides.
* @param collection property collection. Existing properties will be replaced.
* @note added in QGIS 3.0
* @see properties()
*/
void setProperties( const QgsPropertyCollection& collection ) { mProperties = collection; }
private:
//! Associated coordinate transform, or invalid transform for no transformation