Skip to content
Permalink
Browse files

Remove QgsLabel and QgsLabelAttributes + remove QgsPalLabeling from r…

…enderer jobs
  • Loading branch information
wonder-sk committed Jul 20, 2016
1 parent cd33ccf commit 31c75ef22ec944a722f1c5f188bbc39a976bd8cd
@@ -18,6 +18,12 @@ This page tries to maintain a list with incompatible changes that happened in pr

\section qgis_api_break_3_0 QGIS 3.0

\subsection qgis_api_break_3_0_removed_classes Removed Classes

<ul>
<li>QgsLabel and QgsLabelAttributes. Replaced by labeling based on PAL library, see QgsLabelingEngineV2.</li>
</ul>

\subsection qgis_api_break_3_0_QgsCoordinateTransform QgsCoordinateTransform

<ul>
@@ -101,6 +107,7 @@ screenUpdateRequested() were removed. These members have had no effect for a num
<li>theMinScale and theMaxScale parameters in setMinimumScale and setMaximumScale were renamed to scale</li>
<li>The layerCrsChanged() signal was renamed to crsChanged()</li>
<li>theError parameter in appendError() and setError() were renamed to 'error'.</li>
<li>drawLabels() method was removed. It used old deprecated labeling. Replaced by labeling based on PAL library, see QgsLabelingEngineV2.</li>
</ul>

\subsection qgis_api_break_3_0_QgsMapRenderer QgsMapRenderer
@@ -115,6 +122,8 @@ be returned instead of a null pointer if no transformation is required.</li>
<ul>
<li>reprojectToLayerExtent() now takes a QgsCoordinateTransform reference, not a pointer. An invalid QgsCoordinateTransform should
be used instead of a null pointer if no transformation is required.</li>
<li>prepareJobs() and drawLabeling() (neither available in PyQGIS) do not take QgsPalLabeling parameter anymore. All drawing of labels is done by QgsLabelingEngineV2.</li>
<li>drawOldLabeling(), drawNewLabeling() were removed. The method drawLabeling() should be used instead.</li>
</ul>

\subsection qgis_api_break_3_0_QgsMapSettings QgsMapSettings
@@ -199,6 +208,7 @@ use QgsTreeWidgetItemObject which is an upgraded version of the original QgsTree
<ul>
<li>commitErrors() now returns an object, rather than a reference. This has no effect on PyQGIS code.</li>
<li>subsetString() was made const. This has no effect on PyQGIS code, but c++ code implementing derived layer classes will need to update the signature of this method to match.</li>
<li>label(), enableLabels(), hasLabelsEnabled(), drawLabels() have been removed. Replaced by labeling based on PAL library, see QgsLabelingEngineV2.</li>
</ul>

\subsection qgis_api_break_3_0_QgsRasterProjector QgsRasterProjector
@@ -70,8 +70,6 @@
%Include qgsdartmeasurement.sip
%Include qgsexpressionfieldbuffer.sip
%Include qgsfontutils.sip
%Include qgslabel.sip
%Include qgslabelattributes.sip
%Include qgslabelsearchtree.sip
%Include qgslegendrenderer.sip
%Include qgslegendsettings.sip

This file was deleted.

This file was deleted.

@@ -284,11 +284,6 @@ class QgsMapLayer : QObject
*/
virtual bool draw( QgsRenderContext& rendererContext );

/** Draw labels
* @todo to be removed: used only in vector layers
*/
virtual void drawLabels( QgsRenderContext& rendererContext );

/** Returns the extent of the layer. */
virtual QgsRectangle extent() const;

@@ -113,7 +113,7 @@ class QgsMapRendererJob : QObject
static bool reprojectToLayerExtent( const QgsMapLayer *ml, const QgsCoordinateTransform& ct, QgsRectangle &extent, QgsRectangle &r2 );

//! @note not available in python bindings
// LayerRenderJobs prepareJobs( QPainter* painter, QgsPalLabeling* labelingEngine );
// LayerRenderJobs prepareJobs( QPainter* painter, QgsLabelingEngineV2* labelingEngine2 );

//! @note not available in python bindings
// void cleanupJobs( LayerRenderJobs& jobs );
@@ -123,9 +123,7 @@ class QgsMapRendererJob : QObject
bool needTemporaryImage( QgsMapLayer* ml );

//! @note not available in Python bindings
// static void drawLabeling( const QgsMapSettings& settings, QgsRenderContext& renderContext, QgsPalLabeling* labelingEngine, QgsLabelingEngineV2* labelingEngine2, QPainter* painter );
static void drawOldLabeling( const QgsMapSettings& settings, QgsRenderContext& renderContext );
static void drawNewLabeling( const QgsMapSettings& settings, QgsRenderContext& renderContext, QgsPalLabeling* labelingEngine );
// static void drawLabeling( const QgsMapSettings& settings, QgsRenderContext& renderContext, QgsLabelingEngineV2* labelingEngine2, QPainter* painter );

//! called when rendering has finished to update all layers' geometry caches
void updateLayerGeometryCaches();
@@ -282,14 +282,6 @@ class QgsVectorLayer : QgsMapLayer
*/
void updateExpressionField( int index, const QString& exp );

/** Get the label rendering properties associated with this layer */
QgsLabel *label();

/** Get the label rendering properties associated with this layer
* @note not available in python bindings
*/
// const QgsLabel *label() const;

QgsActionManager *actions();

/**
@@ -804,16 +796,6 @@ class QgsVectorLayer : QgsMapLayer
*/
int insertSegmentVerticesForSnap( const QList<QgsSnappingResult>& snapResults );

/** Set labels on
* @deprecated this method is for the old labeling engine
*/
void enableLabels( bool on ) /Deprecated/;

/** Label is on
* @deprecated this method is for the old labeling engine, use labelsEnabled instead
*/
bool hasLabelsEnabled() const /Deprecated/;

/** Access to labeling configuration.
* @note added in 2.12
* @note not available in Python bindings
@@ -870,11 +852,6 @@ class QgsVectorLayer : QgsMapLayer
*/
bool draw( QgsRenderContext& rendererContext );

/** Draws the layer labels using the old labeling engine
* @deprecated will be removed in QGIS 3.0
*/
void drawLabels( QgsRenderContext& rendererContext ) /Deprecated/;

/** Return the extent of the layer */
QgsRectangle extent() const;

@@ -21,7 +21,7 @@

// QGIS includes
#include <qgsfeature.h>
#include <qgslabel.h>
#include <qgsfeaturerequest.h>

/**
* \ingroup networkanalysis
@@ -39,7 +39,6 @@ SET(QGIS_APP_SRCS
qgsfieldsproperties.cpp
qgsidentifyresultsdialog.cpp
qgsfeatureaction.cpp
qgslabeldialog.cpp
qgslabelpropertydialog.cpp
qgslabelengineconfigdialog.cpp
qgslabelinggui.cpp
@@ -217,7 +216,6 @@ SET (QGIS_APP_MOC_HDRS
qgsguivectorlayertools.h
qgshtmlannotationdialog.h
qgsidentifyresultsdialog.h
qgslabeldialog.h
qgslabelengineconfigdialog.h
qgslabelinggui.h
qgslabelpreview.h

0 comments on commit 31c75ef

Please sign in to comment.
You can’t perform that action at this time.