Skip to content

Commit

Permalink
Remove QgsLabel and QgsLabelAttributes + remove QgsPalLabeling from r…
Browse files Browse the repository at this point in the history
…enderer jobs
  • Loading branch information
wonder-sk committed Jul 20, 2016
1 parent cd33ccf commit 31c75ef
Show file tree
Hide file tree
Showing 36 changed files with 30 additions and 5,019 deletions.
10 changes: 10 additions & 0 deletions doc/api_break.dox
Expand Up @@ -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>
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions python/core/core.sip
Expand Up @@ -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
Expand Down
115 changes: 0 additions & 115 deletions python/core/qgslabel.sip

This file was deleted.

118 changes: 0 additions & 118 deletions python/core/qgslabelattributes.sip

This file was deleted.

5 changes: 0 additions & 5 deletions python/core/qgsmaplayer.sip
Expand Up @@ -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;

Expand Down
6 changes: 2 additions & 4 deletions python/core/qgsmaprendererjob.sip
Expand Up @@ -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 );
Expand All @@ -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();
Expand Down
23 changes: 0 additions & 23 deletions python/core/qgsvectorlayer.sip
Expand Up @@ -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();

/**
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/analysis/network/qgsarcproperter.h
Expand Up @@ -21,7 +21,7 @@

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

/**
* \ingroup networkanalysis
Expand Down
2 changes: 0 additions & 2 deletions src/app/CMakeLists.txt
Expand Up @@ -39,7 +39,6 @@ SET(QGIS_APP_SRCS
qgsfieldsproperties.cpp
qgsidentifyresultsdialog.cpp
qgsfeatureaction.cpp
qgslabeldialog.cpp
qgslabelpropertydialog.cpp
qgslabelengineconfigdialog.cpp
qgslabelinggui.cpp
Expand Down Expand Up @@ -217,7 +216,6 @@ SET (QGIS_APP_MOC_HDRS
qgsguivectorlayertools.h
qgshtmlannotationdialog.h
qgsidentifyresultsdialog.h
qgslabeldialog.h
qgslabelengineconfigdialog.h
qgslabelinggui.h
qgslabelpreview.h
Expand Down

0 comments on commit 31c75ef

Please sign in to comment.