@@ -789,6 +789,12 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
789789 /* * Returns the bounding box of the selected features. If there is no selection, QgsRectangle(0,0,0,0) is returned */
790790 QgsRectangle boundingBoxOfSelected ();
791791
792+ /* * Returns whether the layer contains labels which are enabled and should be drawn.
793+ * @return true if layer contains enabled labels
794+ * @note added in QGIS 2.9
795+ */
796+ bool labelsEnabled () const ;
797+
792798 /* * Returns whether the layer contains diagrams which are enabled and should be drawn.
793799 * @return true if layer contains enabled diagrams
794800 * @note added in QGIS 2.9
@@ -1068,11 +1074,15 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
10681074 */
10691075 int insertSegmentVerticesForSnap ( const QList<QgsSnappingResult>& snapResults );
10701076
1071- /* * Set labels on */
1072- void enableLabels ( bool on );
1077+ /* * Set labels on
1078+ * @deprecated this method is for the old labeling engine
1079+ */
1080+ Q_DECL_DEPRECATED void enableLabels ( bool on );
10731081
1074- /* * Label is on */
1075- bool hasLabelsEnabled () const ;
1082+ /* * Label is on
1083+ * @deprecated this method is for the old labeling engine, use labelsEnabled instead
1084+ */
1085+ Q_DECL_DEPRECATED bool hasLabelsEnabled () const ;
10761086
10771087 /* * Returns true if the provider is in editing mode */
10781088 virtual bool isEditable () const override ;
@@ -1116,8 +1126,10 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
11161126 */
11171127 bool draw ( QgsRenderContext& rendererContext ) override ;
11181128
1119- /* * Draws the layer labels using coordinate transformation */
1120- void drawLabels ( QgsRenderContext& rendererContext ) override ;
1129+ /* * Draws the layer labels using the old labeling engine
1130+ * @note deprecated
1131+ */
1132+ Q_DECL_DEPRECATED void drawLabels ( QgsRenderContext& rendererContext ) override ;
11211133
11221134 /* * Return the extent of the layer as a QRect */
11231135 QgsRectangle extent () override ;
0 commit comments