Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add better api docs on Property usage
(cherry picked from commit 6dc537f)
  • Loading branch information
mbernasocchi authored and nyalldawson committed Jan 21, 2019
1 parent 8871a58 commit e29ccb7
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/layout/qgslayoutobject.h
Expand Up @@ -225,13 +225,15 @@ class CORE_EXPORT QgsLayoutObject: public QObject, public QgsExpressionContextGe
/**
* Returns a reference to the object's property collection, used for data defined overrides.
* \see setDataDefinedProperties()
* \see DataDefinedProperty
*/
const QgsPropertyCollection &dataDefinedProperties() const { return mDataDefinedProperties; } SIP_SKIP

/**
* Sets the objects's property collection, used for data defined overrides.
* \param collection property collection. Existing properties will be replaced.
* \see dataDefinedProperties()
* \see DataDefinedProperty
*/
void setDataDefinedProperties( const QgsPropertyCollection &collection ) { mDataDefinedProperties = collection; }

Expand Down
2 changes: 2 additions & 0 deletions src/core/qgsdiagramrenderer.h
Expand Up @@ -308,6 +308,7 @@ class CORE_EXPORT QgsDiagramLayerSettings
/**
* Returns a reference to the diagram's property collection, used for data defined overrides.
* \see setDataDefinedProperties()
* \see Property
* \note not available in Python bindings
* \since QGIS 3.0
*/
Expand All @@ -317,6 +318,7 @@ class CORE_EXPORT QgsDiagramLayerSettings
* Sets the diagram's property collection, used for data defined overrides.
* \param collection property collection. Existing properties will be replaced.
* \see dataDefinedProperties()
* \see Property
* \since QGIS 3.0
*/
void setDataDefinedProperties( const QgsPropertyCollection &collection ) { mDataDefinedProperties = collection; }
Expand Down
2 changes: 2 additions & 0 deletions src/core/qgspallabeling.h
Expand Up @@ -793,6 +793,7 @@ class CORE_EXPORT QgsPalLayerSettings
/**
* Returns a reference to the label's property collection, used for data defined overrides.
* \see setDataDefinedProperties()
* \see Property
* \note not available in Python bindings
* \since QGIS 3.0
*/
Expand All @@ -802,6 +803,7 @@ class CORE_EXPORT QgsPalLayerSettings
* Sets the label's property collection, used for data defined overrides.
* \param collection property collection. Existing properties will be replaced.
* \see dataDefinedProperties()
* \see Property
* \since QGIS 3.0
*/
void setDataDefinedProperties( const QgsPropertyCollection &collection ) { mDataDefinedProperties = collection; }
Expand Down
8 changes: 8 additions & 0 deletions src/core/qgspropertycollection.h
Expand Up @@ -274,6 +274,14 @@ class CORE_EXPORT QgsAbstractPropertyCollection
* Properties within a collection are referenced by an integer key. This is done to avoid the cost of
* string creation and comparisons which would be required by a string key. The intended use case is that
* a context specific enum is cast to int and used for the key value.
* Examples of such enums are :
* \see QgsLayoutObject::DataDefinedProperty
* \see QgsSymbolLayer::Property
* \see QgsPalLabeling::Property
* \see QgsAbstract3DSymbol::Property
* \see QgsDiagramLayerSettings::Property
* \see QgsPalLayerSettings::Property
* \see QgsWidgetWrapper::Property
* \since QGIS 3.0
*/

Expand Down
2 changes: 2 additions & 0 deletions src/gui/editorwidgets/core/qgswidgetwrapper.h
Expand Up @@ -181,6 +181,7 @@ class GUI_EXPORT QgsWidgetWrapper : public QObject
/**
* Returns a reference to the editor widget's property collection, used for data defined overrides.
* \see setDataDefinedProperties()
* \see Property
* \since QGIS 3.0
*/
const QgsPropertyCollection &dataDefinedProperties() const { return mPropertyCollection; }
Expand All @@ -189,6 +190,7 @@ class GUI_EXPORT QgsWidgetWrapper : public QObject
* Sets the editor widget's property collection, used for data defined overrides.
* \param collection property collection. Existing properties will be replaced.
* \see dataDefinedProperties()
* \see Property
* \since QGIS 3.0
*/
void setDataDefinedProperties( const QgsPropertyCollection &collection ) { mPropertyCollection = collection; }
Expand Down

0 comments on commit e29ccb7

Please sign in to comment.