Skip to content

Commit

Permalink
Add missing annotation api break docs, fix sip binding
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 31, 2017
1 parent f79fc25 commit 1fce657
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 25 deletions.
17 changes: 11 additions & 6 deletions doc/api_break.dox
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ Renamed Classes {#qgis_api_break_3_0_renamed_classes}
Removed Classes {#qgis_api_break_3_0_removed_classes}
---------------

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


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


QgsAnnotation {#qgis_api_break_3_0_QgsAnnotation}
-------------

- mapPositionFixed() has been renamed to hasFixedMapPosition()


QgsAbstractGeometry {#qgis_api_break_3_0_QgsAbstractGeometry}
-------------------

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


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


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


QgsSymbolSelectorWidget {#qgis_api_break_3_0_QgsSymbolSelectorWidget}
Expand Down
17 changes: 1 addition & 16 deletions python/core/composer/qgscomposerutils.sip
Original file line number Diff line number Diff line change
Expand Up @@ -222,21 +222,6 @@ class QgsComposerUtils
*/
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 );

/**
* Creates a render context suitable for the specified composer map and QPainter destination.
* This method returns a new QgsRenderContext which matches the scale and settings of the
* target map.
* @note added in QGIS 3.0
* @see createRenderContextForComposition()
*/
static QgsRenderContext createRenderContextForMap( QgsComposerMap* map, QPainter* painter );

/**
* Creates a render context suitable for the specified composition and QPainter destination.
* This method returns a new QgsRenderContext which matches the scale and settings from the composition's
* QgsComposition::referenceMap().
* @note added in QGIS 3.0
* @see createRenderContextForMap()
*/
static QgsRenderContext createRenderContextForMap( QgsComposerMap* map, QPainter* painter, double dpi = -1 );
static QgsRenderContext createRenderContextForComposition( QgsComposition* composition, QPainter* painter );
};
7 changes: 4 additions & 3 deletions src/core/composer/qgscomposerutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,16 +246,17 @@ class CORE_EXPORT QgsComposerUtils
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 );

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

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

0 comments on commit 1fce657

Please sign in to comment.