Skip to content

Commit 1fce657

Browse files
committed
Add missing annotation api break docs, fix sip binding
1 parent f79fc25 commit 1fce657

File tree

3 files changed

+16
-25
lines changed

3 files changed

+16
-25
lines changed

doc/api_break.dox

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ Renamed Classes {#qgis_api_break_3_0_renamed_classes}
233233
Removed Classes {#qgis_api_break_3_0_removed_classes}
234234
---------------
235235

236+
- QgsAnnotationItem was removed. This was replaced by QgsAnnotation and QgsMapCanvasAnnotationItem.
236237
- QgsAttributeAction was removed, and replaced by QgsActionManager.
237238
- QgsAttributeEditor was removed. Use QgsEditorWidgetRegistry::create() instead.
238239
- QgsColorbutton was removed. QgsColorButtonV2 has now been renamed to QgsColorButton. Hence, QgsColorButtonV2 does not exist anymore.
@@ -248,6 +249,8 @@ Use QgsComposerAttributeTableV2 instead.
248249
- QgsCRSCache was removed. QgsCoordinateReferenceSystem now internally uses a cache for CRS creation,
249250
so there is no longer a need for the separate cache class. Code which previously called QgsCRSCache::updateCRSCache()
250251
should now call QgsCoordinateReferenceSystem::invalidateCache() and QgsCoordinateTransformCache::instance()->invalidateCrs( authid ).
252+
- QgsFormAnnotationItem. Use QgsFormAnnotation instead.
253+
- QgsHtmlAnnotationItem. Use QgsHtmlAnnotation instead.
251254
- QgsHttpTransaction. This class was outdated and code should be ported to native Qt or Python implementations.
252255
- QgsLabel and QgsLabelAttributes. Replaced by labeling based on PAL library, see QgsLabelingEngine.
253256
- QgsLabelingEngineInterface. Replaced by QgsLabelingEngine.
@@ -267,7 +270,9 @@ should now call QgsCoordinateReferenceSystem::invalidateCache() and QgsCoordinat
267270
- QgsLegacyHelpers.
268271
- QgsProviderCountCalcEvent and QgsProviderExtentCalcEvent. These classes were unused in QGIS core and unmaintained.
269272
- QgsEditorWidgetConfig was removed. Use QVariantMap instead.
273+
- QgsSvgAnnotationItem. Use QgsSvgAnnotation instead.
270274
- QgsSymbologyV2Conversion was removed. Reading of renderers from pre-1.0 versions is not supported anymore.
275+
- QgsTextAnnotationItem. Use QgsTextAnnotation instead.
271276

272277

273278
General changes {#qgis_api_break_3_0_global}
@@ -348,12 +353,6 @@ QgisInterface {#qgis_api_break_3_0_QgisInterface}
348353
- actionRemoveLayer was removed as it no longer exists.
349354

350355

351-
QgsAnnotation {#qgis_api_break_3_0_QgsAnnotation}
352-
-------------
353-
354-
- mapPositionFixed() has been renamed to hasFixedMapPosition()
355-
356-
357356
QgsAbstractGeometry {#qgis_api_break_3_0_QgsAbstractGeometry}
358357
-------------------
359358

@@ -572,6 +571,10 @@ instead.
572571
and setAtlasScalingMode() instead.
573572
- storeCurrentLayerSet() was removed. Use setLayers() instead.
574573
- The layersChanged() slot was removed.
574+
- setMapCanvas() was removed. This is no longer required to draw map annotations, which are instead retrieved from the composition's
575+
associated project's annotationManager()
576+
- setDrawCanvasItems() and drawCanvasItems() were renamed to setDrawAnnotations() and drawAnnotations()
577+
575578

576579
QgsComposerMapGrid {#qgis_api_break_3_0_QgsComposerMapGrid}
577580
------------------
@@ -1778,6 +1781,7 @@ were removed. Use the QgsProperty/QgsPropertyCollection methods instead.
17781781
- usedAttributes() now requires a QgsRenderContext argument
17791782
- saveDataDefinedProperties() was removed. This is no longer required.
17801783
- restoreDataDefinedProperties() was renamed to restoreOldDataDefinedProperties()
1784+
- estimateMaxBleed() now requires a QgsRenderContext argument (since the bleed depends on render context for non-pixel units)
17811785

17821786

17831787
QgsSymbolLayerRegistry {#qgis_api_break_3_0_QgsSymbolLayerRegistry}
@@ -1813,6 +1817,7 @@ QgsSymbolLayerUtils (renamed from QgsSymbolLayerUtilsV2) {#qgis_api_break
18131817
- convertFromMapUnits() was moved to QgsRenderContext::convertFromMapUnits()
18141818
- pixelSizeScaleFactor() was removed. Use QgsRenderContext::convertToPainterUnits() instead.
18151819
- mapUnitScaleFactor() was removed. Use QgsRenderContext::convertToMapUnits() instead.
1820+
- estimateMaxSymbolBleed() now requires a QgsRenderContext argument (since the bleed depends on render context for non-pixel units)
18161821

18171822

18181823
QgsSymbolSelectorWidget {#qgis_api_break_3_0_QgsSymbolSelectorWidget}

python/core/composer/qgscomposerutils.sip

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -222,21 +222,6 @@ class QgsComposerUtils
222222
*/
223223
static void drawText( QPainter* painter, const QRectF& rect, const QString& text, const QFont& font, const QColor& color = QColor(), const Qt::AlignmentFlag halignment = Qt::AlignLeft, const Qt::AlignmentFlag valignment = Qt::AlignTop, const int flags = Qt::TextWordWrap );
224224

225-
/**
226-
* Creates a render context suitable for the specified composer map and QPainter destination.
227-
* This method returns a new QgsRenderContext which matches the scale and settings of the
228-
* target map.
229-
* @note added in QGIS 3.0
230-
* @see createRenderContextForComposition()
231-
*/
232-
static QgsRenderContext createRenderContextForMap( QgsComposerMap* map, QPainter* painter );
233-
234-
/**
235-
* Creates a render context suitable for the specified composition and QPainter destination.
236-
* This method returns a new QgsRenderContext which matches the scale and settings from the composition's
237-
* QgsComposition::referenceMap().
238-
* @note added in QGIS 3.0
239-
* @see createRenderContextForMap()
240-
*/
225+
static QgsRenderContext createRenderContextForMap( QgsComposerMap* map, QPainter* painter, double dpi = -1 );
241226
static QgsRenderContext createRenderContextForComposition( QgsComposition* composition, QPainter* painter );
242227
};

src/core/composer/qgscomposerutils.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,16 +246,17 @@ class CORE_EXPORT QgsComposerUtils
246246
static void drawText( QPainter* painter, const QRectF& rect, const QString& text, const QFont& font, const QColor& color = QColor(), const Qt::AlignmentFlag halignment = Qt::AlignLeft, const Qt::AlignmentFlag valignment = Qt::AlignTop, const int flags = Qt::TextWordWrap );
247247

248248
/**
249-
* Creates a render context suitable for the specified composer map and QPainter destination.
249+
* Creates a render context suitable for the specified composer \a map and \a painter destination.
250250
* This method returns a new QgsRenderContext which matches the scale and settings of the
251-
* target map.
251+
* target map. If the \a dpi argument is not specified then the dpi will be taken from the destinatation
252+
* painter device.
252253
* @note added in QGIS 3.0
253254
* @see createRenderContextForComposition()
254255
*/
255256
static QgsRenderContext createRenderContextForMap( QgsComposerMap* map, QPainter* painter, double dpi = -1 );
256257

257258
/**
258-
* Creates a render context suitable for the specified composition and QPainter destination.
259+
* Creates a render context suitable for the specified \a composition and \a painter destination.
259260
* This method returns a new QgsRenderContext which matches the scale and settings from the composition's
260261
* QgsComposition::referenceMap().
261262
* @note added in QGIS 3.0

0 commit comments

Comments
 (0)