Skip to content
Permalink
Browse files

Merge pull request #3359 from jef-n/api-updates-v2

Replace V2 in API
  • Loading branch information
jef-n committed Aug 10, 2016
2 parents 4267a19 + c24692c commit f38856e7381519431f828cc890bc8b33a8f2a544
Showing 624 changed files with 8,891 additions and 9,676 deletions.
@@ -22,23 +22,146 @@ This page tries to maintain a list with incompatible changes that happened in pr

<table>
<caption id="renamed_classes">Renamed classes</caption>
<tr><th>API 2.x <th>API 3.X
<tr><td>QgsAttributeAction <td>QgsActionManager
<tr><td>QgsColorButtonV2 <td>QgsColorButton
<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>QgsSymbologyV2Conversion <td>QgsSymbologyConversion
<tr><th>QgsSymbolV2 <th>QgsSymbol
<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><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>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>QgsDiagramRendererV2<td>QgsDiagramRenderer
<tr><td>QgsEditorWidgetV2<td>QgsEditorWidget
<tr><td>QgsEllipseSymbolLayerV2<td>QgsEllipseSymbolLayer
<tr><td>QgsEllipseSymbolLayerV2Widget<td>QgsEllipseSymbolLayerWidget
<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>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>QgsRandomColorsV2<td>QgsRandomColors
<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>QgsSymbologyV2Conversion<td>QgsSymbologyConversion
<tr><td>QgsVectorColorBrewerColorRampV2<td>QgsVectorColorBrewerColorRamp
<tr><td>QgsVectorColorBrewerColorRampV2Dialog<td>QgsVectorColorBrewerColorRampDialog
<tr><td>QgsVectorColorBrewerColorRampV2DialogBase<td>QgsVectorColorBrewerColorRampDialogBase
<tr><td>QgsVectorColorRampV2<td>QgsVectorColorRamp
<tr><td>QgsVectorColorRampV2Map<td>QgsVectorColorRampMap
<tr><td>QgsVectorGradientColorRampV2<td>QgsVectorGradientColorRamp
<tr><td>QgsVectorGradientColorRampV2Dialog<td>QgsVectorGradientColorRampDialog
<tr><td>QgsVectorGradientColorRampV2DialogBase<td>QgsVectorGradientColorRampDialogBase
<tr><td>QgsVectorGradientRampV2<td>QgsVectorGradientRamp
<tr><td>QgsVectorLayersetRendererV2<td>QgsVectorLayersetRenderer
<tr><td>QgsVectorRandomColorRampV2<td>QgsVectorRandomColorRamp
<tr><td>QgsVectorRandomColorRampV2Dialog<td>QgsVectorRandomColorRampDialog
<tr><td>QgsVectorRandomColorRampV2DialogBase<td>QgsVectorRandomColorRampDialogBase
<tr><th>QgsSymbolV2<th>QgsSymbol
</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>QgsApplication<td>defaultStyleV2Path<td>defaultStylePath
<tr><td>QgsApplication<td>userStyleV2Path<td>userStylePath
<tr><td>QgsComposerShape<td>setUseSymbolV2<td>setUseSymbol
<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>QgsVectorLayerEditUtils<td>deleteVertexV2<td>deleteVertex
<tr><td>QgsComposerSymbolItem<td>symbolV2<td>symbol
</table>

\subsection qgis_api_break_3_0_removed_classes Removed Classes
@@ -56,6 +179,7 @@ should now call QgsCoordinateReferenceSystem::invalidateCache() and QgsCoordinat
<li>QgsMapRenderer. It has been replaced by QgsMapRendererJob with subclasses and QgsMapSettings.</li>
<li>QgsPseudoColorShader. This shader has been broken for some time and was replaced by QgsSingleBandPseudoColorRenderer.</li>
<li>QgsRendererV2DataDefinedMenus was removed. Use QgsDataDefinedButton instead.</li>
<li>QgsLegacyHelpers.</li>
</ul>

\subsection qgis_api_break_3_0_global General changes
@@ -713,6 +837,13 @@ displayExpression instead. For the map tip use mapTipTemplate() instead.</li>
<li>commitErrors() now returns an object, rather than a reference. This has no effect on PyQGIS code.</li>
<li>subsetString() was made const. This has no effect on PyQGIS code, but c++ code implementing derived layer classes will need to update the signature of this method to match.</li>
<li>label(), enableLabels(), hasLabelsEnabled(), drawLabels() have been removed. Replaced by labeling based on PAL library, see QgsLabelingEngineV2.</li>
<li>Signal layerDeleted() has been removed. Replaced by Qt signal destroyed().</li>
<li>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()</li>
<li>select() replaced by selectByRect()
<li>setSelectedFeatures() replaced by selectByIds()
<li>applyNamedStyle() replaced by applyNamedStyle()
<li>isReadOnly() use readOnly()
<li>Signal changeAttributeValue()
</ul>

\subsection qgis_api_break_3_0_QgsVectorLayerEditBuffer QgsVectorLayerEditBuffer
@@ -149,14 +149,14 @@ class QgsComposerArrow: QgsComposerItem
* @see lineSymbol
* @note added in 2.5
*/
void setLineSymbol( QgsLineSymbolV2* symbol /Transfer/ );
void setLineSymbol( QgsLineSymbol* symbol /Transfer/ );

/** Returns the line symbol used for drawing the line portion of the arrow
* @returns line symbol
* @see setLineSymbol
* @note added in 2.5
*/
QgsLineSymbolV2* lineSymbol();
QgsLineSymbol* lineSymbol();

/** Returns marker mode, which controls how the arrow endpoints are drawn
* @returns marker mode
@@ -41,26 +41,26 @@ class QgsComposerLegendItem : QStandardItem
};


class QgsComposerSymbolV2Item: QgsComposerLegendItem
class QgsComposerSymbolItem: QgsComposerLegendItem
{
%TypeHeaderCode
#include <qgscomposerlegenditem.h>
%End

public:
QgsComposerSymbolV2Item();
QgsComposerSymbolV2Item( const QString& text );
QgsComposerSymbolV2Item( const QIcon& icon, const QString& text );
virtual ~QgsComposerSymbolV2Item();
QgsComposerSymbolItem();
QgsComposerSymbolItem( const QString& text );
QgsComposerSymbolItem( const QIcon& icon, const QString& text );
virtual ~QgsComposerSymbolItem();

virtual QStandardItem* clone() const /Factory/;

virtual void writeXml( QDomElement& elem, QDomDocument& doc ) const;
virtual void readXml( const QDomElement& itemElem, bool xServerAvailable = true );

/** Set symbol (takes ownership)*/
void setSymbolV2( QgsSymbol* s /Transfer/ );
QgsSymbol* symbolV2();
void setSymbol( QgsSymbol* s /Transfer/ );
QgsSymbol* symbol();

ItemType itemType() const;
};
@@ -510,12 +510,12 @@ class QgsComposerMap : QgsComposerItem
/**
* @deprecated use grid()->setLineSymbol() or grids() instead
*/
void setGridLineSymbol( QgsLineSymbolV2* symbol /Transfer/) /Deprecated/;
void setGridLineSymbol( QgsLineSymbol* symbol /Transfer/) /Deprecated/;

/**
* @deprecated use grid()->lineSymbol() or grids() instead
*/
QgsLineSymbolV2* gridLineSymbol() /Deprecated/;
QgsLineSymbol* gridLineSymbol() /Deprecated/;

/** Returns the grid's blending mode
* @deprecated use grid()->blendMode() or grids() instead
@@ -612,12 +612,12 @@ class QgsComposerMap : QgsComposerItem
/**
* @deprecated use overview()->setFrameSymbol() or overviews() instead
*/
void setOverviewFrameMapSymbol( QgsFillSymbolV2* symbol /Transfer/ ) /Deprecated/;
void setOverviewFrameMapSymbol( QgsFillSymbol* symbol /Transfer/ ) /Deprecated/;

/**
* @deprecated use overview()->frameSymbol() or overviews() instead
*/
QgsFillSymbolV2* overviewFrameMapSymbol() /Deprecated/;
QgsFillSymbol* overviewFrameMapSymbol() /Deprecated/;

/** Returns the overview's blending mode
* @deprecated use overview()->blendMode() or overviews() instead
@@ -451,7 +451,7 @@ class QgsComposerMapGrid : QgsComposerMapItem
* @see setMarkerSymbol
* @see setStyle
*/
void setLineSymbol( QgsLineSymbolV2* symbol /Transfer/ );
void setLineSymbol( QgsLineSymbol* symbol /Transfer/ );

/** Gets the line symbol used for drawing grid lines. This is only used for grids with
* QgsComposerMapGrid::Solid or QgsComposerMapGrid::Cross styles.
@@ -461,7 +461,7 @@ class QgsComposerMapGrid : QgsComposerMapItem
* @see style
* @note not available in python bindings
*/
// const QgsLineSymbolV2* lineSymbol() const { return mGridLineSymbol; }
// const QgsLineSymbol* lineSymbol() const { return mGridLineSymbol; }

/** Gets the line symbol used for drawing grid lines. This is only used for grids with
* QgsComposerMapGrid::Solid or QgsComposerMapGrid::Cross styles.
@@ -470,7 +470,7 @@ class QgsComposerMapGrid : QgsComposerMapItem
* @see markerSymbol
* @see style
*/
QgsLineSymbolV2* lineSymbol();
QgsLineSymbol* lineSymbol();

/** Sets the marker symbol used for drawing grid points. This is only used for grids with a
* QgsComposerMapGrid::Markers style.
@@ -479,7 +479,7 @@ class QgsComposerMapGrid : QgsComposerMapItem
* @see setLineSymbol
* @see setStyle
*/
void setMarkerSymbol( QgsMarkerSymbolV2* symbol /Transfer/);
void setMarkerSymbol( QgsMarkerSymbol* symbol /Transfer/);

/** Gets the marker symbol used for drawing grid points. This is only used for grids with a
* QgsComposerMapGrid::Markers style.
@@ -489,7 +489,7 @@ class QgsComposerMapGrid : QgsComposerMapItem
* @see style
* @note not available in python bindings
*/
// const QgsMarkerSymbolV2* markerSymbol() const { return mGridMarkerSymbol; }
// const QgsMarkerSymbol* markerSymbol() const { return mGridMarkerSymbol; }

/** Gets the marker symbol used for drawing grid points. This is only used for grids with a
* QgsComposerMapGrid::Markers style.
@@ -498,7 +498,7 @@ class QgsComposerMapGrid : QgsComposerMapItem
* @see lineSymbol
* @see style
*/
QgsMarkerSymbolV2* markerSymbol();
QgsMarkerSymbol* markerSymbol();

//
// ANNOTATIONS
@@ -157,20 +157,20 @@ class QgsComposerMapOverview : QgsComposerMapItem
* @param symbol fill symbol for overview
* @see frameSymbol
*/
void setFrameSymbol( QgsFillSymbolV2* symbol /Transfer/ );
void setFrameSymbol( QgsFillSymbol* symbol /Transfer/ );

/** Gets the fill symbol used for drawing the overview extent.
* @returns fill symbol for overview
* @see setFrameSymbol
*/
QgsFillSymbolV2* frameSymbol();
QgsFillSymbol* frameSymbol();

/** Gets the fill symbol used for drawing the overview extent.
* @returns fill symbol for overview
* @see setFrameSymbol
* @note not available in python bindings
*/
// const QgsFillSymbolV2* frameSymbol() const { return mFrameSymbol; }
// const QgsFillSymbol* frameSymbol() const { return mFrameSymbol; }

/** Retrieves the blending mode used for drawing the overview.
* @returns blending mode for overview
@@ -13,10 +13,10 @@ class QgsComposerPolygon: QgsComposerNodesItem
virtual QString displayName() const;

/** Returns the QgsSymbol used to draw the shape. */
QgsFillSymbolV2* polygonStyleSymbol();
QgsFillSymbol* polygonStyleSymbol();

/** Set the QgsSymbol used to draw the shape. */
void setPolygonStyleSymbol( QgsFillSymbolV2* symbol );
void setPolygonStyleSymbol( QgsFillSymbol* symbol );

/** Return correct graphics item type. */
virtual int type() const;
@@ -13,10 +13,10 @@ class QgsComposerPolyline: QgsComposerNodesItem
virtual QString displayName() const;

/** Returns the QgsSymbol used to draw the shape. */
QgsLineSymbolV2* polylineStyleSymbol();
QgsLineSymbol* polylineStyleSymbol();

/** Set the QgsSymbol used to draw the shape. */
void setPolylineStyleSymbol( QgsLineSymbolV2* symbol );
void setPolylineStyleSymbol( QgsLineSymbol* symbol );

/** Overridden to return shape type */
virtual int type() const;

0 comments on commit f38856e

Please sign in to comment.
You can’t perform that action at this time.