Skip to content

Commit

Permalink
Added deprecation note for QgsLabel::layerAttributes and suggest usin…
Browse files Browse the repository at this point in the history
…g QgsLabel::labelAttributes rather

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11873 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Oct 31, 2009
1 parent df032fe commit 5ca66c8
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
13 changes: 11 additions & 2 deletions python/core/qgslabel.sip
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,17 @@ public:
//! Available vector fields
QMap<int, QgsField> & fields ( );

//! Pointer to default attributes
QgsLabelAttributes *layerAttributes ( );
/** Pointer to default attributes.
* @note this will be deprecated in version 2 as it is
* badly named. Rather use attributes.
* @see labelAttributes method rather */
QgsLabelAttributes *layerAttributes( void );

/** Pointer to default attributes.
* @note this replaces the to-be-deprecated layerAttributes method.
* @note introduced in QGIS 1.4
*/
QgsLabelAttributes *labelAttributes( void );

//! Set label field
void setLabelField ( int attr, int fieldId );
Expand Down
5 changes: 5 additions & 0 deletions src/core/qgslabel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,11 @@ QString QgsLabel::labelField( int attr ) const
return mField[fieldIndex].name();
}

QgsLabelAttributes *QgsLabel::labelAttributes( void )
{
return mLabelAttributes;
}
// @note this will be deprecated use attributes rather
QgsLabelAttributes *QgsLabel::layerAttributes( void )
{
return mLabelAttributes;
Expand Down
11 changes: 10 additions & 1 deletion src/core/qgslabel.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,18 @@ class CORE_EXPORT QgsLabel
//! Available vector fields
QgsFieldMap & fields( void );

//! Pointer to default attributes
/** Pointer to default attributes.
* @note this will be deprecated in version 2 as it is
* badly named. Rather use attributes.
* @see labelAttributes method rather */
QgsLabelAttributes *layerAttributes( void );

/** Pointer to default attributes.
* @note this replaces the to-be-deprecated layerAttributes method.
* @note introduced in QGIS 1.4
*/
QgsLabelAttributes *labelAttributes( void );

//! Set label field
void setLabelField( int attr, int fieldIndex );

Expand Down

0 comments on commit 5ca66c8

Please sign in to comment.