Skip to content

Commit a4ef9ad

Browse files
committedJan 23, 2017
Allow setting diagram properties collection
1 parent 83139cc commit a4ef9ad

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed
 

‎python/core/qgsdiagramrenderer.sip

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,14 +205,23 @@ class QgsDiagramLayerSettings
205205

206206
/** Returns a reference to the diagram's property collection, used for data defined overrides.
207207
* @note added in QGIS 2.16
208+
* @see setProperties()
208209
*/
209210
QgsPropertyCollection& properties();
210211

211212
/** Returns a reference to the diagram's property collection, used for data defined overrides.
212213
* @note added in QGIS 2.16
214+
* @see setProperties()
213215
*/
214216
//const QgsPropertyCollection& properties() const;
215217

218+
/** Sets the diagram's property collection, used for data defined overrides.
219+
* @param collection property collection. Existing properties will be replaced.
220+
* @note adde in QGIS 2.16
221+
* @see properties()
222+
*/
223+
void setProperties( const QgsPropertyCollection& collection );
224+
216225
};
217226

218227
/** \ingroup core

‎src/core/qgsdiagramrenderer.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,14 +253,23 @@ class CORE_EXPORT QgsDiagramLayerSettings
253253

254254
/** Returns a reference to the diagram's property collection, used for data defined overrides.
255255
* @note added in QGIS 3.0
256+
* @see setProperties()
256257
*/
257258
QgsPropertyCollection& properties() { return mProperties; }
258259

259260
/** Returns a reference to the diagram's property collection, used for data defined overrides.
260261
* @note added in QGIS 3.0
262+
* @see setProperties()
261263
*/
262264
const QgsPropertyCollection& properties() const { return mProperties; }
263265

266+
/** Sets the diagram's property collection, used for data defined overrides.
267+
* @param collection property collection. Existing properties will be replaced.
268+
* @note added in QGIS 3.0
269+
* @see properties()
270+
*/
271+
void setProperties( const QgsPropertyCollection& collection ) { mProperties = collection; }
272+
264273
private:
265274

266275
//! Associated coordinate transform, or invalid transform for no transformation

0 commit comments

Comments
 (0)
Please sign in to comment.