Skip to content

Commit 5ca66c8

Browse files
author
timlinux
committedOct 31, 2009
Added deprecation note for QgsLabel::layerAttributes and suggest using QgsLabel::labelAttributes rather
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11873 c8812cc2-4d05-0410-92ff-de0c093fc19c

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed
 

‎python/core/qgslabel.sip

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,17 @@ public:
8181
//! Available vector fields
8282
QMap<int, QgsField> & fields ( );
8383

84-
//! Pointer to default attributes
85-
QgsLabelAttributes *layerAttributes ( );
84+
/** Pointer to default attributes.
85+
* @note this will be deprecated in version 2 as it is
86+
* badly named. Rather use attributes.
87+
* @see labelAttributes method rather */
88+
QgsLabelAttributes *layerAttributes( void );
89+
90+
/** Pointer to default attributes.
91+
* @note this replaces the to-be-deprecated layerAttributes method.
92+
* @note introduced in QGIS 1.4
93+
*/
94+
QgsLabelAttributes *labelAttributes( void );
8695

8796
//! Set label field
8897
void setLabelField ( int attr, int fieldId );

‎src/core/qgslabel.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,11 @@ QString QgsLabel::labelField( int attr ) const
508508
return mField[fieldIndex].name();
509509
}
510510

511+
QgsLabelAttributes *QgsLabel::labelAttributes( void )
512+
{
513+
return mLabelAttributes;
514+
}
515+
// @note this will be deprecated use attributes rather
511516
QgsLabelAttributes *QgsLabel::layerAttributes( void )
512517
{
513518
return mLabelAttributes;

‎src/core/qgslabel.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,18 @@ class CORE_EXPORT QgsLabel
132132
//! Available vector fields
133133
QgsFieldMap & fields( void );
134134

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

141+
/** Pointer to default attributes.
142+
* @note this replaces the to-be-deprecated layerAttributes method.
143+
* @note introduced in QGIS 1.4
144+
*/
145+
QgsLabelAttributes *labelAttributes( void );
146+
138147
//! Set label field
139148
void setLabelField( int attr, int fieldIndex );
140149

0 commit comments

Comments
 (0)
Please sign in to comment.