Skip to content

Commit

Permalink
Merge pull request #3355 from 3nids/V2removal
Browse files Browse the repository at this point in the history
remove V2 in some classes
  • Loading branch information
3nids committed Aug 5, 2016
2 parents 19ab72c + acbf5cd commit ab57541
Show file tree
Hide file tree
Showing 289 changed files with 4,554 additions and 4,532 deletions.
38 changes: 30 additions & 8 deletions doc/api_break.dox
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,28 @@ This page tries to maintain a list with incompatible changes that happened in pr

\section qgis_api_break_3_0 QGIS 3.0

\subsection qgis_api_break_3_0_renamed_classes Renamed Classes

<table>
<caption id="renamed_classes">Renamed classes</caption>
<tr><th>API 2.x <th>API 3.X
<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
</table>

\subsection qgis_api_break_3_0_removed_classes Removed Classes

<ul>
Expand Down Expand Up @@ -531,30 +553,30 @@ be returned instead of a null pointer if no transformation is required.</li>
<li>Constructor variant with QgsMapRenderer has been removed. Use the variant with QgsMapSettings.</li>
</ul>

\subsection qgis_api_break_3_0_QgsSymbolV2 QgsSymbolV2
\subsection qgis_api_break_3_0_QgsSymbol QgsSymbol (renamed from QgsSymbolV2)

<ul>
<li>The OutputUnit enum, including QgsSymbolV2::MM, QgsSymbolV2::MapUnit, QgsSymbolV2::Mixed, QgsSymbolV2::Pixel and QgsSymbolV2::Percentage has been moved to QgsUnitTypes
and renamed to RenderUnit. QgsSymbolV2::OutputUnitList was renamed to QgsUnitTypes::RenderUnitList. All methods which previously accepted QgsSymbolV2::OutputUnit
parameters or QgsSymbolV2::OutputUnitList parameters now take QgsUnitTypes::RenderUnit or QgsUnitTypes::RenderUnitList parameters respectively.</li>
<li>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.</li>
<li>startRender() now accepts a QgsFields reference, not a pointer.</li>
</ul>

\subsection qgis_api_break_3_0_QgsSymbolLayerV2 QgsSymbolLayerV2
\subsection qgis_api_break_3_0_QgsSymbolLayer QgsSymbolLayer (renamed from QgsSymbolLayerV2)

<ul>
<li>The deprecated prepareExpressions( const QgsFields* fields, double scale = -1.0 ) method has been removed. Use
the variant which takes QgsSymbolV2RenderContext instead.</li>
the variant which takes QgsSymbolRenderContext instead.</li>
</ul>

\subsection qgis_api_break_3_0_QgsSymbolV2RenderContext QgsSymbolV2RenderContext
\subsection qgis_api_break_3_0_QgsSymbolRenderContext QgsSymbolRenderContext (renamed from QgsSymbolV2RenderContext)

<ul>
<li>The constructor now accepts a QgsFields reference, not a pointer.</li>
<li>fields() now returns a QgsFields value, not a pointer.</li>
</ul>

\subsection qgis_api_break_3_0_QgsSymbolLayerV2Utils QgsSymbolLayerV2Utils
\subsection qgis_api_break_3_0_QgsSymbolLayerUtils QgsSymbolLayerUtils (renamed from QgsSymbolLayerUtilsV2)

<ul>
<li>encodeOutputUnit() and decodeOutputUnit() were removed. QgsUnitTypes::encodeUnit() and QgsUnitTypes::decodeRenderUnit() should be used instead.</li>
Expand Down
4 changes: 2 additions & 2 deletions python/core/composer/qgscomposerlegenditem.sip
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ class QgsComposerSymbolV2Item: QgsComposerLegendItem
virtual void readXml( const QDomElement& itemElem, bool xServerAvailable = true );

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

ItemType itemType() const;
};
Expand Down
4 changes: 2 additions & 2 deletions python/core/composer/qgscomposerpolygon.sip
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ class QgsComposerPolygon: QgsComposerNodesItem
/** Overridden to return shape name */
virtual QString displayName() const;

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

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

/** Return correct graphics item type. */
Expand Down
4 changes: 2 additions & 2 deletions python/core/composer/qgscomposerpolyline.sip
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ class QgsComposerPolyline: QgsComposerNodesItem
/** Overridden to return shape name */
virtual QString displayName() const;