Skip to content


Browse files Browse the repository at this point in the history
Add api/user break notes
  • Loading branch information
nyalldawson committed Sep 13, 2016
1 parent 25125b0 commit 6cfe562
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 0 deletions.
99 changes: 99 additions & 0 deletions doc/api_break.dox
Expand Up @@ -181,6 +181,11 @@ This page tries to maintain a list with incompatible changes that happened in pr
<li>QgsColorbutton was removed. QgsColorButtonV2 has now been renamed to QgsColorButton. Hence, QgsColorButtonV2 does not exist anymore.</li>
<li>QgsColorDialog was removed, and QgsColorDialogV2 was renamed to QgsColorDialog. Hence, QgsColorButtonV2 does not exist anymore.
All the functionality from the old QgsColorDialog has been moved to the new class.</li>
<li>QgsComposerAttributeTable and associated classes (eg QgsComposerAttributeTableCompare,
QgsComposerAttributeTableColumnModel, QgsComposerTableSortColumnsProxyModel) were removed.
Use QgsComposerAttributeTableV2 instead.</li>
<li>QgsComposerTable was removed. Use QgsComposerAttributeTableV2 instead.</li>
<li>ComposerTextTable was removed. Use ComposerTextTableV2 instead.</li>
<li>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 ).</li>
Expand Down Expand Up @@ -290,6 +295,15 @@ variant instead.</li>

<li>readXMLMapSettings() has been renamed to readXmlMapSettings()</li>
<li>composerMap() and setComposerMap() were removed. Use QgsComposerMap::atlasDriven() and setAtlasDriven()
<li>fixedScale() and setFixedScale() were removed. Use QgsComposerMap::atlasScalingMode() and setAtlasScalingMode()
<li>margin() and setMargin() were removed. Use QgsComposerMap::atlasMargin() and setAtlasMargin()
<li>setSortKeyAttributeIndex() and sortKeyAttributeIndex() were removed. Use sortKeyAttributeName()
and setSortKeyAttributeName() instead.</li>
<li>currentFeature() was removed. Use feature() instead.</li>

\subsection qgis_api_break_3_0_QgsAuthConfigUriEdit QgsAuthConfigUriEdit
Expand Down Expand Up @@ -323,13 +337,44 @@ and the new ramp can be retrieved after executing the dialog by calling ramp().<
<li>Some internal methods which were previously public or protected were made private.</li>

\subsection qgis_api_break_3_0_QgsComposerArrow QgsComposerArrow

<li>setOutlineWidth(), outlineWidth(), arrowColor() and setArrowColor() were removed.
Use setArrowHeadOutlineWidth(), arrowHeadOutlineWidth(), arrowHeadOutlineColor(),
setArrowHeadOutlineColor(), arrowHeadFillColor(), setArrowHeadFillColor(),
setLineSymbol() or lineSymbol() instead.</li>

\subsection qgis_api_break_3_0_QgsComposerAttributeTableV2 QgsComposerAttributeTableV2

<li>setDisplayAttributes() was removed. Use setDisplayedFields() instead.</li>

\subsection qgis_api_break_3_0_QgsComposerItem QgsComposerItem

<li>zoomContent( int delta, double x, double y ) was removed. Use zoomContent( double, QPointF, ZoomMode )
<li>drawText(), textWidthMillimeters(), fontHeightCharacterMM(), fontAscentMillimeters(),
fontDescentMillimeters(), fontHeightMillimeters(), pixelFontSize(), scaledFontPixelSize(),
drawArrowHead(), angle(), largestRotatedRectWithinBounds(), and rotate() were removed.
Use the corresponding methods in QgsComposerUtils instead.</li>
<li>rotation() and setRotation() were removed. Use itemRotation() and setItemRotation()
<li>lockSymbolSize(), imageSizeConsideringRotation(), cornerPointOnRotatedAndScaledRect(),
sizeChangedByRotation() were removed. No replacement is offered for these methods.</li>

\subsection qgis_api_break_3_0_QgsComposerLabel QgsComposerLabel

<li>setExpressionContext() has been removed. Setup the composition using an atlas and with
expression variables in the composer label item instead.</li>
<li>setSubstitutions has been removed. Use expression context variables in the composer
label item instead.</li>
<li>margin() was removed. Use marginX() and marginY() instead.</li>

\subsection qgis_api_break_3_0_QgsComposerLegend QgsComposerLegend
Expand All @@ -350,6 +395,34 @@ label item instead.</li>
<li>containsWMSLayer() has been renamed to containsWmsLayer()</li>
<li>mapRenderer() has been removed. Use mapSettings() instead.</li>
<li>All grid style and format enums were moved to QgsComposerMapGrid.</li>
<li>All grid property getters and setters were moved to QgsComposerMapGrid,
and should be accessed using QgsComposerMap::grid() or QgsComposerMap::grids().</li>
<li>All overview property getters and setters were moved to QgsComposerMapOverview,
and should be accessed using QgsComposerMap::overview() or QgsComposerMap::overviews().</li>
<li>overviewExtentChanged() was moved to QgsComposerMapOverview.</li>
<li>toggleAtlasPreview(), connectMapOverviewSignals() were no longer required and are removed.</li>
<li>setRotation() and rotation() were removed. Use setMapRotation() and mapRotation()
<li>atlasFixedScale() and setAtlasFixedScale() were removed. Use atlasScalingMode()
and setAtlasScalingMode() instead.</li>

\subsection qgis_api_break_3_0_QgsComposerMapGrid QgsComposerMapGrid

<li>The annotation position Disabled was removed. QgsComposerMapGrid::HideAll
should be used instead.</li>

\subsection qgis_api_break_3_0_QgsComposerMultiFrame QgsComposerMultiFrame

<li>render( QPainter* p, const QRectF& renderExtent ) was removed. Use
render( QPainter* painter, const QRectF& renderExtent, const int frameIndex )
<li>render( QPainter* painter, const QRectF& renderExtent, const int frameIndex )
was made pure virtual.</li>

\subsection qgis_api_break_3_0_QgsComposerNodesItem QgsComposerNodesItem
Expand All @@ -359,20 +432,46 @@ label item instead.</li>
<li>_writeXMLStyle() has been renamed to _writeXMLStyle()</li>

\subsection qgis_api_break_3_0_QgsComposerPicture QgsComposerPicture

<li>setPictureFile() and pictureFile() were removed. Use setPicturePath()
and picturePath() instead.</li>
<li>rotation() and setRotation() were removed. Use pictureRotation()
and setPictureRotation() instead.</li>
<li>usePictureExpression() and pictureExpression() were removed. Use
QgsComposerObject::dataDefinedProperty instead.</li>
<li>setUsePictureExpression() was removed. Use
QgsComposerObject::setDataDefinedProperty() instead.</li>
<li>updatePictureExpression() was removed.</li>

\subsection qgis_api_break_3_0_QgsComposerTable QgsComposerTable

<li>tableWriteXML() has been renamed to tableWriteXml()</li>
<li>tableReadXML() has been renamed to tableReadXml()</li>

\subsection qgis_api_break_3_0_QgsComposerTableV2 QgsComposerTableV2

<li>rowsVisible(), rowRange(), drawHorizontalGridLines() and
drawVerticalGridLines() were removed.</li>

\subsection qgis_api_break_3_0_QgsComposition QgsComposition

<li>addItemsFromXML() has been renamed to addItemsFromXml()</li>
<li>Constructor with QgsMapRenderer parameter has been removed. Use the variant with QgsMapSettings parameter.</li>
<li>mapRenderer() has been removed. Use mapSettings() instead.</li>
<li>setSnapGridTolerance(), setAlignmentSnapTolerance(), alignmentSnapTolerance() and snapGridTolerance()
were removed. Use setSnapTolerance() and snapTolerance() instead.</li>
<li>getComposerHtmlByItem() was removed. Use QgsComposerFrame::multiFrame() instead.</li>
<li>pixelFontSize(), pointFontSize(), relativeResizeRect(), relativePosition() were removed. Use the corresponding methods in QgsComposerUtils instead.</li>
<li>sortZList() was removed. Use refreshZList() instead.</li>
<li>addComposerTable(), composerTableAdded() were removed.</li>

\subsection qgis_api_break_3_0_QgsCoordinateReferenceSystem QgsCoordinateReferenceSystem
Expand Down
5 changes: 5 additions & 0 deletions doc/qgis3_user_changes.dox
Expand Up @@ -21,4 +21,9 @@ be updated so that any expressions in use have the following changes:
<li>$numfeatures has been replaced by \@atlas_totalfeatures</li>

\section qgis3_user_changes_composer Composer

Very old projects containing composer attribute tables will not restore the attribute
tables when loaded into QGIS 3.0. These tables must be manually readded to the compositions.


0 comments on commit 6cfe562

Please sign in to comment.