QGIS/doc/api_break.dox
2017-02-14 18:41:54 +01:00

2128 lines
106 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*! \page api_break Backwards Incompatible Changes
\tableofcontents
The API of QGIS libraries is allowed to be changed just between major versions of QGIS. For example, there
are various planned backwards incompatible changes between QGIS 1.8 and 2.0 because the version 2.0 is a new
major version. After a release of a major version of QGIS (e.g. 2.0) the developer team is committed to maintain
stable API for all subsequent minor releases (2.2, 2.4, ...). That roughly means we do not rename classes and methods,
remove them nor change their semantics. Existing code should keep working when the user updates QGIS
to another minor version (e.g. from 2.0 to 2.2), so all extensions of existing classes should be done in a manner that
third party developers do not need to adjust their code to work properly with newer QGIS releases.
Sometimes, however, we may need to break the API as a result of some code changes. These cases should be only exceptions
and they should happen only after consideration and agreement of the development team. Backwards incompatible changes
with too big impact should be deferred to a major version release.
This page tries to maintain a list with incompatible changes that happened in previous releases.
QGIS 3.0 {#qgis_api_break_3_0}
========
Version 3.0 brings changes to many underlying dependencies which QGIS is built upon. Any existing PyQGIS code will
need to be updated to address the changes made within these libraries.
Python 3.0
----------
QGIS 3.0 introduces a move to Python 3. This version brings many changes to both the Python language and individual Python
libraries. A good place to start learning about the changes involved, and how to port your code to Python 3, is available
in the official Python documentation: [Porting Python 2 Code to Python 3](https://docs.python.org/3/howto/pyporting.html).
Qt 5
----
QGIS 3.0 is based off version 5 of the underlying Qt libraries. Many changes and API breaks were introduced in Qt5. While
it is c++ specific, a good place to read about the major changes introduced in Qt5 is at the Qt docs:
[C++ API changes](http://doc.qt.io/qt-5/sourcebreaks.html)
PyQt 5
------
Together with the Python and Qt version changes, the PyQt libraries which expose Qt classes to Python have also had their
version bumped to PyQt 5. The changes introduced in PyQt 5 and the steps required to upgrade existing code are summarised at:
[Differences Between PyQt4 and PyQt5](http://pyqt.sourceforge.net/Docs/PyQt5/pyqt4_differences.html)
Moved Classes {#qgis_api_break_3_0_moved_classes}
-------------
<table>
<caption id="moved_classes">Moved classes</caption>
<tr><th>class<th>Module 2.X<th>Module 3.x
<tr><td>QgsMapLayerModel<td>gui<td>core
<tr><td>QgsMapLayerProxyModel<td>gui<td>core
</table>
Renamed Classes {#qgis_api_break_3_0_renamed_classes}
---------------
<table>
<caption id="renamed_classes">Renamed classes</caption>
<tr><th>API 2.x<th>API 3.X
<tr><td>QgsAttributeAction<td>QgsActionManager
<tr><td>QgsAbstractGeometryV2<td>QgsAbstractGeometry
<tr><td>QgsCategorizedSymbolRendererV2<td>QgsCategorizedSymbolRenderer
<tr><td>QgsCategorizedSymbolRendererV2Model<td>QgsCategorizedSymbolRendererModel
<tr><td>QgsCategorizedSymbolRendererV2ViewStyle<td>QgsCategorizedSymbolRendererViewStyle
<tr><td>QgsCategorizedSymbolRendererV2Widget<td>QgsCategorizedSymbolRendererWidget
<tr><td>QgsCentroidFillSymbolLayerV2<td>QgsCentroidFillSymbolLayer
<tr><td>QgsCentroidFillSymbolLayerV2Widget<td>QgsCentroidFillSymbolLayerWidget
<tr><td>QgsCircularStringV2<td>QgsCircularString
<tr><td>QgsColorButtonV2<td>QgsColorButton
<tr><td>QgsComposerLegendStyle<td>QgsLegendStyle
<tr><td>QgsComposerSymbolV2Item<td>QgsComposerSymbolItem
<tr><td>QgsComposerTableAvailableSortProxyModelV2<td>QgsComposerTableAvailableSortProxyModel
<tr><td>QgsCompoundCurveV2<td>QgsCompoundCurve
<tr><td>QgsCoordinateSequenceV2<td>QgsCoordinateSequence
<tr><td>QgsCptCityColorRampV2<td>QgsCptCityColorRamp
<tr><td>QgsCptCityColorRampV2Dialog<td>QgsCptCityColorRampDialog
<tr><td>QgsCptCityColorRampV2DialogBase<td>QgsCptCityColorRampDialogBase
<tr><td>QgsCurvePolygonV2<td>QgsCurvePolygon
<tr><td>QgsCurveV2<td>QgsCurve
<tr><td>QgsDbFilterProxyModel<td>QgsDatabaseFilterProxyModel
<tr><td>QgsDiagramRendererV2<td>QgsDiagramRenderer
<tr><td>QgsEditorWidgetV2<td>QgsEditorWidget
<tr><td>QgsEllipseSymbolLayerV2<td>QgsEllipseSymbolLayer
<tr><td>QgsEllipseSymbolLayerV2Widget<td>QgsEllipseSymbolLayerWidget
<tr><td>QgsFavouritesItem<td>QgsFavoritesItem
<tr><td>QgsFeatureRendererV2<td>QgsFeatureRenderer
<tr><td>QgsFillSymbolLayerV2<td>QgsFillSymbolLayer
<tr><td>QgsFillSymbolV2<td>QgsFillSymbol
<tr><td>QgsFontMarkerSymbolLayerV2<td>QgsFontMarkerSymbolLayer
<tr><td>QgsFontMarkerSymbolLayerV2Widget<td>QgsFontMarkerSymbolLayerWidget
<tr><td>QgsGeometryCollectionV2<td>QgsGeometryCollection
<tr><td>QgsGeometryGeneratorSymbolLayerV2<td>QgsGeometryGeneratorSymbolLayer
<tr><td>QgsGradientFillSymbolLayerV2<td>QgsGradientFillSymbolLayer
<tr><td>QgsGradientFillSymbolLayerV2Widget<td>QgsGradientFillSymbolLayerWidget
<tr><td>QgsGraduatedSymbolRendererV2<td>QgsGraduatedSymbolRenderer
<tr><td>QgsGraduatedSymbolRendererV2Model<td>QgsGraduatedSymbolRendererModel
<tr><td>QgsGraduatedSymbolRendererV2ViewStyle<td>QgsGraduatedSymbolRendererViewStyle
<tr><td>QgsGraduatedSymbolRendererV2Widget<td>QgsGraduatedSymbolRendererWidget
<tr><td>QgsLabelingEngineV2<td>QgsLabelingEngine
<tr><td>QgsLegendModelV2<td>QgsLegendModel
<tr><td>QgsLegendSymbolItemV2<td>QgsLegendSymbolItem
<tr><td>QgsLineStringV2<td>QgsLineString
<tr><td>QgsLineSymbolLayerV2<td>QgsLineSymbolLayer
<tr><td>QgsLineSymbolV2<td>QgsLineSymbol
<tr><td>QgsMarkerLineSymbolLayerV2<td>QgsMarkerLineSymbolLayer
<tr><td>QgsMarkerLineSymbolLayerV2Widget<td>QgsMarkerLineSymbolLayerWidget
<tr><td>QgsMarkerSymbolLayerV2<td>QgsMarkerSymbolLayer
<tr><td>QgsMarkerSymbolV2<td>QgsMarkerSymbol
<tr><td>QgsMultiCurveV2<td>QgsMultiCurve
<tr><td>QgsMultiLineStringV2<td>QgsMultiLineString
<tr><td>QgsMultiSurfaceV2<td>QgsMultiSurface
<tr><td>QgsPointSequenceV2<td>QgsPointSequence
<tr><td>QgsProperty<td>QgsProjectProperty
<tr><td>QgsPropertyKey<td>QgsProjectPropertyKey
<tr><td>QgsPropertyValue<td>QgsProjectPropertyValue
<tr><td>QgsRandomColorsV2<td>QgsRandomColorRamp
<tr><td>QgsRendererCategoryV2<td>QgsRendererCategory
<tr><td>QgsRendererRangeV2<td>QgsRendererRange
<tr><td>QgsRendererRangeV2LabelFomat<td>QgsRendererRangeLabelFomat
<tr><td>QgsRendererRangeV2LabelFormat<td>QgsRendererRangeLabelFormat
<tr><td>QgsRendererV2<td>QgsRenderer
<tr><td>QgsRendererV2AbstractMetadata<td>QgsRendererAbstractMetadata
<tr><td>QgsRendererV2CreateFromSldFunc<td>QgsRendererCreateFromSldFunc
<tr><td>QgsRendererV2CreateFunc<td>QgsRendererCreateFunc
<tr><td>QgsRendererV2DataDefinedMenus<td>QgsRendererDataDefinedMenus
<tr><td>QgsRendererV2Metadata<td>QgsRendererMetadata
<tr><td>QgsRendererV2PropertiesDialog<td>QgsRendererPropertiesDialog
<tr><td>QgsRendererV2PropsDialogBase<td>QgsRendererPropsDialogBase
<tr><td>QgsRendererV2Registry<td>QgsRendererRegistry
<tr><td>QgsRendererV2Widget<td>QgsRendererWidget
<tr><td>QgsRendererV2WidgetFunc<td>QgsRendererWidgetFunc
<tr><td>QgsRingSequenceV2<td>QgsRingSequence
<tr><td>QgsRuleBasedRendererV2<td>QgsRuleBasedRenderer
<tr><td>QgsRuleBasedRendererV2Count<td>QgsRuleBasedRendererCount
<tr><td>QgsRuleBasedRendererV2Model<td>QgsRuleBasedRendererModel
<tr><td>QgsRuleBasedRendererV2Widget<td>QgsRuleBasedRendererWidget
<tr><td>QgsShapeburstFillSymbolLayerV2<td>QgsShapeburstFillSymbolLayer
<tr><td>QgsShapeburstFillSymbolLayerV2Widget<td>QgsShapeburstFillSymbolLayerWidget
<tr><td>QgsSimpleFillSymbolLayerV2<td>QgsSimpleFillSymbolLayer
<tr><td>QgsSimpleFillSymbolLayerV2Widget<td>QgsSimpleFillSymbolLayerWidget
<tr><td>QgsSimpleLineSymbolLayerV2<td>QgsSimpleLineSymbolLayer
<tr><td>QgsSimpleLineSymbolLayerV2Widget<td>QgsSimpleLineSymbolLayerWidget
<tr><td>QgsSimpleMarkerSymbolLayerV2<td>QgsSimpleMarkerSymbolLayer
<tr><td>QgsSimpleMarkerSymbolLayerV2Widget<td>QgsSimpleMarkerSymbolLayerWidget
<tr><td>QgsSingleSymbolRendererV2<td>QgsSingleSymbolRenderer
<tr><td>QgsSingleSymbolRendererV2Widget<td>QgsSingleSymbolRendererWidget
<tr><td>QgsStyleV2<td>QgsStyle
<tr><td>QgsStyleV2ExportImportDialog<td>QgsStyleExportImportDialog
<tr><td>QgsStyleV2ExportImportDialogBase<td>QgsStyleExportImportDialogBase
<tr><td>QgsStyleV2GroupSelectionDialog<td>QgsStyleGroupSelectionDialog
<tr><td>QgsStyleV2ManagerDialog<td>QgsStyleManagerDialog
<tr><td>QgsStyleV2ManagerDialogBase<td>QgsStyleManagerDialogBase
<tr><td>QgsSurfaceV2<td>QgsSurface
<tr><td>QgsSvgMarkerSymbolLayerV2<td>QgsSvgMarkerSymbolLayer
<tr><td>QgsSvgMarkerSymbolLayerV2Widget<td>QgsSvgMarkerSymbolLayerWidget
<tr><td>QgsSymbolLayerV2<td>QgsSymbolLayer
<tr><td>QgsSymbolLayerV2AbstractMetadata<td>QgsSymbolLayerAbstractMetadata
<tr><td>QgsSymbolLayerV2Metadata<td>QgsSymbolLayerMetadata
<tr><td>QgsSymbolLayerV2Registry<td>QgsSymbolLayerRegistry
<tr><td>QgsSymbolLayerV2Utils<td>QgsSymbolLayerUtils
<tr><td>QgsSymbolLayerV2Widget<td>QgsSymbolLayerWidget
<tr><td>QgsSymbolLevelsV2Dialog<td>QgsSymbolLevelsDialog
<tr><td>QgsSymbolV2LegendNode<td>QgsSymbolLegendNode
<tr><td>QgsSymbolV2LevelItem<td>QgsSymbolLevelItem
<tr><td>QgsSymbolV2RenderContext<td>QgsSymbolRenderContext
<tr><td>QgsSymbolV2SelectorDialog<td>QgsSymbolSelectorDialog
<tr><td>QgsSymbolV2SelectorWidget<td>QgsSymbolSelectorWidget
<tr><td>QgsVectorColorBrewerColorRampV2<td>QgsColorBrewerColorRamp
<tr><td>QgsVectorColorBrewerColorRampV2Dialog<td>QgsColorBrewerColorRampDialog
<tr><td>QgsVectorColorBrewerColorRampV2DialogBase<td>QgsColorBrewerColorRampDialogBase
<tr><td>QgsVectorColorRampV2<td>QgsColorRamp
<tr><td>QgsVectorColorRampV2Map<td>QgsVectorColorRampMap
<tr><td>QgsVectorGradientColorRampV2<td>QgsGradientColorRamp
<tr><td>QgsVectorGradientColorRampV2Dialog<td>QgsGradientColorRampDialog
<tr><td>QgsVectorGradientColorRampV2DialogBase<td>QgsGradientColorRampDialogBase
<tr><td>QgsVectorGradientRampV2<td>QgsVectorGradientRamp
<tr><td>QgsVectorJoinInfo<td>QgsVectorLayerJoinInfo
<tr><td>QgsVectorLayersetRendererV2<td>QgsVectorLayersetRenderer
<tr><td>QgsVectorRandomColorRampV2<td>QgsLimitedRandomColorRamp
<tr><td>QgsVectorRandomColorRampV2Dialog<td>QgsLimitedRandomColorRampDialog
<tr><td>QgsVectorRandomColorRampV2DialogBase<td>QgsLimitedRandomColorRampDialogBase
<tr><td>QgsSymbolV2<td>QgsSymbol
<tr><td>QgsArcProperter<td>QgsStrategy
<tr><td>QgsDistanceArcProperter<td>QgsDistanceStrategy
<tr><td>QgsGraphArc<td>QgsGraphEdge
</table>
<table>
<caption id="renamed_enum_values">Renamed enum values</caption>
<tr><th>class</th><th>API 2.x<th>API 3.X
<tr><td>QgsLayerTreeModelLegendNode<td>SymbolV2LegacyRuleKeyRole<td>SymbolLegacyRuleKeyRole
<tr><td>QgsVectorLayer<td>EditorWidgetV2<td>EditorWidget
</table>
<table>
<caption id="renamed_methods">Renamed method names</caption>
<tr><th>class</th><th>API 2.x<th>API 3.X
<tr><td>QgsAnnotation<td>mapPositionFixed<td>hasFixedMapPosition
<tr><td>QgsApplication<td>defaultStyleV2Path<td>defaultStylePath
<tr><td>QgsApplication<td>userStyleV2Path<td>userStylePath
<tr><td>QgsComposerShape<td>setUseSymbolV2<td>setUseSymbol
<tr><td>QgsIFeatureSelectionManager<td>selectedFeaturesIds<td>selectedFeatureIds
<tr><td>QgsMapLayer<td>capitaliseLayerName<td>capitalizeLayerName <!--#spellok-->
<tr><td>QgsSymbolLayerUtils<td>createSymbolLayerV2ListFromSld<td>createSymbolLayerListFromSld
<tr><td>QgsVectorLayer<td>editorWidgetV2Config<td>editorWidgetConfig
<tr><td>QgsVectorLayer<td>editorWidgetV2Text<td>editorWidgetText
<tr><td>QgsVectorLayer<td>editorWidgetV2Type<td>editorWidgetType
<tr><td>QgsVectorLayer<td>deleteVertexV2<td>deleteVertex
<tr><td>QgsVectorLayer<td>rendererV2<td>renderer
<tr><td>QgsVectorLayer<td>selectedFeaturesIds<td>selectedFeatureIds
<tr><td>QgsVectorLayerEditUtils<td>deleteVertexV2<td>deleteVertex
<tr><td>QgsComposerSymbolItem<td>symbolV2<td>symbol
<tr><td>QgsServerInterface<td>capabiblitiesCache<td>capabilitiesCache
<tr><td>QgsGraphEdge<td>property<td>cost
<tr><td>QgsGraphEdge<td>properties<td>strategies
<tr><td>QgsGraphVertex<td>outArc<td>outEdges
<tr><td>QgsGraphVertex<td>inArc<td>inEdges
<tr><td>QgsGraph<td>addArc<td>addEdges
<tr><td>QgsGraph<td>arcCount<td>edgeCount
<tr><td>QgsGraph<td>arc<td>edge
<tr><td>QgsGraphBuilder<td>addArc<td>addEdge
<tr><td>QgsGraphBuilderInterface<td>addArc<td>addEdge
<tr><td>QgsGraphDirectory<td>addProperter<td>addStrategy
<tr><td>QgsStrategy<td>addProperter<td>addStrategy
</table>
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.
- 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.
- QgsColorRampComboBox was removed, replaced by QgsColorRampButton
- QgsComposerAttributeTable and associated classes (eg QgsComposerAttributeTableCompare,
QgsComposerAttributeTableColumnModel, QgsComposerTableSortColumnsProxyModel) were removed.
Use QgsComposerAttributeTableV2 instead.
- QgsComposerLegendItem and subclasses were removed (QgsComposerSymbolItem, QgsComposerRasterSymbolItem, QgsComposerLayerItem, QgsComposerGroupItem, QgsComposerStyleItem).
- QgsComposerTable was removed. Use QgsComposerAttributeTableV2 instead.
- ComposerTextTable was removed. Use ComposerTextTableV2 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 ).
- QgsDataDefined was removed. Use the QgsProperty framework instead.
- QgsDataDefinedButton was removed. Use QgsPropertyOverrideButton instead.
- QgsFileNameWidgetWrapper was removed. Use QgsExternalResourceWidgetWrapper instead.
- 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.
- QgsLegendInterface was removed. It was replaced by layer tree API (QgsLayerTreeNode class and others).
Methods that deal with custom actions in main window's layer tree context menu were moved to QgisInterface:
- addLegendLayerAction() moved to QgisInterface::addCustomActionForLayerType()
- addLegendLayerActionForLayer() moved to QgisInterface::addCustomActionForLayer()
- removeLegendLayerAction() moved to QgisInterface::removeCustomActionForLayerType()
- QgsLegendModel was removed.
- QgsMapCanvasLayer. Map canvas and overview canvas are updated separately with their own setLayers() calls.
- QgsMapCanvasMap. It is an internal class used by map canvas.
- QgsMapLayerRegistry. Its functionality has been moved to QgsProject.
- QgsMapRenderer. It has been replaced by QgsMapRendererJob with subclasses and QgsMapSettings.
- QgsPhotoWidgetWrapper was removed. Use QgsExternalResourceWidgetWrapper instead.
- QgsPseudoColorShader. This shader has been broken for some time and was replaced by QgsSingleBandPseudoColorRenderer.
- QgsProjectBadLayerGuiHandler was removed. It was unused in QGIS code and barely useful. Implement your own QgsProjectBadLayerHandler subclass if needed.
- QgsRendererV2DataDefinedMenus was removed. Use QgsDataDefinedButton instead.
- QgsSizeScaleWidget. Use QgsPropertyAssistantWidget instead.
- QgsLegacyHelpers.
- QgsProviderCountCalcEvent and QgsProviderExtentCalcEvent. These classes were unused in QGIS core and unmaintained.
- QgsWebviewWidgetWrapper was removed. Use QgsExternalResourceWidgetWrapper instead.
- QgsEditorWidgetConfig was removed. Use QVariantMap instead.
- QgsScaleExpression. Use QgsProperty with a QgsSizeScalePropertyTransformer 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}
---------------
- All setDestinationCRS() methods have been renamed to setDestinationCrs()
- All destinationCRS() methods have been renamed to destinationCrs()
- All readXML() and _readXML() methods have been renamed to readXml() and _readXml()
- All writeXML() and _writeXML() methods have been renamed to writeXml() and _writeXml()
- All setLayerID() methods have been renamed to setLayerId()
- All layerID() methods have been renamed to layerId()
- All setCRS() methods have been renamed to setCrs()
- All srcCrs() methods have been renamed to sourceCrs()
- All destCrs() methods have been renamed to destinationCrs()
- All exportXML() methods have been renamed to exportXml()
- All importXML() methods have been renamed to importXml()
- All methods taking or returning QGis::WkbType have been changed to use QgsWkbTypes::Type
- All methods taking or returning QGis::GeometryType have been changed to use QgsWkbTypes::GeometryType
- Network analysis library has been merged into analysis library
Data Providers {#qgis_api_break_3_0_DataProviders}
--------------
- Many methods in QgsDataProvider, QgsVectorDataProvider and QgsRasterDataProvider have been made const-correct.
This has no effect on PyQGIS code, but c++ code implementing third-party providers will need to update the
signatures of these methods to match. Affected methods are:
- QgsDataProvider: crs(), extent(), isValid(), supportsSubsetString(), subsetString()
- QgsVectorDataProvider: getFeatures(), minimumValue(), maximumValue(), uniqueValues(), enumValues(), defaultValue(),
attributeIndexes(), pkAttributeIndexes(), isSaveAndLoadStyleToDatabaseSupported()
- QgsRasterInterface: extent()
- Many protected member variables have been wrapped in setter/getter methods.
This should generally only affect 3rd party providers
- mCacheMinMaxDirty: use clearMinMaxCache()
- mNativeTypes: use setNativeTypes()
- mAttrPalIndexName: overwrite palAttributeIndexNames()
Qgis {#qgis_api_break_3_0_Qgis}
----
- The QGis class was renamed to Qgis for capitalization consistency with other class names
- permissiveToDouble() and permissiveToInt() where moved out of the QGis class and renamed to qgsPermissiveToDouble() and
qgsPermissiveToInt()
- The constants DEFAULT_IDENTIFY_RADIUS and MINIMUM_POINT_SIZE were removed
- QGis::DecimalDegrees, DegreesMinutesSeconds and DegreesDecimalMinutes have been removed, and have all been replaced
with the general Degrees unit
- The distance unit types QGis::UnitType (including QGis::Meters, QGis::Feet, QGis::Degrees, QGis::NauticalMiles,
QGis::Kilometers, QGis::Yards, QGis::Miles and QGis::UnknownUnit have been moved to QgsUnitTypes::DistanceUnit.
Some of these unit types have also been renamed - see the notes on QgsUnitTypes below. All methods which accepted
QGis::UnitType parameters have been updated to take QgsUnitTypes::DistanceUnit instead.
- The unit handling methods toLiteral, fromLiteral, tr, fromTr, fromUnitToUnitFactor have been removed. Their
corresponding counterparts in QgsUnitTypes should be used instead.
- The enum QGis::WkbType has been removed in favor of QgsWkbTypes::Type
- The enum QGis::GeometryType has been removed in favor of QgsWkbTypes::GeometryType
- singleType() has been removed. Use the equivalent QgsWkbTypes::singleType() instead
- multiType() has been removed. Use the equivalent QgsWkbTypes::multiType() instead
- flatType() has been removed. Use the equivalent QgsWkbTypes::flatType() instead
- isSingleType() has been removed. Use the equivalent QgsWkbTypes::issingleType() instead
- isMultiType() has been removed. Use the equivalent QgsWkbTypes::isMultiType() instead
- wkbDimensions() has been removed. Use the equivalent QgsWkbTypes::coordDimensions() instead
- fromOldWkbType() has been removed. This is no longer required.
- fromNewWkbType() has been removed. This is no longer required.
- vectorGeometryType() has been removed. Use the equivalent QgsWkbTypes::geometrydisplayString() instead.
- featureType() has been removed. Use the equivalent QgsWkbTypes::displayString() instead.
QgisInterface {#qgis_api_break_3_0_QgisInterface}
-------------
- fileMenu() has been removed, use projectMenu() instead.
- actionRemoveLayer was removed as it no longer exists.
QgsAbstractGeometry {#qgis_api_break_3_0_QgsAbstractGeometry}
-------------------
- asWkb() returns QByteArray instead of new raw pointer
- wkbSize() has been removed, use asWkb() to get length of returned QByteArray
- fromWkb() gets the WKB pointer passed by reference instead of value, so that caller may to find out where the parsing ended
QgsActionManager {#qgis_api_break_3_0_QgsActionManager}
----------------
- `doAction()` no longer accepts a substitution map. Use expression context
variables instead.
- The `doAction()` variant which takes a QgsFeature along has been removed. Use
the expression context variant instead.
- `expandAction()` has been removed. Use
`QgsExpression::replaceExpressionText()` instead.
- `setPythonExecute()` was removed. Initialize `QgsPythonRunner` instead.
- `QgsActionManager::listActions()` has been renamed to `QgsActionManager::actions( actionScope )`.
- `QgsActionManager::removeAction()` takes an actions UUID instead of an index.
- `QgsActionManager::doAction()` takes an actions UUID instead of an index.
- `QgsActionManager::writeXml()` no longer takes a QDomDocument. The document is
extracted from the layerNode.
- `QgsActionManager::at()` has been removed. Use `QgsActionManager::action( id )`
to get an action by its UUID.
- `QgsActionManager::defaultAction()` works on a per-scope basis and with UUIDs
instead of indexes.
QgsAction {#qgis_api_break_3_0_QgsAction}
---------
- `QgsAction::action()` has been renamed to `QgsAction::command()`.
- `QgsAction::showInAttributeTable()` has been removed. Use
`QgsAction::actionScopes()` instead and check for the 'Feature' scope.
QgsAdvancedDigitizingDockWidget {#qgis_api_break_3_0_QgsAdvancedDigitizingDockWidget}
-------------------------------
- canvasReleaseEvent takes now QgsAdvancedDigitizingDockWidget::CaptureMode as second argument.
QgsApplication {#qgis_api_break_3_0_QgsApplication}
--------------
- qgisMasterDbFilePath() was renamed to qgisMasterDatabaseFilePath()
- qgisMasterDatabaseFilePath() was renamed to qgisUserDatabaseFilePath()
- qgisAuthDbFilePath() was renamed to qgisAuthDatabaseFilePath()
- srsDbFilePath() was renamed to srsDatabaseFilePath()
- setAuthDbDirPath() was renamed to setAuthDatabaseDirPath()
- createDB() was renamed to createDatabase()
QgsAtlasComposition {#qgis_api_break_3_0_QgsAtlasComposition}
-------------------
- readXMLMapSettings() was removed. QGIS no longer supports upgrading pre 2.2 compositions and if this is a
requirement the projects should first be upgraded by opening and saving in 2.18.
- composerMap() and setComposerMap() were removed. Use QgsComposerMap::atlasDriven() and setAtlasDriven()
instead
- fixedScale() and setFixedScale() were removed. Use QgsComposerMap::atlasScalingMode() and setAtlasScalingMode()
instead
- margin() and setMargin() were removed. Use QgsComposerMap::atlasMargin() and setAtlasMargin()
instead
- setSortKeyAttributeIndex() and sortKeyAttributeIndex() were removed. Use sortKeyAttributeName()
and setSortKeyAttributeName() instead.
- currentFeature() was removed. Use feature() instead.
QgsAttributeDialog {#qgis_api_break_3_0_QgsAttributeDialog}
------------------
- The constructor for QgsAttributeDialog has changed
- dialog() was removed - just use the object directly.
- setIsAddDialog() was removed. Use setMode() instead.
QgsAttributeForm {#qgis_api_break_3_0_QgsAttributeForm}
----------------
- setIsAddDialog() was removed. Use setMode() instead.
- accept() was removed. Use save() instead.
- reject() was removed. Use resetValues() instead.
QgsAuthConfigUriEdit {#qgis_api_break_3_0_QgsAuthConfigUriEdit}
--------------------
- hasConfigID() has been renamed to hasConfigId()
QgsAuthManager {#qgis_api_break_3_0_QgsAuthManager}
--------------
- authDbConnection() was renamed to authDatabaseConnection()
- authDbConfigTable() was renamed to authDatabaseConfigTable()
- authDbServersTable() was renamed to authDatabaseServersTable()
- authenticationDbPath() was renamed to authenticationDatabasePath()
- masterPasswordHashInDb() was renamed to masterPasswordHashInDatabase()
- scheduledAuthDbErase() was renamed to scheduledAuthDatabaseErase()
- setScheduledAuthDbErase() was renamed to setScheduledAuthDatabaseErase()
- setScheduledAuthDbEraseRequestEmitted() was renamed to setScheduledAuthDatabaseEraseRequestEmitted()
QgsAuthMethod {#qgis_api_break_3_0_QgsAuthMethod}
-------------
- DataSourceURI has been renamed to DataSourceUri
- GenericDataSourceURI has been renamed to GenericDataSourceUri
QgsBrowserModel {#qgis_api_break_3_0_QgsBrowserModel}
---------------
- addFavouriteDirectory has been renamed to addFavoriteDirectory
- removeFavourite has been renamed to removeFavorite
QgsCachedFeatureIterator {#qgis_api_break_3_0_QgsQgsCachedFeatureIterator}
------------------------
- The constructor for QgsCachedFeatureIterator has changed.
QgsCategorizedRenderer {#qgis_api_break_3_0_QgsCategorizedRenderer}
--------------------
- setInvertedColorRamp() and invertedColorRamp() functions are gone, QgsColorRamp now responsible for invert
- createRenderer() and updateColorRamp()'s inverted parameter is gone
QgsCategorizedSymbolRendererWidget {#qgis_api_break_3_0_QgsCategorizedSymbolRendererWidget}
----------------------------------
- sizeScaleFieldChanged() and scaleMethodChanged() were removed. These settings are no longer exposed in the widget's GUI.
- getColorRamp() was removed.
QgsClipper {#qgis_api_break_3_0_QgsClipper}
----------
- clippedLineWKB has been renamed to clippedLine and it's signature has been changed to return a QPolygonF
QgsColorBrewerColorRampDialog {#qgis_api_break_3_0_QgsColorBrewerColorRampDialog}
-----------------------------
- The dialog no longer edits a color ramp in place. Instead, a copy of the ramp is edited
and the new ramp can be retrieved after executing the dialog by calling ramp().
- Some internal methods which were previously public or protected were made private.
QgsColorBrewerPalette {#qgis_api_break_3_0_QgsColorBrewerPalette}
---------------------
- brewerString was renamed to BREWER_STRING
QgsColorButton {#qgis_api_break_3_0_QgsColorButton}
--------------
- Behaviour enum and its corresponding setter/getter have been renamed to Behavior <!--#spellok-->
QgsColorRampShader {#qgis_api_break_3_0_QgsColorRampShader}
------------------
- maximumColorCacheSize() and setMaximumColorCacheSize() were no longer used and are removed.
- ColorRamp_TYPE enum was renamed to Type, and its value names decapitalized
QgsColorSchemeRegistry {#qgis_api_break_3_0_QgsColorSchemeRegistry}
----------------------
- This class is no longer a singleton and instance() has been removed. Instead use QgsApplication::colorSchemeRegistry() to access an application-wide registry.
QgsComposerArrow {#qgis_api_break_3_0_QgsComposerArrow}
----------------
- setOutlineWidth(), outlineWidth(), arrowColor() and setArrowColor() were removed.
Use setArrowHeadOutlineWidth(), arrowHeadOutlineWidth(), arrowHeadOutlineColor(),
setArrowHeadOutlineColor(), arrowHeadFillColor(), setArrowHeadFillColor(),
setLineSymbol() or lineSymbol() instead.
QgsComposerAttributeTableV2 {#qgis_api_break_3_0_QgsComposerAttributeTableV2}
---------------------------
- setDisplayAttributes() was removed. Use setDisplayedFields() instead.
QgsComposerItem {#qgis_api_break_3_0_QgsComposerItem}
---------------
- zoomContent( int delta, double x, double y ) was removed. Use zoomContent( double, QPointF, ZoomMode )
instead.
- drawText(), textWidthMillimeters(), fontHeightCharacterMM(), fontAscentMillimeters(),
fontDescentMillimeters(), fontHeightMillimeters(), pixelFontSize(), scaledFontPixelSize(),
drawArrowHead(), angle(), largestRotatedRectWithinBounds(), and rotate() were removed.
Use the corresponding methods in QgsComposerUtils instead.
- rotation() and setRotation() were removed. Use itemRotation() and setItemRotation()
instead.
- lockSymbolSize(), imageSizeConsideringRotation(), cornerPointOnRotatedAndScaledRect(),
sizeChangedByRotation() were removed. No replacement is offered for these methods.
QgsComposerLabel {#qgis_api_break_3_0_QgsComposerLabel}
----------------
- setExpressionContext() has been removed. Setup the composition using an atlas and with
expression variables in the composer label item instead.
- setSubstitutions has been removed. Use expression context variables in the composer
label item instead.
- margin() was removed. Use marginX() and marginY() instead.
QgsComposerLegend {#qgis_api_break_3_0_QgsComposerLegend}
-----------------
- model() now returns the new QgsLegendModel (previously QgsLegendModelV2, see \ref qgis_api_break_3_0_renamed_classes).
- modelV2() has been renamed to model().
QgsComposerLegendItem {#qgis_api_break_3_0_QgsComposerLegendItem}
---------------------
- writeXMLChildren() has been renamed to writeXmlChildren()
QgsComposerMap {#qgis_api_break_3_0_QgsComposerMap}
--------------
- layerSet() and setLayerSet() have been replaced by layers() and setLayers() which work with list of layers instead of layer IDs
- containsWMSLayer() has been renamed to containsWmsLayer()
- mapRenderer() has been removed. Use mapSettings() instead.
- All grid style and format enums were moved to QgsComposerMapGrid.
- All grid property getters and setters were moved to QgsComposerMapGrid,
and should be accessed using QgsComposerMap::grid() or QgsComposerMap::grids().
- All overview property getters and setters were moved to QgsComposerMapOverview,
and should be accessed using QgsComposerMap::overview() or QgsComposerMap::overviews().
- overviewExtentChanged() was moved to QgsComposerMapOverview.
- toggleAtlasPreview(), connectMapOverviewSignals() were no longer required and are removed.
- setRotation() and rotation() were removed. Use setMapRotation() and mapRotation()
instead.
- atlasFixedScale() and setAtlasFixedScale() were removed. Use atlasScalingMode()
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}
------------------
- The annotation position Disabled was removed. QgsComposerMapGrid::HideAll
should be used instead.
QgsComposerMultiFrame {#qgis_api_break_3_0_QgsComposerMultiFrame}
---------------------
- render( QPainter* p, const QRectF& renderExtent ) was removed. Use
render( QPainter* painter, const QRectF& renderExtent, const int frameIndex )
instead.
- render( QPainter* painter, const QRectF& renderExtent, const int frameIndex )
was made pure virtual.
QgsComposerNodesItem {#qgis_api_break_3_0_QgsComposerNodesItem}
--------------------
- _readXMLStyle() has been renamed to _readXmlStyle()
- _writeXMLStyle() has been renamed to _writeXMLStyle()
- unselectNode() has been renamed to deselectNode() <!--#spellok-->
QgsComposerObject {#qgis_api_break_3_0_QgsComposerObject}
-----------------
- dataDefinedProperty() and setDataDefinedProperty() no longer use QgsDataDefined objects.
Instead these methods have been ported to the QgsProperty framework.
- dataDefinedEvaluate() was removed. Use the QgsProperty evaluation methods instead.
QgsComposerPicture {#qgis_api_break_3_0_QgsComposerPicture}
------------------
- setPictureFile() and pictureFile() were removed. Use setPicturePath()
and picturePath() instead.
- rotation() and setRotation() were removed. Use pictureRotation()
and setPictureRotation() instead.
- usePictureExpression() and pictureExpression() were removed. Use
QgsComposerObject::dataDefinedProperty instead.
- setUsePictureExpression() was removed. Use
QgsComposerObject::setDataDefinedProperty() instead.
- updatePictureExpression() was removed.
QgsComposerScaleBar {#qgis_api_break_3_0_QgsComposerScaleBar}
-------------------
- setBrush() was removed. Use setFillColor() instead.
- setBrush2() was removed. Use setFillColor2() instead.
- setPen() was removed. Use setLineColor() and setLineWidth() instead.
QgsComposerTable {#qgis_api_break_3_0_QgsComposerTable}
----------------
- tableWriteXML() has been renamed to tableWriteXml()
- tableReadXML() has been renamed to tableReadXml()
QgsComposerTableV2 {#qgis_api_break_3_0_QgsComposerTableV2}
------------------
- rowsVisible(), rowRange(), drawHorizontalGridLines() and
drawVerticalGridLines() were removed.
- WrapBehaviour enum and its setter and getter methods has been renamed to WrapBehavior <!--#spellok-->
- EmptyTableBehaviour enum and its setter and getter methods has been renamed to EmptyTableBehavior <!--#spellok-->
QgsComposerView {#qgis_api_break_3_0_QgsComposerView}
--------------------
- unselectNode() has been renamed to deselectNode() <!--#spellok-->
QgsComposerUtils {#qgis_api_break_3_0_QgsComposerUtils}
-----------------
- readDataDefinedPropertyMap() was renamed to readOldDataDefinedPropertyMap() and the signature has changed
to use a QgsPropertyCollection object.
- readDataDefinedProperty() was renamed to readOldDataDefinedProperty() and the signature has changed
to use the QgsProperty framework objects.
- writeDataDefinedPropertyMap() was removed. This is now handled by QgsPropertyCollection::writeXml()
QgsComposition {#qgis_api_break_3_0_QgsComposition}
--------------
- The constructor no longer takes a reference to a QgsMapSettings object. This is no longer
used by compositions. To set the layers to show in composer maps, the QgsComposerMap::setLayers()
method should be used instead.
- constructor requires QgsProject instance
- addItemsFromXML() has been renamed to addItemsFromXml()
- Constructor with QgsMapRenderer parameter has been removed. Use the variant with QgsMapSettings parameter.
- mapRenderer() has been removed. Use mapSettings() instead.
- setSnapGridTolerance(), setAlignmentSnapTolerance(), alignmentSnapTolerance() and snapGridTolerance()
were removed. Use setSnapTolerance() and snapTolerance() instead.
- getComposerHtmlByItem() was removed. Use QgsComposerFrame::multiFrame() instead.
- pixelFontSize(), pointFontSize(), relativeResizeRect(), relativePosition() were removed. Use the corresponding methods in QgsComposerUtils instead.
- sortZList() was removed. Use refreshZList() instead.
- addComposerTable(), composerTableAdded() were removed.
- setAllUnselected() has been renamed to setAllDeselected. <!--#spellok-->
- worldFileMap() and setWorldFileMap() have been renamed to referenceMap() and setReferenceMap()
- dataDefinedProperty() and setDataDefinedProperty() now use the QgsProperty framework instead
of QgsDataDefined objects.
- mapSettings() was removed. Use QgsComposerMap::mapSettings() instead.
QgsCoordinateReferenceSystem {#qgis_api_break_3_0_QgsCoordinateReferenceSystem}
----------------------------
- QgsCoordinateReferenceSystem now uses internal caches to avoid expensive database lookups
when CRS objects are initialized. This is handled internally, but invalidateCache() must be
called if changes are made to the CRS database.
- setCustomSrsValidation() has been renamed to setCustomCrsValidation()
- saveAsUserCRS() has been renamed to saveAsUserCrs()
- geographicCRSAuthId() has been renamed to geographicCrsAuthId()
- geographicFlag() was renamed to isGeographic()
- axisInverted() was renamed to hasAxisInverted()
- syncDb() was renamed to syncDatabase()
QgsCoordinateTransform {#qgis_api_break_3_0_QgsCoordinateTransform}
----------------------
- QgsCoordinateTransform is no longer a QObject. readXml, writeXml and initialize are all normal public members now,
not slots. The invalidTransformInput() signal has been removed.
- The extra QgsCoordinateTransform constructors (those not taking QgsCoordinateReferenceSystem arguments) have been
removed. Now, QgsCoordinateTransform must be created using an already existing source and destination
QgsCoordinateReferenceSystem object.
- QgsCoordinateTransform::clone() has been removed. Just use direct copies instead.
- sourceCrs() and destCrs() now return a copy instead of a reference to the CRS. This has no effect on PyQGIS code, but c++
plugins calling these methods will need to be updated.
- isInitialised() has been renamed to isValid() <!--#spellok-->
- theCRS parameter in setSourceCrs has been renamed to 'crs'
- setDestCRS() has been renamed to setDestinationCrs() for consistency
- destCRS() has been renamed to destinationCrs() for consistency
- theSource, theDest, theSourceSrsId, theDestSrsId, theSourceWkt, theDestWkt, theSourceCRSType parameters in the QgsCoordinateTransform constructors have been renamed to source, destination, sourceSrsId, destinationSrsId, sourceWkt, destinationWkt, sourceCrsType respectively
- 'p' argument in transform() has been renamed to 'point', 'theRect' to 'rectangle', 'poly' to 'polygon'
- setDestCRSID has been removed, use setDestinationCrs() instead
- 'theNode', 'theDoc' parameters in readXML and writeXML have been renamed to 'node' and 'document' respectively
- readXML() and writeXML() have been renamed to readXml() and writeXml() for consistency
QgsCoordinateTransformCache {#qgis_api_break_3_0_QgsCoordinateTransformCache}
---------------------------
- transform() now returns a QgsCoordinateTransform object, not a pointer. An invalid QgsCoordinateTransform will
be returned in place of a null pointer.
QgsCptCityColorRamp {#qgis_api_break_3_0_QgsCptCityColorRamp}
-------------------
- The constructor's doLoadFile parameter order has changed due to the addition of an inverted parameter
QgsCptCityColorRampDialog {#qgis_api_break_3_0_QgsCptCityColorRampDialog}
-------------------------
- The dialog no longer edits a color ramp in place. Instead, a copy of the ramp is edited
and the new ramp can be retrieved after executing the dialog by calling ramp().
- Some internal methods which were previously public or protected were made private.
QgsCptCityDataItem {#qgis_api_break_3_0_QgsCptCityDataItem}
-----------------------
- emitBeginInsertItems, emitEndInsertItems, emitBeginRemoveItems and emitEndRemoveItems were removed. There
should be no need to call these slots manually.
QgsCptCitySelectionItem {#qgis_api_break_3_0_QgsCptCitySelectionItem}
-----------------------
- parseXML() has been renamed to parseXml()
QgsCustomLayerOrderWidget {#qgis_api_break_3_0_QgsCustomLayerOrderWidget}
-------------------------
- the signature of the visibilityChanged() signal is changed to visibilityChanged( QgsLayerTreeNode *node )
QgsCRSCache {#qgis_api_break_3_0_QgsCRSCache}
-----------
- QgsCRSCache has been dropped. QgsCoordinateReferenceSystem now has an internal cache
QgsCursors {#qgis_api_break_3_0_QgsCursors}
---------
- remove old bitmap cursors pan and pan_mask. Use window system curosrs instead.
QgsDataDefined {#qgis_api_break_3_0_QgsDataDefined}
--------------
- expressionParams(), setExpressionParams() and insertExpressionParam() have been removed.
QgsExpressionContext variables should be used in their place.
- prepareExpression( QgsVectorLayer* layer ) and prepareExpression( const QgsFields &fields )
were removed. Use QgsExpressionContext variant instead.
- referencedColumns( QgsVectorLayer* layer ) and referencedColumns( const QgsFields& fields )
were removed. Use QgsExpressionContext variant instead.
QgsDataDefinedButton {#qgis_api_break_3_0_QgsDataDefinedButton}
--------------------
- registerGetExpressionContextCallback has been removed in favor of registerExpressionContextGenerator
QgsDataDefinedSymbolDialog {#qgis_api_break_3_0_QgsDataDefinedSymbolDialog}
--------------------------
- QgsDataDefinedSymbolDialog was removed. Code using this dialog should be reworked to use QgsDataDefinedButton
instead.
QgsDataDefinedValueDialog {#qgis_api_break_3_0_QgsDataDefinedValueDialog}
--------------------------
- These classes and subclasses now use QgsProperty objects instead of QgsDataDefined.
QgsDataItem {#qgis_api_break_3_0_QgsDataItem}
-----------
- supportedCRS() has been renamed to supportedCrs()
- isPopulated() has been removed. Use state() instead.
- capabilities() has been removed. Use capabilities2() instead (TODO: rename back to capabilities()).
- emitBeginInsertItems(), emitEndInsertItems(), emitBeginRemoveItems(), emitEndRemoveItems(), emitDataChanged(), emitStateChanged() have been removed.
- Favourites was renamed to Favorites
QgsDataItemProviderRegistry {#qgis_api_break_3_0_QgsDataItemProviderRegistry}
---------------------------
- This class is no longer a singleton and instance() has been removed. Instead use QgsApplication::dataItemProviderRegistry() to access an application-wide registry.
QgsDataProvider {#qgis_api_break_3_0_QgsDataProvider}
---------------
- The duplicate (and unused) dataChanged( int ) signal was removed. Use dataChanged() instead.
QgsDataSourceURI {#qgis_api_break_3_0_QgsDatasourceUri}
----------------
- QgsDataSourceURI has been renamed to QgsDataSourceUri
- QgsDataSourceURI::SSLmode has been renamed to QgsDataSourceUri::SslMode. All items of this enum have been properly CamelCased.
QgsDatumTransformStore {#qgis_api_break_3_0_QgsDatumTransformStore}
----------------------
- transformation() now returns a QgsCoordinateTransform object, not a pointer. An invalid QgsCoordinateTransform will
be returned in place of a null pointer.
QgsDiagram {#qgis_api_break_3_0_QgsDiagram}
----------
- The deprecated getExpression( const QString& expression, const QgsFields* fields ) method has been removed.
Use the variant which accepts an expression context instead.
- The deprecated renderDiagram( const QgsAttributes& att, QgsRenderContext& c, const QgsDiagramSettings& s, QPointF position ) method has been removed.
Use renderDiagram( const QgsFeature& feature, QgsRenderContext& c, const QgsDiagramSettings& s, const QPointF& position ) instead.
- The deprecated diagramSize( const QgsAttributes& attributes, const QgsRenderContext& c, const QgsDiagramSettings& s, const QgsDiagramInterpolationSettings& is ) method has been removed.
Use diagramSize( const QgsFeature& feature, const QgsRenderContext& c, const QgsDiagramSettings& s, const QgsDiagramInterpolationSettings& is ) instead.
QgsDiagramInterpolationSettings {#qgis_api_break_3_0_QgsDiagramInterpolationSettings}
-------------------------------
- The classificationAttribute member variable was removed, and has been replaced by the classificationField variable which stores the string name.
QgsDiagramRenderer {#qgis_api_break_3_0_QgsDiagramRenderer}
------------------
- xform, fields were no longer required and are removed.
- referencedFields() no longer takes a QgsFields argument.
- renderDiagram() now takes an optional data defined overrides collection argument.
QgsDiagramLayerSettings {#qgis_api_break_3_0_QgsDiagramLayerSettings}
-----------------------
- coordinateTransform() now returns a QgsCoordinateTransform object, not a pointer. An invalid QgsCoordinateTransform will
be returned in place of a null pointer.
- setCoordinateTransform() now takes a QgsCoordinateTransform object, not a pointer. Use an invalid QgsCoordinateTransform in
place of a null pointer.
- The ct member has been removed. Use coordinateTransform() and setCoordinateTransform() instead.
- The LinePlacementFlags enum was renamed to LinePlacementFlag
- The placement member variable was removed, and getPlacement() was renamed to placement()
- The placementFlags member variable was removed
- The priority member variable was removed, and getPriority() was renamed to priority()
- The zIndex member variable was removed, and getZIndex() was renamed to zIndex()
- The obstacle member variable was removed. setIsObstacle() and isObstacle() should be used instead.
- The dist member variable was removed. setDistance() and distance() should be used instead.
- The renderer member variable was removed, and getRenderer() was renamed to renderer()
- The showAll member variable was removed. setShowAllDiagrams() and showAllDiagrams() should be used instead.
- The xPosColumn, yPosColumn and showColumn attributes were removed. Use setDataDefinedProperties() for
setting data defined properties instead.
- The LinePlacementFlags enum was renamed to LinePlacementFlag
- The placement member variable was removed, and getPlacement() was renamed to placement()
- The placementFlags member variable was removed
- The priority member variable was removed, and getPriority() was renamed to priority()
- The zIndex member variable was removed, and getZIndex() was renamed to zIndex()
- The obstacle member variable was removed. setIsObstacle() and isObstacle() should be used instead.
- The dist member variable was removed. setDistance() and distance() should be used instead.
- The renderer member variable was removed, and getRenderer() was renamed to renderer()
- The showAll member variable was removed. setShowAllDiagrams() and showAllDiagrams() should be used instead.
- referencedFields() no longer requires a QgsFields argument.
QgsDiagramSettings {#qgis_api_break_3_0_QgsDiagramSettings}
------------------
- The SizeType enum was removed. Use QgsUnitTypes.RenderUnit instead.
QgsDistanceArea {#qgis_api_break_3_0_QgsDistanceArea}
---------------
- sourceCrs() now returns a QgsCoordinateReferenceSystem instead of the crs ID.
- measure() has been removed. Use measureArea() or measureLength() instead.
- textUnit() was removed. Use formatDistance() or formatArea() instead.
- convertMeasurement was removed. Use QgsUnitTypes for conversion instead.
QgsDxfExport {#qgis_api_break_3_0_QgsDxfExport}
------------
- The writeGroup() method taking a QgsPoint argument was removed. Use the version which takes a QgsPointV2 instead.
- The writePolyline() method taking a QgsPolyline argument was removed. Use the alternative version instead.
- The writePolygon() method taking a QgsPolygon argument was removed. Use the version which takes a QgsRingSequence instead.
- writeSolid() was removed. Use writePolygon() instead.
- The signature for writeLine() has changed.
- writePoint(), writeFilledCircle(), writeCircle(), writeText() and writeMText() now take QgsPointV2 arguments
QgsEditFormConfig {#qgis_api_break_3_0_QgsEditFormConfig}
-----------------
- Does no longer inherit QObject
- widgetType() and widgetConfig() now reflect only the user configured values.
QgsEditorWidgetRegistry::instance()->findBest() must be used instead.
- widgetConfig(), setWidgetType(), setWidgetConfig() and removeWidgetConfig() now only take a string as first parameter. Access by index has been removed.
- widgetType() has been removed in favor of QgsVectorLayer::editorWidgetSetup()
- expression(), setExpression(), expressionDescription() and setExpressionDescription()
have been removed. Use QgsVectorLayer.setConstraintExpression()/constraintExpression(),
or QgsField.constraintExpression()/QgsField.constraintDescription() instead.
- notNull() and setNotNull() have been removed. Use QgsVectorLayer.setFieldConstraint()/fieldConstraints(), or QgsField.constraints() instead.
QgsEditorWidgetWrapper {#qgis_api_break_3_0_QgsEditorWidgetWrapper}
----------------------
- constraintStatusChanged now reports a QgsEditorWidgetWrapper::ConstraintResult instead of the previous boolean value for the constraint status
- The boolean constraintValid argument for updateConstraintWidgetStatus has been changed to a QgsEditorWidgetWrapper::ConstraintResult value
QgsExpression {#qgis_api_break_3_0_QgsExpression}
-------------
- prepare( const QgsFields &fields ) has been removed. Use prepare( const QgsExpressionContext *context ) instead.
- The evaluate methods which accept feature parameters have been removed. Use the version which takes a QgsExpressionContext
argument instead.
- isValid( const QString& text, const QgsFields& fields, QString &errorMessage ) has been removed, use the QgsExpressionContext
version instead.
- setCurrentRowNumber, currentRowNumber, scale, setScale, setSpecialColumn, unsetSpecialColumn, specialColumn, hasSpecialColumn have been
removed. Use QgsExpressionContext variables instead.
- The replaceExpressionText version which accepts a QgsFeature argument has been removed. Use the QgsExpressionContext
version instead.
- The QgsExpression::Node::eval and prepare versions which take a QgsFeature has been removed, use the QgsExpressionContext versions instead.
- QgsExpression::Interval has been removed. Use QgsInterval instead.
- replaceExpressionText() no longer accepts a substitution map parameter. Use expression context variables instead.
- helptext() has been renamed to helpText()
- isValid() has been renamed to checkExpression()
- acceptVisitor() has been removed
- QgsExpression::referencedColumns() returns QSet<QString> instead of QStringList
- QgsExpression::Node::referencedColumns() returns QSet<QString> instead of QStringList
QgsExpression::Function {#qgis_api_break_3_0_QgsExpression_Function}
-----------------------
- `QgsExpression::Function::func` has been modified to use a `QgsExpressionContext` argument rather than a `QgsFeature`.
- `QgsExpression::Function::usesgeometry()` has been renamed to `QgsExpression::Function::usesGeometry( const NodeFunction* node )`
- `QStringList QgsExpression::Function::referencedColumns()` has been changed to `QSet<QString> QgsExpression::Function::referencedColumns( const NodeFunction* node )`
- `QgsExpression::Function::helptext()` has been renamed to `helpText()`
QgsExpressionItem {#qgis_api_break_3_0_QgsExpressionItem}
-----------------
- CustomSortRole was renamed to CUSTOM_SORT_ROLE
- ItemTypeRole was renamed to ITEM_TYPE_ROLE
QgsExpressionContextUtils {#qgis_api_break_3_0_QgsExpressionContextUtils}
-------------------------
- projectScope(), setProjectVariable() and setProjectVariables() require pointer to QgsProject as the first argument.
QgsFeature {#qgis_api_break_3_0_QgsFeature}
----------
- geometryAndOwnership() has been removed. Use geometry() instead.
- setGeometryAndOwnership() has been removed. Use setGeometry() instead.
- The setGeometry( QgsGeometry* ) method has been removed, use setGeometry( const QgsGeometry& ) instead.
- The geometry() method now returns a copy of the geometry, not a pointer. Since QgsGeometry objects are
implicitly shared this is a low-cost copy, and avoids ownership and dangling pointer issues. <b>Very important: Testing that
a feature has a geometry is now done using the new hasGeometry() method. Any code which compares QgsFeature::geometry() to
None will need to be modified, as the method will return an empty geometry if the feature has no geometry.</b>
- The temporary constGeometry() method has been removed. Use geometry() instead.
- setFields( const QgsFields*, bool ) has been removed, use setFields( const QgsFields&, bool ) instead.
- fields() no longer returns a pointer, but instead a QgsFields value.
- The duplicate method setFeatureId() was removed. Use setId() instead.
QgsFeatureListViewDelegate {#qgis_api_break_3_0_QgsFeatureListViewDelegate}
--------------------------
- sIconSize was rename to ICON_SIZE
QgsFeatureRendererV2 {#qgis_api_break_3_0_QgsFeatureRendererV2}
--------------------
- The method capabilities() returns QgsFeatureRendererV2::Capabilities flags instead of an integer. The two are binary compatible.
- symbolForFeature( QgsFeature& feature ) has been removed. The symbolForFeature( QgsFeature& feature, QgsRenderContext& context ) method should be used instead (previously available as symbolForFeature2 in PyQGIS bindings). symbolForFeature has been made pure virtual.
- originalSymbolForFeature( QgsFeature& feature ) has been removed. The symbolForFeature( QgsFeature& feature, QgsRenderContext& context ) method should be used instead (previously available as originalSymbolForFeature2 in PyQGIS bindings).
- startRender( QgsRenderContext& context, const QgsVectorLayer *vlayer ) was removed. This function has had no effect since QGIS 2.4
- symbols() has been removed. The symbols( QgsRenderContext& context ) method should be used instead (previously available as symbols2 in PyQGIS bindings).
- writeSld( QDomDocument& doc, const QgsVectorLayer &layer ) was removed. writeSld( QDomDocument& doc, const QgsVectorLayer &layer ) should be used instead.
- rotationField() and setRotationField() were removed. Data defined properties for QgsSymbolLayer should be used instead.
- willRenderFeature( QgsFeature& feat ) has been removed. The willRenderFeature( QgsFeature& feat, QgsRenderContext& context ) method should be used instead (previously available as willRenderFeature2 in PyQGIS bindings).
- symbolsForFeature( QgsFeature& feat ) has been removed. The symbolsForFeature( QgsFeature& feat, QgsRenderContext& context ) method should be used instead (previously available as symbolsForFeature2 in PyQGIS bindings).
- originalSymbolsForFeature( QgsFeature& feat ) has been removed. The originalSymbolsForFeature( QgsFeature& feat, QgsRenderContext& context ) method should be used instead (previously available as originalSymbolsForFeature2 in PyQGIS bindings).
- copyPaintEffect() was removed. copyRendererData() should be used instead.
- usedAttributes() now requires a QgsRenderContext argument.
QgsFeatureRequest {#qgis_api_break_3_0_QgsFeatureRequest}
-----------------
- AllAttributes was renamed to ALL_ATTRIBUTES
QgsFieldCombobox {#qgis_api_break_3_0_QgsFieldCombobox}
----------------
- The setLayer( QgsVectorlayer* ) slot has been removed. Use the setLayer( QgsMapLayer* ) slot instead.
QgsFieldExpressionWidget {#qgis_api_break_3_0_QgsFieldExpressionWidget}
------------------------
- The setLayer( QgsVectorlayer* ) slot has been removed. Use the setLayer( QgsMapLayer* ) slot instead.
- registerGetExpressionContextCallback has been removed in favor of registerExpressionContextGenerator
QgsFields {#qgis_api_break_3_0_QgsFields}
---------
- All const methods which return a field from QgsFields now return a QgsField value, not a reference.
- fieldNameIndex has been renamed to lookupField. See the API documentation for details.
QgsFieldProxyModel {#qgis_api_break_3_0_QgsFieldProxyModel}
------------------
- In QgsFieldProxyModel::Filter, All has been renamed to AllTypes
QgsGeometry {#qgis_api_break_3_0_QgsGeometry}
-----------
- All QgsGeometry methods now accept geometry references instead of pointers, and return a QgsGeometry
value instead of a pointer. The biggest impact with this change is that PyQGIS code should not compare a geometry
result to None, but instead either use a boolean test (`if g.buffer(10):`) or explicitly use the isNull()
method to determine if a geometry is valid.
- isEmpty() was renamed to isNull() to differentiate a missing geometry from a geometry which is empty (eg an
empty geometry collection)
- wkbSize() and asWkb() has been replaced by exportToWkb(). WKB representation is no longer cached within QgsGeometry
- asGeos() has been replaced by exportToGeos(). GEOS representation is no longer cached within QgsGeometry
- int addPart( const QList<QgsPoint> &points, QgsWkbTypes::GeometryType geomType ) has been renamed to addPoints
- int addPart( const QList<QgsPointV2> &points, QgsWkbTypes::GeometryType geomType ) has been renamed to addPointsV2
- static bool compare( const QgsPolyline& p1, const QgsPolyline& p2, double epsilon ) has been renamed to comparePolylines
- static bool compare( const QgsPolygon& p1, const QgsPolygon& p2, double epsilon ) has been renamed to comparePolygons
- static bool compare( const QgsMultiPolygon& p1, const QgsMultiPolygon& p2, double epsilon ) has been renamed to compareMultiPolygons
- smoothLine and smoothPolygon are no longer public API (use smooth() instead)
- avoidIntersections() got an extra argument: list of layers to include in the operation (previously read from active QgsProject)
- isGeosEmpty() was removed. Use isEmpty() instead.
QgsGeometryAnalyzer {#qgis_api_break_3_0_QgsGeometryAnalyzer}
-------------------
- locateBetweenMeasures() and locateAlongMeasure() now take geometry references, not pointers, and return
a QgsGeometry value rather than a pointer.
QgsGeometrySimplifier {#qgis_api_break_3_0_QgsGeometrySimplifier}
---------------------
- simplifyGeometry() has been removed and simplify() must be used instead .
QgsGradientColorRampDialog {#qgis_api_break_3_0_QgsGradientColorRampDialog}
---------
- The dialog no longer edits a color ramp in place. Instead, a copy of the ramp is edited
and the new ramp can be retrieved after executing the dialog by calling ramp().
- Some internal methods which were previously public or protected were made private.
QgsGraduatedSymbolRenderer {#qgis_api_break_3_0_QgsGraduatedSymbolRenderer}
--------------------------
- getDataValues() has been removed - use QgsVectorLayer::getDoubleValues() instead
QgsGraduatedSymbolRenderer {#qgis_api_break_3_0_QgsGraduatedSymbolRendererWidget}
--------------------------
- sizeScaleFieldChanged() and scaleMethodChanged() were removed. These settings are no longer exposed in the widget's GUI.
QgsGraphBuilderInterface {#qgis_api_break_3_0_QgsGraphBuilderInterface}
------------------------
- destinationCrs() now returns a copy instead of a reference to the CRS. This has no effect on PyQGIS code, but c++
plugins calling this method will need to be updated.
QgsEditorWidgetRegistry {#qgis_api_break_3_0_QgsEditorWidgetRegistry}
-----------------------
- The signature of isFieldSupported() has been changed to return an unsigned
integer (how good it supports the given field) and is now const.
QgsEditorWidgetFactory {#qgis_api_break_3_0_QgsEditorWidgetFactory}
----------------------
- `readEditorConfig` has been removed. The configuration is read and written
from and to a QVariantMap automatically.
- `readConfig` has been removed. The configuration is read and written
from and to a QVariantMap automatically.
- `writeConfig` has been removed. The configuration is read and written
from and to a QVariantMap automatically.
- `representValue` has been removed. Use QgsFieldFormatter::representValue() instead
- `sortValue` has been removed. Use QgsFieldFormatter::representValue() instead
- `alignmentFlag` has been removed. Use QgsFieldFormatter::representValue() instead
- `createCache` has been removed. Use QgsFieldFormatter::representValue() instead
QgsFeedback {#qgis_api_break_3_0_QgsFeedback}
-----------
- cancelled() and isCancelled() has been renamed to canceled() and isCanceled(), respectively <!--#spellok-->
QgsGeometryUtils {#qgis_api_break_3_0_QgsGeometryUtils}
----------------
- componentType enum has been renamed to ComponentType and its members were CamelCased too: VERTEX, RING and PART become Vertex, Ring and Part, respectively.
QgsGPSConnectionRegistry {#qgis_api_break_3_0_QgsGPSConnectionRegistry}
------------------------
- This class is no longer a singleton and instance() has been removed. Instead use QgsApplication::gpsConnectionRegistry() to access an application-wide registry.
QgsGraduatedRenderer {#qgis_api_break_3_0_QgsGraduatedRenderer}
--------------------
- setInvertedColorRamp() and invertedColorRamp() functions are gone, QgsColorRamp now responsible for invert
- createRenderer() and updateColorRamp()'s inverted parameter is gone
QgsGroupWMSDataDialog {#qgis_api_break_3_0_QgsGroupWMSDataDialog}
---------------------
- QgsGroupWMSDataDialo has been renamed to QgsGroupWmsDataDialog
QgsHeatmapRenderer {#qgis_api_break_3_0_QgsHeatmapRenderer}
------------------
- setInvertRamp() and invertRamp() functions are gone, QgsColorRamp now responsible for invert
QgsHighlight {#qgis_api_break_3_0_QgsHighlight}
------------
- The QgsHighlight constructor now takes a geometry reference, not a pointer.
QgsIFeatureSelectionManager {#qgis_api_break_3_0_QgsIFeatureSelectionManager}
---------------------------
- selectedFeaturesIds() has been renamed to selectedFeatureIds()
QgsJSONExporter {#qgis_api_break_3_0_QgsJSONExporter}
---------------
- sourceCrs() now returns a copy instead of a reference to the CRS. This has no effect on PyQGIS code, but c++
plugins calling this method will need to be updated.
QgsLabelingEngineInterface {#qgis_api_break_3_0_QgsLabelingEngineInterface}
--------------------------
- init(QgsMapRenderer*) has been removed. Use init(const QgsMapSettings&) instead.
- &layer() was removed. use QgsPalLayerSettings::fromLayer() instead.
- addDiagramLayer() was removed. Use prepareDiagramLayer() instead.
- labelsAtPosition() was removed. Use takeResults() and methods of QgsLabelingResults instead.
- labelsWithinRect() was removed. Use takeResults() and methods of QgsLabelingResults.
QgsLayerDefinition {#qgis_api_break_3_0_QgsLayerDefinition}
------------------
- loadLayerDefinition() now also requires QgsProject as the second argument
QgsLayerPropertiesWidget {#qgis_api_break_3_0_QgsLayerPropertiesWidget}
------------------------
- expressionContext(), setExpressionContext(), setMapCanvas() and mapCanvas() have been removed in favor of setContext()/context()
QgsLayerTreeGroup {#qgis_api_break_3_0_QgsLayerTreeGroup}
-----------------
- readChildrenFromXML() has been renamed to readChildrenFromXml()
- isVisible() is moved to QgsLayerTreeNode
- setVisible() is replaced by QgsLayerTreeNode::setItemVisibilityChecked()
- protected methods updateVisibilityFromChildren() and updateChildVisibility() removed
- readXml() and readChildrenFromXml() do not resolve layers from the layer IDs anymore. Call resolveReferences() or use readXml() override with QgsProject as the second argument.
QgsLayerTreeLayer {#qgis_api_break_3_0_QgsLayerTreeLayer}
-----------------
- setLayerName(), layerName() were renamed to setName(), name()
- isVisible() is moved to QgsLayerTreeNode
- setVisible() is replaced by QgsLayerTreeNode::setItemVisibilityChecked()
- readXml() does not resolve layer from the layer ID anymore. Call resolveReferences() or use readXml() override with QgsProject as the second argument.
QgsLayerTreeNode {#qgis_api_break_3_0_QgsLayerTreeNode}
----------------
- readXml() does not resolve layers from the layer IDs anymore. Call resolveReferences() or use readXml() override with QgsProject as the second argument.
QgsLayerTreeModel {#qgis_api_break_3_0_QgsLayerTreeMode}
-----------------
- The ShowSymbology flag was removed. Use ShowLegend instead.
- The AllowSymbologyChangeState flag was removed. Use AllowLegendChangeState instead.
- legendFilterByMap() was renamed to legendFilterMapSettings()
- isIndexSymbologyNode() was removed. Use index2legendNode() instead.
- layerNodeForSymbologyNode() was removed. Use index2legendNode()->parent() instead.
- refreshLayerSymbology() was removed. Use refreshLayerLegend() instead.
- setAutoCollapseSymbologyNodes() was removed. Use setAutoCollapseLegendNodes() instead.
- autoCollapseSymbologyNodes() was removed. Use autoCollapseLegendNodes() instead.
QgsLayerTreeModelLegendNode {#qgis_api_break_3_0_QgsLayerTreeModelLegendNode}
---------------------------
- The SymbolLegacyRuleKeyRole role was removed. Use RuleKeyRole instead.
QgsLayerTreeNode {#qgis_api_break_3_0_QgsLayerTreeNode}
----------------
- readCommonXML() has been renamed to readCommonXml()
- writeCommonXML() has been renamed to writeCommonXml()
- the signature of the visibilityChanged() signal is changed to visibilityChanged( QgsLayerTreeNode *node )
QgsLimitedRandomColorRampDialog {#qgis_api_break_3_0_QgsLimitedRandomRampDialog}
-------------------------------
- The dialog no longer edits a color ramp in place. Instead, a copy of the ramp is edited
and the new ramp can be retrieved after executing the dialog by calling ramp().
- Some internal methods which were previously public or protected were made private.
QgsLinearlyInterpolatedDiagramRenderer {#qgis_api_break_3_0_QgsLinearlyInterpolatedDiagramRenderer}
--------------------------------------
- The classificationAttribute() and setClassificationAttribute() methods were replace by
classificationField() and setClassificationField() which use the field names instead of field
indexes.
QgsMapCanvas {#qgis_api_break_3_0_QgsMapCanvas}
------------
- setLayerSet() has been replaced by setLayers() which accepts list of QgsMapLayer objects instead of QgsMapCanvasLayer objects
- rotationEnabled() and enableRotation() have been removed, since map rotation is now always supported
- The "name" parameter has been removed from constructor. Use QObject::setObjectName() to set canvas name if necessary.
- map() has been removed because QgsMapCanvasMap is not available in API anymore.
- mapRenderer() has been removed. Use directly map canvas methods to get/set configuration or mapSettings() (for reading only).
- canvasPaintDevice() has been removed. Use map canvas items to draw anything on top of canvas.
- clear() has been removed. Use refresh() instead.
- setCanvasColor() and canvasColor() are not virtual methods anymore.
- updateFullExtent() has been removed. No need to call it explicitly. Full extent calculation is done in QgsMapSettings.
- setDirty() and isDirty() have been removed. Use refresh() to refresh canvas content.
- setWheelAction() and WheelAction enum have been removed. Custom wheel actions are not supported anymore.
- updateMap(), showError(), useImageToRender() have been removed. They did nothing since 2.4.
- setProgress() signal has been removed. It was not emitted since 2.0.
- enableOverviewMode() and updateOverview() have been removed. Map canvas does not keep pointer to overview canvas anymore. Use QgsLayerTreeMapCanvasBridge::setOverviewCanvas() to set up updates of overview canvas together with main canvas.
QgsMapCanvasItem {#qgis_api_break_3_0_QgsMapCanvasItem}
----------------
- setPanningOffset() was removed.
QgsMapLayer {#qgis_api_break_3_0_QgsMapLayer}
-----------
- crs() now returns a QgsCoordinateReferenceSystem object, not a reference. This change has no effect for PyQGIS code.
- createMapRenderer() has been made pure virtual.
- draw() has been removed. Use createMapRenderer() method for rendering of layers.
- setLayerName() was removed, use setName() instead. The layerNameChanged() signal has been replaced by nameChanged().
- toggleScaleBasedVisibility() was replaced by setScaleBasedVisibility()
- lastErrorTitle(), lastError(), cacheImage(), onCacheImageDelete(), clearCacheImage() and the signals drawingProgress(),
screenUpdateRequested() were removed. These members have had no effect for a number of QGIS 2.x releases.
- extent(), styleURI(), exportNamedStyle(), exportSldStyle(), writeXml(), metadata() were made const. This has no effect on PyQGIS code, but c++ code implementing derived layer classes will need to update the signatures of these methods to match.
- The lyrname parameter in the QgsMapLayer constructor was renamed to 'name'.
- The vis parameter in setSubLayerVisibility was renamed to 'visible'.
- theResultFlag parameter in loadDefaultStyle and saveDefaultStyle were renamed to resultFlag.
- theURI, theResultFlag parameters in loadNamedStyle, saveNamedStyle, saveSldStyle and loadSldStyle were renamed to uri, resultFlag.
- theURI parameter in loadNamedStyleFromDb was renamed to uri.
- theMinScale and theMaxScale parameters in setMinimumScale and setMaximumScale were renamed to scale
- The layerCrsChanged() signal was renamed to crsChanged()
- theError parameter in appendError() and setError() were renamed to 'error'.
- drawLabels() method was removed. It used old deprecated labeling. Replaced by labeling based on PAL library, see QgsLabelingEngine.
- readLayerXML() was renamed to readLayerXml()
- writeLayerXML() was renamed to writeLayerXml()
- capitaliseLayerName() was renamed to capitalizeLayerName() <!--#spellok-->
- asLayerDefinition(), fromLayerDefinition(), fromLayerDefinitionFile() were moved to QgsLayerDefinition class and renamed to exportLayerDefinitionLayers() resp. loadLayerDefinitionLayers()
- loadNamedStyleFromDb() was renamed to loadNamedStyleFromDatabase()
QgsMapOverviewCanvas {#qgis_api_break_3_0_QgsMapOverviewCanvas}
--------------------
- layerSet() and setLayerSet() have been replaced by layers() and setLayers() which work with list of layers instead of layer IDs
- destinationSrsChanged() was renamed to destinationCrsChanged()
QgsMapRenderer {#qgis_api_break_3_0_QgsMapRenderer}
--------------
- transformation() now returns a QgsCoordinateTransform object, not a pointer. An invalid QgsCoordinateTransform will
be returned instead of a null pointer if no transformation is required.
- destinationSrsChanged() was renamed to destinationCrsChanged()
- getCompositionMode(), getBlendModeEnum() and BlendMode enum have been moved to QgsPainting utility class.
QgsMapRendererCache {#qgis_api_break_3_0_QgsMapRendererCache}
-------------------
- All protected members have been made private. This class is not designed to be subclassed.
- setCacheImage no longer uses layer IDs for cache keys. Cache keys can now be any arbitrary string.
A new parameter for setCacheImage is used to list all layers on which the cache image is dependent. This
allows for cache images which have either no layer dependencies or multiple layer dependencies.
QgsMapRendererJob {#qgis_api_break_3_0_QgsMapRendererJob}
-----------------
- All protected members are now considered private, and are no longer exposed to the Python bindings. QgsMapRendererJob
and subclasses are not designed to be subclassed in PyQGIS.
- 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.
- prepareJobs() and drawLabeling() (neither available in PyQGIS) do not take QgsPalLabeling parameter anymore. All drawing of labels is done by QgsLabelingEngine.
- drawOldLabeling(), drawNewLabeling() were removed. The method drawLabeling() should be used instead.
QgsMapTool {#qgis_api_break_3_0_QgsMapTool}
----------
- renderComplete() was removed. Map tools must not directly depend on rendering progress.
- isTransient() and isEditTool() were removed. Use flags() instead.
QgsMapToolCapture {#qgis_api_break_3_0_QgsMapToolCapture}
-----------------
- The nextPoint() method taking a QgsPoint was removed. Use the version taking a QgsPointV2 instead.
QgsMapToPixel {#qgis_api_break_3_0_QgsMapToPixel}
-------------
- The constructor now uses the map center x and y, and requires both height and width in pixels and a rotation value
- setYMaximum(), setYMinimum(), setXMinimum() were removed. Use setParameters() instead
QgsMapToPixelGeometrySimplifier {#qgis_api_break_3_0_QgsMapToPixelGeometrySimplifier}
-------------------------------
The whole class has been refactored to stop using WKB and to use QgsAbstractGeometry classes.
- simplifyGeometry(), simplifyPoints(), isGeneralizableByMapBoundingBox(), _getLineString(), _getPolygon() methods have been removed.
- The signature of the static methods _getPoint(), _getLineString() and _getPolygon() have been changed.
QgsMapSettings {#qgis_api_break_3_0_QgsMapSettings}
--------------
- layers() and setLayers() now work with list of layers instead of layer IDs
- layerTransform() now returns a QgsCoordinateTransform object, not a pointer. An invalid QgsCoordinateTransform will
be returned instead of a null pointer if no transformation is required.
- destinationCrs() now returns a copy instead of a reference to the CRS. This has no effect on PyQGIS code, but c++
plugins calling this method will need to be updated.
QgsMarkerSymbolLayer {#qgis_api_break_3_0_QgsMarkerSymbolLayer}
--------------------
- bounds() is now pure virtual and must be implemented in all subclasses.
QgsMessageLog {#qgis_api_break_3_0_QgsMessageLog}
---------------------------
- This class is no longer a singleton and instance() has been removed. Instead use QgsApplication::messageLog() to access an application-wide log.
QgsMimeDataUtils {#qgis_api_break_3_0_QgsMimeDataUtils}
----------------
- Constructor taking QgsLayerItem argument has been removed. Use QgsDataItem::mimeUri() instead.
QgsNetworkAccessManager {#qgis_api_break_3_0_QgsNetworkAccessManager}
-----------------------
- sendGet() was removed. Use get() directly.
- deleteReply() was removed. Use abort() and deleteLayer() on the reply directly.
- requestSent signal was removed. This is no longer emitted.
QgsOSMElement {#qgis_api_break_3_0_QgsOSMElement}
-------------
- elemID() has been renamed to elemId()
QgsOSMXmlImport {#qgis_api_break_3_0_QgsOSMXmlImport}
-------------
- setOutputDbFileName() and outputDbFileName() have been renamed to setOutputDatabaseFileName()
and outputDatabaseFileName()
QgsOwsConnection {#qgis_api_break_3_0_QgsOwsConnection}
----------------
- connectionInfo() was removed.
QgsOWSSourceSelect {#qgis_api_break_3_0_QgsOWSSourceSelect}
------------------
- selectedLayersCRSs() has been renamed selectedLayersCrses()
- populateCRS() has been renamed to populateCrs()
- clearCRS() has been renamed to clearCrs()
- addWMSListRow() has been renamed to addWmsListRow()
- addWMSListItem() has been renamed to addWmsListItem()
- selectedCRS() has been renamed to selectedCrs()
QgsOWSConnection {#qgis_api_break_3_0_QgsOWSConnection}
----------------
- QgsOWSConnection has been renamed QgsOwsConnection
QgsNumericSortTreeWidgetItem {#qgis_api_break_3_0_QgsNumericSortTreeWidgetItem}
----------------------------
- QgsNumericSortTreeWidgetItem has been removed and replaced with QgsTreeWidgetItem, which
has improved sort capabilities including the ability to set custom sort values for items
and for forcing certain items to always sort on top.
QgsPaintEffectRegistry {#qgis_api_break_3_0_QgsPaintEffectRegistry}
----------------------
- This class is no longer a singleton and instance() has been removed. Instead use QgsApplication::paintEffectRegistry() to access an application-wide registry.
QgsPalettedRasterRenderer {#qgis_api_break_3_0_QgsPalettedRasterRenderer}
-------------------------
- The rgbArray() method was made private
QgsPalLabeling {#qgis_api_break_3_0_QgsPalLabeling}
--------------
- all methods implemented from QgsLabelingEngineInterface have been removed: init(), willUseLayer(), clearActiveLayers(), clearActiveLayer(), prepareLayer(), prepareDiagramLayer(), registerFeature(), registerDiagramFeature(), drawLabeling(), exit(), clone(). Labeling is now driven by QgsLabelingEngine.
- init(QgsMapRenderer*) has been removed. Use init(const QgsMapSettings&) instead.
- prepareGeometry and geometryRequiresPreparation now take geometry references, not pointers.
- layer() was removed. If direct access to QgsPalLayerSettings is necessary, use QgsPalLayerSettings::fromLayer()
- candidates() was removed.
- addDiagramLayer() was removed. Use prepareDiagramLayer() instead.
- labelsAtPosition() was removed. Use takeResults() and methods of QgsLabelingResults instead.
- labelsWithinRect() was removed. Use takeResults() and methods of QgsLabelingResults instead.
- isStoredWithProject() and setStoredWithProject() had no effect and were removed.
- staticWillUseLayer(QString) was removed. Use the variant with QgsVectorLayer argument.
- clearEngineSettings() was replaced by QgsLabelingEngine::clearSettingsInProject().
QgsPalLayerSettings {#qgis_api_break_3_0_QgsPalLayerSettings}
-------------------
- ct is now a QgsCoordinateTransform object, not a pointer. An invalid QgsCoordinateTransform will
be used instead of a null pointer if no transformation is required.
- prepareGeometry() and geometryRequiresPreparation() now take a QgsCoordinateTransform reference, not a pointer. An invalid QgsCoordinateTransform should be used instead of a null pointer if no transformation is required.
- The DataDefinedProperties enum was renamed to Property
- dataDefinedProperty(), setDataDefinedProperty(), removeDataDefinedProperty(),
removeAllDataDefinedProperties(), updateDataDefinedString(), dataDefinedMap(),
dataDefinedValue(), dataDefinedEvaluate(), dataDefinedIsActive(),
dataDefinedUseExpression(), dataDefinedProperties() and dataDefinedNames()
members were removed. Use the QgsProperty framework through dataDefinedProperties()
and setDataDefinedProperties() instead.
QgsPanelWidgetStack {#qgis_api_break_3_0_QgsPanelWidgetStack}
-------------------
- addMainPanel() has been renamed to setMainPanel()
- mainWidget() has been renamed to mainPanel()
- takeMainWidget() has been renamed to takeMainPanel()
QgsPluginLayer {#qgis_api_break_3_0_QgsPluginLayer}
--------------
- createMapRenderer(): default implementation (which called plugin's draw() method) has been removed. Plugin layers must implement createMapRenderer().
QgsPluginLayerRegistry {#qgis_api_break_3_0_QgsPluginLayerRegistry}
----------------------
- This class is no longer a singleton and instance() has been removed. Instead use QgsApplication::pluginLayerRegistry() to access an application-wide registry.
QgsPointDisplacementRenderer {#qgis_api_break_3_0_QgsPointDisplacementRenderer}
----------------------------
- The deprecated method setDisplacementGroups() has been removed. This method has had no effect since QGIS 2.4
QgsPointLocator {#qgis_api_break_3_0_QgsPointLocator}
---------------
- The constructor now takes a reference rather than a pointer to a CRS. This has no effect on PyQGIS code, but c++
plugins calling this method will need to be updated.
- The destCRS parameter in the constructor has been renamed to destinationCrs.
- destCRS() has been renamed to destinationCrs()
- destinationCrs() now returns a copy instead of a reference to the CRS. This has no effect on PyQGIS code, but c++
plugins calling this method will need to be updated.
QgsProject {#qgis_api_break_3_0_QgsProject}
----------
- visibilityPresetCollection() has been renamed to mapThemeCollection()
- title( const QString & title ) was removed. Use setTitle() instead.
- dirty( bool b ) was removed. Use setDirty() instead.
- clearProperties() was removed. Use clear() instead.
- read( QDomNode& layerNode ) was renamed to readLayer( const QDomNode& layerNode ).
- read( const QFileInfo& file ) was replaced by read( const QString& filename ).
- write( const QFileInfo& file ) was replaced by write( const QString& filename ).
- createEmbeddedLayer() does not take vectorLayerList as the third parameter anymore.
QgsProjectPropertyValue {#qgis_api_break_3_0_QgsProjectPropertyValue}
-----------------------
- The unused count() and entryList() methods were removed.
QgsRaster {#qgis_api_break_3_0_QgsRaster}
---------
- QgsRaster::ContrastEnhancementLimits has been removed, use QgsRasterMinMaxOrigin::Limits
- QgsRaster::contrastEnhancementLimitsAsString() has been removed, use QgsRasterMinMaxOrigin::limitsString()
- QgsRaster::contrastEnhancementLimitsFromString() has been removed, use QgsRasterMinMaxOrigin::limitsFromString()
QgsRasterBlock {#qgis_api_break_3_0_QgsRasterBlock}
--------------
- The constructor and reset() do not take no data value as the fourth argument anymore. There is new call setNoDataValue() to set it.
QgsRasterCalcNode {#qgis_api_break_3_0_QgsRasterCalcNode}
-----------------
- QgsRasterCalcNode::calculate has been removed, use method with QgsRasterBlocks instead.
QgsRasterCalculator {#qgis_api_break_3_0_QgsRasterCalcNode}
-------------------
- Cancelled (Result enum value) has been renamed to Canceled <!--#spellok-->
QgsRasterDataProvider {#qgis_api_break_3_0_QgsRasterDataProvider}
---------------------
- srcDataType() has been renamed to sourceDataType()
- srcHasNoDataValue() has been renamed to sourceHasNoDataValue()
- useSrcNoDataValue() has been renamed to useSourceNoDataValue()
- setUseSrcNoDataValue() has been renamed to setUseSourceNoDataValue()
- srcNoDataValue() has been renamed to sourceNoDataValue()
- draw() has been removed from the interface as it was not used anywhere.
QgsRasterInterface {#qgis_api_break_3_0_QgsRasterInterface}
------------------
- srcDataType() has been renamed to sourceDataType()
- srcInput() has been renamed to sourceInput()
- block() has new "feedback" argument.
QgsRasterLayer {#qgis_api_break_3_0_QgsRasterLayer}
--------------
- The constructor variant with loadDefaultStyleFlag as the 3rd parameter was removed. Use the
constructor variant which accepts a data provider string and loadDefaultStyleFlag as the
4th parameter instead.
- setDrawingStyle() was removed. Use setRendererForDrawingStyle() or setRenderer() instead.
- previewAsPixmap() was removed. Use previewAsImage() instead.
- updateProgress() had no effect and was removed.
- CUMULATIVE_CUT_LOWER and CUMULATIVE_CUT_UPPER have been moved to QgsRasterMinMaxOrigin
- the second parameter of setContrastEnhancement() has changed type. It is now QgsRasterMinMaxOrigin::Limits
QgsRasterProjector {#qgis_api_break_3_0_QgsRasterProjector}
------------------
- extentSize() now takes a QgsCoordinateTransform reference, not a pointer. An invalid QgsCoordinateTransform should be used instead of a null pointer if no transformation is required.
QgsRasterRenderer
-----------------
- MinMaxOrigin enum, minMaxOriginName(), minMaxOriginLabel(), minMaxOriginFromName() removed. Use minMaxOrigin() instead
QgsRelation {#qgis_api_break_3_0_QgsRelation}
-----------
- createFromXML() has been renamed to createFromXml()
QgsRenderChecker {#qgis_api_break_3_0_QgsRenderChecker}
----------------
- setMapRenderer() has been removed. Use setMapSettings() instead.
- excludeAttributesWMS() and setExcludeAttributesWMS() have been renamed to excludeAttributesWms() and
setExcludeAttributesWms()
- excludeAttributesWFS() and setExcludeAttributesWFS() have been renamed to excludeAttributesWfs() and
setExcludeAttributesWfs()
- editorWidgetV2() and editorWidgetV2Config() have been removed and QgsEditorWidgetRegistry::instance()->findBest() must be used instead.
- setEditorWidgetV2(), setEditorWidgetV2Config() have been removed and their equivalent in editFormConfig() must be used instead.
- setCheckedState() is removed. Use editFormConfig()->setWidgetConfig()` instead.
- valueMap(), valueRelation(), dateFormat(), widgetSize() have been removed. Use QgsEditorWidgetRegistry::instance()->findBest().config() instead.
QgsRenderContext {#qgis_api_break_3_0_QgsRenderContext}
----------------
- coordinateTransform() now returns a QgsCoordinateTransform object, not a pointer. An invalid QgsCoordinateTransform will
be returned instead of a null pointer if no transformation is required.
- setCoordinateTransform() now takes a QgsCoordinateTransform reference, not a pointer. An invalid QgsCoordinateTransform should be used instead of a null pointer if no transformation is required.
- rasterScaleFactor() and setRasterScaleFactor() were removed. In QGIS 3.0 QPainter destinations should always be constructed so that 1 painter unit = 1 pixel.
- The constPainter() getter was removed. Const QPainters cannot be painted to or modified, so this
method was of little use.
QgsRendererRangeLabelFormat {#qgis_api_break_3_0_QgsRendererRangeLabelFormat}
---------------------------
- MaxPrecision was renamed to MAX_PRECISION
- MinPrecision was renamed to MIN_PRECISION
QgsRendererRegistry {#qgis_api_break_3_0_QgsRendererRegistry}
----------------------
- This class is no longer a singleton and instance() has been removed. Instead use QgsApplication::rendererRegistry() to access an application-wide registry.
QgsRendererWidget {#qgis_api_break_3_0_QgsRendererWidget}
-----------------
- expressionContext(), setExpressionContext(), setMapCanvas() and mapCanvas() have been removed in favor of setContext()/context()
QgsRendererRulePropsWidget {#qgis_api_break_3_0_QgsRendererRulePropsWidget}
--------------------------
- expressionContext(), setExpressionContext(), setMapCanvas() and mapCanvas() have been removed in favor of setContext()/context()
QgsRubberBand {#qgis_api_break_3_0_QgsRubberBand}
-------------
- setToGeometry() and addGeometry() now take geometry references, not pointers.
- QgsRubberBand( QgsMapCanvas* mapCanvas, bool isPolygon ) constructor and reset( bool isPolygon) have been removed, use constructor and function with Qgis::GeometryType as argument instead.
QgsRuleBasedRenderer {#qgis_api_break_3_0_QgsRuleBasedRenderer}
--------------------
- QgsRuleBasedRenderer.Rule checkState() and setCheckState() were removed. Use active() and setActive() instead.
- QgsRuleBasedRenderer.Rule updateElseRules() was removed.
- startRender( QgsRenderContext& context, const QgsFields& fields ) was removed. Use startRender( QgsRenderContext& context, const QgsFields& fields, QString& filter ) instead.
QgsRuleBasedRendererWidget {#qgis_api_break_3_0_QgsRuleBasedRendererWidget}
--------------------------
- refineRuleCategoriesGui() and refineRuleRangesGui() no longer take a QModelIndexList argument.
QgsRuntimeProfiler {#qgis_api_break_3_0_QgsRuntimeProfiler}
------------------
- This class is no longer a singleton and instance() has been removed. Instead use QgsApplication::profiler() to access an application-wide profiler.
QgsSimpleMarkerSymbolLayer {#qgis_api_break_3_0_QgsSimpleMarkerSymbolLayer}
--------------------------
- The constructor variant with a string for the shape name has been removed. Use the variant which accepts a QgsSimpleMarkerSymbolLayerBase.Shape enum instead.
- name() and setName() have been removed. Use shape() and setShape() instead.
- prepareShape() and preparePath() were removed. Calling these methods manually should no longer be required.
QgsSimpleMarkerSymbolLayerWidget {#qgis_api_break_3_0_QgsSimpleMarkerSymbolLayerWidget}
--------------------------------
- setName() was removed.
QgsSingleBandPseudoColorRenderer {#qgis_api_break_3_0_QgsSingleBandPseudoColorRenderer}
--------------------------------
- classificationMinMaxOrigin() and setClassificationMinMaxOrigin() removed. Use minMaxOrigin() and setMinMaxOrigin()
QgsSingleSymbolRendererWidget {#qgis_api_break_3_0_QgsSingleSymbolRendererWidget}
-----------------------------
- sizeScaleFieldChanged() and scaleMethodChanged() were removed. These settings are no longer exposed in the widget's GUI.
- The Mode enum was removed.
QgsSnapper {#qgis_api_break_3_0_QgsSnapper}
----------
- Constructor variant with QgsMapRenderer has been removed. Use the variant with QgsMapSettings.
- Signature for snapPoint() has changed.
QgsSublayersDialog {#qgis_api_break_3_0_QgsSublayersDialog}
------------------
- populateLayerTable() now takes a list of QgsSublayersDialog.LayerDefinition values
- selectionNames() and selectionIndexes() were removed. Use selection().
QgsSvgCache {#qgis_api_break_3_0_QgsSvgCache}
-----------
- This class is no longer a singleton and instance() has been removed. Instead use QgsApplication::svgCache() to access an application-wide cache.
- containsParamsV2() was removed. Use containsParamsV3() instead.
- The rasterScaleFactor parameter was removed from all methods
QgsSvgCacheEntry {#qgis_api_break_3_0_QgsSvgCacheEntry}
----------------
- The rasterScaleFactor member was removed.
QgsStyle (renamed from QgsStyleV2) {#qgis_api_break_3_0_QgsStyle}
----------------------------------
- All group functions have been removed: group(), addGroup(), groupId(), groupName(), groupNames(), groupIds(), symbolsOfGroup(), getGroupRemoveQuery()
- The StyleEntity::GroupEntity has been removed
- The SymgroupTable enum has been removed
QgsSymbol (renamed from QgsSymbolV2) {#qgis_api_break_3_0_QgsSymbol}
------------------------------------
- The OutputUnit enum, including QgsSymbol::MM, QgsSymbol::MapUnit, QgsSymbol::Mixed, QgsSymbol::Pixel and QgsSymbol::Percentage has been moved to QgsUnitTypes
and renamed to RenderUnit. QgsSymbol::OutputUnitList was renamed to QgsUnitTypes::RenderUnitList. All methods which previously accepted QgsSymbol::OutputUnit
parameters or QgsSymbol::OutputUnitList parameters now take QgsUnitTypes::RenderUnit or QgsUnitTypes::RenderUnitList parameters respectively.
- startRender() now accepts a QgsFields reference, not a pointer.
- isSymbolLayerCompatible() was removed. Use QgsSymbolLayer::isCompatibleWithSymbol() instead.
- The DataDefinedSizeScale flag has been removed. This is no longer used and data defined scaling on a symbol layer level should be used instead.
- The DataDefinedRotation RenderHint was renamed to DynamicRotation, as it is no longer used for
data defined rotation.
- setRenderHints() and renderHints() now accept and return a QgsSymbol::RenderHints flag rather
than an integer value
- usedAttributes() now requires a QgsRenderContext argument.
- setDataDefinedAngle(), dataDefinedAngle(), setDataDefinedSize(), dataDefinedSize(), setDataDefinedWidth() and dataDefinedWidth()
now work with QgsProperty objects instead of QgsDataDefined.
QgsSymbolLayer (renamed from QgsSymbolLayerV2) {#qgis_api_break_3_0_QgsSymbolLayer}
----------------------------------------------
- The deprecated prepareExpressions( const QgsFields* fields, double scale = -1.0 ) method has been removed. Use
the variant which takes QgsSymbolRenderContext instead.
- The deprecated methods dataDefinedProperty( const QString& property ) and dataDefinedPropertyString() were removed. Use dataDefinedProperties() instead.
- setDataDefinedProperty now requires a QgsSymbolLayer.Property argument instead of the string based key.
- removeDataDefinedProperty(), removeDataDefinedProperties(), hasDataDefinedProperties(), hasDataDefinedProperty(), evaluateDataDefinedProperty()
were removed. Use the QgsProperty/QgsPropertyCollection methods instead.
- getDataDefinedProperty() was removed. Use dataDefinedProperties() instead.
- expression() was removed.
- 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}
----------------------
- This class is no longer a singleton and instance() has been removed. Instead use QgsApplication::symbolLayerRegistry() to access an application-wide registry.
QgsSymbolLayerWidget {#qgis_api_break_3_0_QgsSymbolLayerWidget}
--------------------
- expressionContext(), setExpressionContext(), setMapCanvas() and mapCanvas() have been removed in favor of setContext()/context()
QgsSymbolRenderContext (renamed from QgsSymbolV2RenderContext) {#qgis_api_break_3_0_QgsSymbolRenderContext}
--------------------------------------------------------------
- The constructor now accepts a QgsFields reference, not a pointer.
- The constructor, setRenderHints() and renderHints() now accept and return a QgsSymbol::RenderHints flag rather
than an integer value
- fields() now returns a QgsFields value, not a pointer.
QgsSymbolLayerUtils (renamed from QgsSymbolLayerUtilsV2) {#qgis_api_break_3_0_QgsSymbolLayerUtils}
--------------------------------------------------------
- encodeOutputUnit() and decodeOutputUnit() were removed. QgsUnitTypes::encodeUnit() and QgsUnitTypes::decodeRenderUnit() should be used instead.
- The signatures for wellKnownMarkerToSld() and wellKnownMarkerFromSld() were changed.
- The symbolPreviewPixmap() customContext is now the fourth parameter
- createRenderContext() was moved to QgsRenderContext::fromQPainter()
- lineWidthScaleFactor() and convertToPainterUnits() were moved to QgsRenderContext::convertToPainterUnits()
- convertToMapUnits() was moved to QgsRenderContext::convertToMapUnits()
- 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}
-----------------------
- saveSymbol() was removed.
- registerDataDefinedButton now works with QgsPropertyOverrideButton and QgsProperty keys
QgsSymbolSelectorDialog {#qgis_api_break_3_0_QgsSymbolSelectorDialog}
-----------------------
- saveSymbol() was removed.
- expressionContext(), setExpressionContext(), setMapCanvas() and mapCanvas() have been removed in favor of setContext()/context()
QgsSymbolsListWidget {#qgis_api_break_3_0_QgsSymbolsListWidget}
--------------------
- expressionContext(), setExpressionContext(), setMapCanvas() and mapCanvas() have been removed in favor of setContext()/context()
QgsTolerance {#qgis_api_break_3_0_QgsTolerance}
------------
- vertexSearchRadius(), defaultTolerance(), toleranceInMapUnits() do not have variant with QgsMapRenderer anymore. Use the variants with QgsMapSettings.
- The MapUnits UnitType was removed. Use LayerUnits or ProjectUnits instead.
QgsTreeWidgetItem {#qgis_api_break_3_0_QgsTreeWidgetItem}
-----------------
- QgsTreeWidgetItem is no longer a QObject and does not emit the itemEdited signal. Instead,
use QgsTreeWidgetItemObject which is an upgraded version of the original QgsTreeWidgetItem
QgsUnitTypes {#qgis_api_break_3_0_QgsUnitTypes}
------------
- All distance enumeration values were renamed to have a "Distance" prefix, including
Meters (to DistanceMeters), Kilometers (to DistanceKilometers), Feet (to DistanceFeet),
NauticalMiles (to DistanceNauticalMiles), Yards (to DistanceYards), Miles (to DistanceMiles),
Degrees (to DistanceDegrees) and UnknownDistanceUnit to DistanceUnknownUnit
- All area enumeration values were renamed to have a "Area" prefix, including
SquareMeters (to AreaSquareMeters), SquareKilometers (to AreaSquareKilometers), SquareFeet (to AreaSquareFeet),
SquareYards (to AreaSquareYards), SquareMiles (to AreaSquareMiles), Hectares (to AreaHectares),
Acres (to AreaAcres), SquareNauticalMiles (to AreaSquareNauticalMiles), SquareDegrees (to AreaSquareDegrees)
and UnknownAreaUnit to AreaUnknownUnit
- All angle enumeration values were renamed to have a "Angle" prefix, including
Radians (to AngleRadians), Gon (to AngleGon), MinutesOfArc (to AngleMinutesOfArc),
SecondsOfArc (to AngleSecondsOfArc), Turn (to AngleTurn) and UnknownAngleUnit to AngleUnknownUnit
QgsVector {#qgis_api_break_3_0_QgsVector}
---------
- normal() was removed. Use normalized() instead.
QgsVectorDataProvider {#qgis_api_break_3_0_QgsVectorDataProvider}
---------------------
- QgsVectorDataProvider::fields() now returns a copy, rather than a const reference. Since QgsFields
objects are implicitly shared, returning a copy helps simplify and make code more robust. This change
only affects third party c++ providers, and does not affect PyQGIS scripts.
- The SaveAsShapefile, SelectGeometryAtId, RandomSelectGeometryAtId and SequentialSelectGeometryAtId
capabilities have been removed, as they were unused and had no effect.
- capabilities() now returns a typesafe QgsVectorDataProvider::Capabilities object, not an integer.
- convertToProviderType() now takes a geometry reference, not a pointer.
- geometryType() has been renamed to wkbType() to be in line with QgsVectorLayer
- The behavior of defaultValue() has changed from 2.x. In 2.x, defaultValue() would return a SQL
clause fragment which must be evaluated by the provider in order to calculate the default value. In
QGIS 3.0 defaultValue() only returns literal, constant defaultValues. A new method defaultValueClause
has been added which returns the SQL clause fragments which must be evaluated by the provider itself.
- isSaveAndLoadStyleToDBSupported() was renamed to isSaveAndLoadStyleToDatabaseSupported()
QgsVectorJoinInfo {#qgis_api_break_3_0_QgsVectorJoinInfo}
-----------------
- class has been renamed to QgsVectorLayerJoinInfo
- member variables are now accessible through pairs of getters and setters rather than using direct read/write
QgsVectorLayer {#qgis_api_break_3_0_QgsVectorLayer}
--------------
- excludeAttributesWMS() and setExcludeAttributesWMS() have been renamed to excludeAttributesWms() and
setExcludeAttributesWms()
- excludeAttributesWFS() and setExcludeAttributesWFS() have been renamed to excludeAttributesWfs() and
setExcludeAttributesWfs()
- The displayField property has been separated from the mapTip. For a plain text short title use the
displayExpression instead. For the map tip use mapTipTemplate() instead.
- changeGeometry() now accepts a geometry reference, not a pointer.
- The geometryChanged() signal now uses a const QgsGeometry reference.
- The deprecated removePolygonIntersections has been removed.
- addTopologicalPoints() now takes a geometry reference, not a pointer.
- commitErrors() now returns an object, rather than a reference. This has no effect on PyQGIS code.
- 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.
- label(), enableLabels(), hasLabelsEnabled(), drawLabels() have been removed. Replaced by labeling based on PAL library, see QgsLabelingEngine.
- Signal layerDeleted() has been removed. Replaced by Qt signal destroyed().
- Deprecated editor widget methods and enums and structs: struct RangeData, enum FeatureFormSuppress, enum EditType, addAttributeEditorWidget(), editorWidgetV2(), editorWidgetConfig(), attributeEditorElements(), editType(), setEditType(), editorLayout(), setEditorLayout, setEditorWidgetV2Config(), setCheckedState(), editForm(), setEditForm(), featureFormSuppress(), setFeatureFormSuppress(), editFormInit(), setEditFormInit(), valueMap(), range(), dateFormat(), fieldEditable(), labelOnTop(), setFieldEditable() and setLabelOnTop(). Use editFormConfig()
- select() replaced by selectByRect()
- selectedFeaturesIds() replaced by selectedFeatureIds()
- setSelectedFeatures() replaced by selectByIds()
- applyNamedStyle() replaced by applyNamedStyle()
- isReadOnly() use readOnly()
- Signal changeAttributeValue()
- Deleted GroupData (Use QgsEditFormConfig::GroupData)
- Deleted TabData (Use QgsEditFormConfig::TabData)
- Deleted EditorLayout (Use QgsEditFormConfig::EditorLayout)
- Deleted ValueRelationData (Use QgsEditFormConfig::editorWidgetConfig)
- Deleted attributeEditorElementFromDomElement
- editFormConfig() returns a copy instead of direct access (Use setEditFormConfig to update)
- Removed valueRelation(), replaced with QgsEditFormConfig::editorWidgetConfig
- Removed fieldNameIndex(), use fields().lookupField() or fields().indexFromName() instead
- Renamed addAttributeAlias() to setFieldAlias()
- Renamed remAttributeAlias() to removeFieldAlias()
- saveStyleToDatabase(): msgError argument is correctly declared as output argument
- getStyleFromDatabase(): msgError argument is correctly declared as output argument
- loadNamedStyle(): theResultFlag argument is correctly declared as output argument
- The duplicate selectionChanged() signal was removed. Use selectionChanged( const QgsFeatureIds&, const QgsFeatureIds&, const bool ) instead.
- featureCount() now requires a legend key string instead of a QgsSymbol pointer argument.
- createJoinCaches() has been removed. Caches are created/updated when needed internally.
- checkJoinLayerRemove() has been removed. Joins are removed internally when joined layer is deleted.
- readXml() does not resolve references to joined layers. Call resolveReferences() when joined layers are available.
QgsVectorLayerEditBuffer {#qgis_api_break_3_0_QgsVectorLayerEditBuffer}
------------------------
- changeGeometry() now accepts a geometry reference, not a pointer.
- The geometryChanged() signal now uses a const QgsGeometry reference.
- The addedFeatures(), changedAttributeValues(), deletedAttributeIds(), addedAttributes(), changedGeometries()
and deletedFeatureIds() functions now return values, not references. This has no effect on PyQGIS code, but c++
plugins calling these methods will need to be updated.
QgsVectorLayerEditUtils {#qgis_api_break_3_0_QgsVectorLayerEditUtils}
-----------------------
- addTopologicalPoints() now accepts a geometry reference, not a pointer.
QgsVectorLayerImport {#qgis_api_break_3_0_QgsVectorLayerImport}
--------------------
- QgsVectorLayerImport now takes references instead of pointers to QgsCoordinateReferenceSystem objects. Since
QgsCoordinateReferenceSystem is now implicitly shared, using references to QgsCoordinateReferenceSystem rather than
pointers makes for more robust, safer code. Use an invalid (default constructed) QgsCoordinateReferenceSystem
in code which previously passed a null pointer to QgsVectorLayerImport.
- ErrUserCancelled (ImportError enum value) has been renamed to ErrUserCanceled <!--#spellok-->
QgsVectorLayerJoinBuffer {#qgis_api_break_3_0_QgsVectorLayerJoinBuffer}
------------------------
- readXml() does not resolve layer IDs to layers anymore. You need to call resolveReferences() afterwards.
QgsVectorLayerUndoCommand {#qgis_api_break_3_0_QgsVectorLayerUndoCommand}
-------------------------
- QgsVectorLayerUndoCommandChangeGeometry constructor now accepts a geometry reference, not a pointer.
QgsVisibilityPresetCollection {#qgis_api_break_3_0_QgsVisibilityPresetCollection}
-----------------------------
- Has been renamed to QgsMapThemeCollection
- The nested class PresetRecord has been renamed to MapThemeRecord
- Various member functions have been renamed from *preset* to *mapTheme*
QgsVectorFileWriter {#qgis_api_break_3_0_QgsVectorFileWriter}
-------------------
- QgsVectorFileWriter now takes references instead of pointers to QgsCoordinateReferenceSystem objects. Since
QgsCoordinateReferenceSystem is now implicitly shared, using references to QgsCoordinateReferenceSystem rather than
pointers makes for more robust, safer code. Use an invalid (default constructed) QgsCoordinateReferenceSystem
in code which previously passed a null pointer to QgsVectorFileWriter.
- writeAsVectorFormat() now takes a QgsCoordinateTransform reference, not a pointer. An invalid QgsCoordinateTransform should be used instead of a null pointer if no transformation is required.
QgsWMSLegendNode {#qgis_api_break_3_0_QgsWMSLegendNode}
----------------
- QgsWMSLegendNode has been renamed to QgsWmsLegendNode
QgsZipItem {#qgis_api_break_3_0_QgsZipItem}
----------
- mProviderNames was rename to sProviderNames
QgsRenderer {#qgis_api_break_3_0_QgsRenderer}
-----------
- New virtual method <code>bool writeSld( QDomNode& node, QDomDocument& doc, QString& errorMessage, QgsStringMap props = QgsStringMap() )</code> accepts an
optional property map passing down layer level properties to the SLD encoders. If scale based visibility is enabled, it will contain the
<code>scaleMinDenom</code> and <code>scaleMaxDenom</code> properties.
- The RotationField capabitity was removed. This is now handled using data defined rotation at a symbol layer level
- setScaleMethodToSymbol was removed. This is now handled using data defined scaling at a symbol layer level
- setScaleMethodToSymbol was removed. This is now handled using data defined scaling at a symbol layer level
- usedAttributes is now a const method and returns QSet<QString> instead of QStringList
QgsRequestHandler {#qgis_api_break_3_0_QgsRequestHandler}
-----------------
- Removed infoFormat and setInfoFormat methods: the format of the response is given and set with the "Content-Type" header.
- Removed setCoverageResponse
Processing {#qgis_api_break_3_0_Processing}
----------
- Algorithm providers now subclass the c++ QgsProcessingProvider class, and must be adapted to the API for QgsProcessingProvider. Specifically,
getName() should be replaced with id(), getDescription() with name(), and getIcon with icon().
- Algorithm's processAlgorithm method now passes a QgsProcessingFeedback object instead of the loosely defined progress parameter. Algorithms will
need to update their use of the progress argument to utilise the QgsProcessingFeedback API.
- Similarly, Python processing scripts no longer have access to a progress variable for reporting their progress. Instead they have a feedback
object of type QgsProcessingFeedback, and will need to adapt their use of progress reporting to the QgsProcessingFeedback API.
- SilentProgress was removed. Use the base QgsProcessingFeedback class instead.
Triangulation {#qgis_api_break_3_0_Triangulation}
-------------
- forcedCrossBehaviour enum and its setter and getter have been renamed to ForcedCrossBehavior. Its members have been renamed: SnappingType_VERTICE: SnappingTypeVertex, DELETE_FIRST: DeleteFirst, INSERT_VERTEX: InsertVertex. <!--#spellok-->
QgsZonalStatistics {#qgis_api_break_3_0_QgsZonalStatistics}
------------------
- QgsZonalStatistics() сonstructor now accepts pointer to the QgsRasterLayer instance instead of path to the raster file
QGIS 2.6 {#qgis_api_break_2_6}
========
Legend Refactoring {#qgis_api_break_legend_refactoring}
------------------
- QgsComposerLegend::model() - not being used anymore. The model was replaced by one based on QgsLayerTreeModel class
and is available in QgsComposerLegend::modelV2()
QGIS 2.4 {#qgis_api_break_2_4}
========
Multi-threaded Rendering {#qgis_api_break_mtr}
------------------------
- QgsMapCanvas::refresh() only schedules a map refresh (in near feature) and returns immediately - before it would do the drawing immediately
and return when the map is redrawn. A call to refresh() will have no effect if there is already a scheduled pending refresh.
When map canvas does actual rendering, it will first emit renderStarting() signal, once done it will emit mapCanvasRefreshed().
The client code doing refresh() in order to later save map image should be updated to use new QgsMapRendererJob API which is better suited for such task.
- QgsPluginLayer::draw() is now run in a background thread. It is recommended to implement newly added QgsPluginLayer::createMapRenderer()
method instead of using QgsPluginLayer::draw().
*/