Skip to content

Commit

Permalink
Allow setting diagram properties collection
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 23, 2017
1 parent 83139cc commit a4ef9ad
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions python/core/qgsdiagramrenderer.sip
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions src/core/qgsdiagramrenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a4ef9ad

Please sign in to comment.