Skip to content
Permalink
Browse files

Make QgsMarkerSymbolLayer::bounds pure virtual

  • Loading branch information
nyalldawson committed Sep 13, 2016
1 parent e122546 commit 098f69d87800432700bcbc6f0aa6a3cd49d55a94
@@ -776,6 +776,12 @@ be returned instead of a null pointer if no transformation is required.</li>
plugins calling this method will need to be updated.</li>
</ul>

\subsection qgis_api_break_3_0_QgsMarkerSymbolLayer QgsMarkerSymbolLayer

<ul>
<li>bounds() is now pure virtual and must be implemented in all subclasses.</li>
</ul>

\subsection qgis_api_break_3_0_QgsMimeDataUtils QgsMimeDataUtils

<ul>
@@ -516,10 +516,8 @@ class QgsMarkerSymbolLayer : QgsSymbolLayer
* any data defined overrides and offsets which are set for the marker layer.
* @returns approximate symbol bounds, in painter units
* @note added in QGIS 2.14
* @note this method will become pure virtual in QGIS 3.0
*/
//TODO QGIS 3.0 - make pure virtual
virtual QRectF bounds( QPointF point, QgsSymbolRenderContext& context );
virtual QRectF bounds( QPointF point, QgsSymbolRenderContext& context ) = 0;

protected:

@@ -83,4 +83,6 @@ class QgsVectorFieldSymbolLayer : QgsMarkerSymbolLayer

void setDistanceMapUnitScale( const QgsMapUnitScale& scale );
const QgsMapUnitScale& distanceMapUnitScale() const;

QRectF bounds( QPointF point, QgsSymbolRenderContext& context );
};
@@ -581,10 +581,8 @@ class CORE_EXPORT QgsMarkerSymbolLayer : public QgsSymbolLayer
* any data defined overrides and offsets which are set for the marker layer.
* @returns approximate symbol bounds, in painter units
* @note added in QGIS 2.14
* @note this method will become pure virtual in QGIS 3.0
*/
//TODO QGIS 3.0 - make pure virtual
virtual QRectF bounds( QPointF point, QgsSymbolRenderContext& context ) { Q_UNUSED( context ); Q_UNUSED( point ); return QRectF(); }
virtual QRectF bounds( QPointF point, QgsSymbolRenderContext& context ) = 0;

protected:

@@ -105,6 +105,9 @@ class CORE_EXPORT QgsVectorFieldSymbolLayer: public QgsMarkerSymbolLayer
void setDistanceMapUnitScale( const QgsMapUnitScale& scale ) { mDistanceMapUnitScale = scale; }
const QgsMapUnitScale& distanceMapUnitScale() const { return mDistanceMapUnitScale; }

// TODO - implement properly
virtual QRectF bounds( QPointF, QgsSymbolRenderContext& ) override { return QRectF(); }

private:
QString mXAttribute;
QString mYAttribute;

0 comments on commit 098f69d

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