Skip to content

Commit

Permalink
removed V2 from QgsSymbolV2*
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Aug 5, 2016
1 parent c16d139 commit 275736d
Show file tree
Hide file tree
Showing 230 changed files with 2,074 additions and 2,068 deletions.
36 changes: 21 additions & 15 deletions doc/api_break.dox
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,22 @@ 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>QgsColorButtonV2 <tr><td>QgsColorButton
<tr><td>QgsSymbolLayerV2 <tr><td>QgsSymbolLayer
<tr><td>QgsSymbolLayerV2AbstractMetadata <tr><td>QgsSymbolLayerAbstractMetadata
<tr><td>QgsSymbolLayerV2Metadata <tr><td>QgsSymbolLayerMetadata
<tr><td>QgsSymbolLayerV2Registry <tr><td>QgsSymbolLayerRegistry
<tr><td>QgsSymbolLayerV2Utils <tr><td>QgsSymbolLayerUtils
<tr><td>QgsSymbolLayerV2Widget <tr><td>QgsSymbolLayerWidget
<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><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 @@ -545,23 +551,23 @@ 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_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>
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;

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

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

/** Overridden to return shape type */
Expand Down
2 changes: 1 addition & 1 deletion python/core/composer/qgslegendmodel.sip
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class QgsLegendModel : QStandardItemModel
/** Updates the whole symbology of a layer*/
void updateLayer( QStandardItem* layerItem );
/** Tries to update a single classification item*/
void updateVectorV2ClassificationItem( QStandardItem* classificationItem, QgsSymbolV2* symbol, const QString& itemText );
void updateVectorV2ClassificationItem( QStandardItem* classificationItem, QgsSymbol* symbol, const QString& itemText );

void updateRasterClassificationItem( QStandardItem* classificationItem );

Expand Down
2 changes: 1 addition & 1 deletion python/core/core.sip
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@
%Include symbology-ng/qgscptcityarchive.sip
%Include symbology-ng/qgsstylev2.sip
%Include symbology-ng/qgssvgcache.sip
%Include symbology-ng/qgssymbolv2.sip
%Include symbology-ng/qgssymbol.sip
%Include symbology-ng/qgsvectorcolorrampv2.sip

%Include symbology-ng/qgs25drenderer.sip
Expand Down
12 changes: 6 additions & 6 deletions python/core/layertree/qgslayertreemodellegendnode.sip
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class QgsLayerTreeModelLegendNode : QObject
enum LegendNodeRoles
{
RuleKeyRole, //!< rule key of the node (QString)
SymbolV2LegacyRuleKeyRole, //!< for QgsSymbolV2LegendNode only - legacy rule key (void ptr, to be cast to QgsSymbolV2 ptr)
SymbolV2LegacyRuleKeyRole, //!< for QgsSymbolLegendNode only - legacy rule key (void ptr, to be cast to QgsSymbol ptr)
ParentRuleKeyRole //!< rule key of the parent legend node - for legends with tree hierarchy (QString). Added in 2.8
};

Expand Down Expand Up @@ -112,14 +112,14 @@ class QgsLayerTreeModelLegendNode : QObject
*
* @note added in 2.6
*/
class QgsSymbolV2LegendNode : QgsLayerTreeModelLegendNode
class QgsSymbolLegendNode : QgsLayerTreeModelLegendNode
{
%TypeHeaderCode
#include <qgslayertreemodellegendnode.h>
%End
public:
QgsSymbolV2LegendNode( QgsLayerTreeLayer* nodeLayer, const QgsLegendSymbolItemV2& item, QObject* parent /TransferThis/ = 0 );
~QgsSymbolV2LegendNode();
QgsSymbolLegendNode( QgsLayerTreeLayer* nodeLayer, const QgsLegendSymbolItemV2& item, QObject* parent /TransferThis/ = 0 );
~QgsSymbolLegendNode();

virtual Qt::ItemFlags flags() const;
virtual QVariant data( int role ) const;
Expand Down Expand Up @@ -149,15 +149,15 @@ class QgsSymbolV2LegendNode : QgsLayerTreeModelLegendNode
* @see setSymbol()
* @note added in QGIS 2.14
*/
const QgsSymbolV2* symbol() const;
const QgsSymbol* symbol() const;

/** Sets the symbol to be used by the legend node. The symbol change is also propagated
* to the associated vector layer's renderer.
* @param symbol new symbol for node. Ownership is transferred.
* @see symbol()
* @note added in QGIS 2.14
*/
void setSymbol( QgsSymbolV2* symbol /Transfer/ );
void setSymbol( QgsSymbol* symbol /Transfer/ );

public slots:

Expand Down
8 changes: 4 additions & 4 deletions python/core/qgsconditionalstyle.sip
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ class QgsConditionalStyle

/**
* @brief Set the icon for the style. Icons are generated from symbols
* @param value QgsSymbolV2 to be used when generating the icon
* @param value QgsSymbol to be used when generating the icon
*/
void setSymbol( QgsSymbolV2* value );
void setSymbol( QgsSymbol* value );

/**
* @brief The name of the style.
Expand All @@ -131,9 +131,9 @@ class QgsConditionalStyle

/**
* @brief The symbol used to generate the icon for the style
* @return The QgsSymbolV2 used for the icon
* @return The QgsSymbol used for the icon
*/
QgsSymbolV2* symbol() const;
QgsSymbol* symbol() const;

/**
* @brief The text color set for style
Expand Down
2 changes: 1 addition & 1 deletion python/core/qgsdiagramrendererv2.sip
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ class QgsDiagramSettings
%End
public:

//! @deprecated use QgsSymbolV2::OutputUnit instead
//! @deprecated use QgsSymbol::OutputUnit instead
enum SizeType
{
MM,
Expand Down