[QGIS Commit] r11873 - in trunk/qgis: python/core src/core
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sat Oct 31 18:03:49 EDT 2009
Author: timlinux
Date: 2009-10-31 18:03:48 -0400 (Sat, 31 Oct 2009)
New Revision: 11873
Modified:
trunk/qgis/python/core/qgslabel.sip
trunk/qgis/src/core/qgslabel.cpp
trunk/qgis/src/core/qgslabel.h
Log:
Added deprecation note for QgsLabel::layerAttributes and suggest using QgsLabel::labelAttributes rather
Modified: trunk/qgis/python/core/qgslabel.sip
===================================================================
--- trunk/qgis/python/core/qgslabel.sip 2009-10-31 21:31:32 UTC (rev 11872)
+++ trunk/qgis/python/core/qgslabel.sip 2009-10-31 22:03:48 UTC (rev 11873)
@@ -81,9 +81,18 @@
//! 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 );
Modified: trunk/qgis/src/core/qgslabel.cpp
===================================================================
--- trunk/qgis/src/core/qgslabel.cpp 2009-10-31 21:31:32 UTC (rev 11872)
+++ trunk/qgis/src/core/qgslabel.cpp 2009-10-31 22:03:48 UTC (rev 11873)
@@ -508,6 +508,11 @@
return mField[fieldIndex].name();
}
+QgsLabelAttributes *QgsLabel::labelAttributes( void )
+{
+ return mLabelAttributes;
+}
+// @note this will be deprecated use attributes rather
QgsLabelAttributes *QgsLabel::layerAttributes( void )
{
return mLabelAttributes;
Modified: trunk/qgis/src/core/qgslabel.h
===================================================================
--- trunk/qgis/src/core/qgslabel.h 2009-10-31 21:31:32 UTC (rev 11872)
+++ trunk/qgis/src/core/qgslabel.h 2009-10-31 22:03:48 UTC (rev 11873)
@@ -132,9 +132,18 @@
//! 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 );
More information about the QGIS-commit
mailing list