diff --git a/python/core/qgsfeaturerequest.sip b/python/core/qgsfeaturerequest.sip index f9d3397ca08..6f950967cc9 100644 --- a/python/core/qgsfeaturerequest.sip +++ b/python/core/qgsfeaturerequest.sip @@ -65,7 +65,10 @@ class QgsFeatureRequest QgsFeatureRequest& setSubsetOfAttributes( const QStringList& attrNames, const QgsFields& fields ); //! Set a simplification method for geometries that will be fetched + //! @note added in 2.2 QgsFeatureRequest& setSimplifyMethod( const QgsSimplifyMethod& simplifyMethod ); + //! Get simplification method for geometries that will be fetched + //! @note added in 2.2 const QgsSimplifyMethod& simplifyMethod() const; /** diff --git a/python/core/qgssimplifymethod.sip b/python/core/qgssimplifymethod.sip index bd519fa7ec5..8fa8ba97d33 100644 --- a/python/core/qgssimplifymethod.sip +++ b/python/core/qgssimplifymethod.sip @@ -1,5 +1,7 @@ -/** This class contains information about how to simplify geometries fetched from a QgsFeatureIterator */ +/** This class contains information about how to simplify geometries fetched from a QgsFeatureIterator + * @note added in 2.2 + */ class QgsSimplifyMethod { %TypeHeaderCode diff --git a/python/core/qgsvectorlayer.sip b/python/core/qgsvectorlayer.sip index 4e10c055892..9a49096454c 100644 --- a/python/core/qgsvectorlayer.sip +++ b/python/core/qgsvectorlayer.sip @@ -1025,21 +1025,20 @@ class QgsVectorLayer : QgsMapLayer /** @note not available in python bindings */ // inline QgsGeometryCache* cache(); - /** Simplification flags for fast rendering of features */ - enum SimplifyHint - { - NoSimplification = 0, //!< No simplification can be applied - GeometrySimplification = 1, //!< The geometries can be simplified using the current map2pixel context state - AntialiasingSimplification = 2, //!< The geometries can be rendered with 'AntiAliasing' disabled because of it is '1-pixel size' - FullSimplification = 3, //!< All simplification hints can be applied ( Geometry + AA-disabling ) - }; - /** Set the simplification settings for fast rendering of features */ + /** Set the simplification settings for fast rendering of features + * @note added in 2.2 + */ void setSimplifyMethod( const QgsVectorSimplifyMethod& simplifyMethod ); - /** Returns the simplification settings for fast rendering of features */ + /** Returns the simplification settings for fast rendering of features + * @note added in 2.2 + */ const QgsVectorSimplifyMethod& simplifyMethod() const; - /** Returns whether the VectorLayer can apply the specified simplification hint */ - bool simplifyDrawingCanbeApplied( const QgsRenderContext& renderContext, int simplifyHint ) const; + /** Returns whether the VectorLayer can apply the specified simplification hint + * @note Do not use in 3rd party code - may be removed in future version! + * @note added in 2.2 + */ + bool simplifyDrawingCanbeApplied( const QgsRenderContext& renderContext, QgsVectorSimplifyMethod::SimplifyHint simplifyHint ) const; public slots: /** diff --git a/python/core/qgsvectorsimplifymethod.sip b/python/core/qgsvectorsimplifymethod.sip index 7b9ed3167a6..4ec00c73f4a 100644 --- a/python/core/qgsvectorsimplifymethod.sip +++ b/python/core/qgsvectorsimplifymethod.sip @@ -1,5 +1,7 @@ -/** This class contains information how to simplify geometries fetched from a vector layer */ +/** This class contains information how to simplify geometries fetched from a vector layer + * @note added in 2.2 + */ class QgsVectorSimplifyMethod { %TypeHeaderCode @@ -12,10 +14,20 @@ class QgsVectorSimplifyMethod //! copy constructor QgsVectorSimplifyMethod( const QgsVectorSimplifyMethod& rh ); + /** Simplification flags for fast rendering of features */ + enum SimplifyHint + { + NoSimplification = 0, //!< No simplification can be applied + GeometrySimplification = 1, //!< The geometries can be simplified using the current map2pixel context state + AntialiasingSimplification = 2, //!< The geometries can be rendered with 'AntiAliasing' disabled because of it is '1-pixel size' + FullSimplification = 3, //!< All simplification hints can be applied ( Geometry + AA-disabling ) + }; + typedef QFlags SimplifyHints; + /** Sets the simplification hints of the vector layer managed */ - void setSimplifyHints( int simplifyHints ); + void setSimplifyHints( QFlags simplifyHints ); /** Gets the simplification hints of the vector layer managed */ - int simplifyHints() const; + QFlags simplifyHints() const; /** Sets the simplification threshold of the vector layer managed */ void setThreshold( float threshold ); @@ -32,3 +44,5 @@ class QgsVectorSimplifyMethod /** Gets the maximum scale at which the layer should be simplified */ float maximumScale() const; }; + +QFlags operator|( QgsVectorSimplifyMethod::SimplifyHint f1, QFlags f2 ); diff --git a/src/app/qgsoptions.cpp b/src/app/qgsoptions.cpp index bd062cb9e12..bf65c9d0784 100644 --- a/src/app/qgsoptions.cpp +++ b/src/app/qgsoptions.cpp @@ -569,7 +569,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) : chkUseRenderCaching->setChecked( settings.value( "/qgis/enable_render_caching", false ).toBool() ); // Default simplify drawing configuration - mSimplifyDrawingGroupBox->setChecked( settings.value( "/qgis/simplifyDrawingHints", ( int )QgsVectorLayer::GeometrySimplification ).toInt() != QgsVectorLayer::NoSimplification ); + mSimplifyDrawingGroupBox->setChecked( settings.value( "/qgis/simplifyDrawingHints", ( int )QgsVectorSimplifyMethod::GeometrySimplification ).toInt() != QgsVectorSimplifyMethod::NoSimplification ); mSimplifyDrawingSpinBox->setValue( settings.value( "/qgis/simplifyDrawingTol", QGis::DEFAULT_MAPTOPIXEL_THRESHOLD ).toFloat() ); mSimplifyDrawingAtProvider->setChecked( !settings.value( "/qgis/simplifyLocal", true ).toBool() ); @@ -1110,13 +1110,13 @@ void QgsOptions::saveOptions() settings.setValue( "/qgis/capitaliseLayerName", capitaliseCheckBox->isChecked() ); // Default simplify drawing configuration - int simplifyHints = QgsVectorLayer::NoSimplification; + QgsVectorSimplifyMethod::SimplifyHints simplifyHints = QgsVectorSimplifyMethod::NoSimplification; if ( mSimplifyDrawingGroupBox->isChecked() ) { - simplifyHints |= QgsVectorLayer::GeometrySimplification; - if ( mSimplifyDrawingSpinBox->value() > 1 ) simplifyHints |= QgsVectorLayer::AntialiasingSimplification; + simplifyHints |= QgsVectorSimplifyMethod::GeometrySimplification; + if ( mSimplifyDrawingSpinBox->value() > 1 ) simplifyHints |= QgsVectorSimplifyMethod::AntialiasingSimplification; } - settings.setValue( "/qgis/simplifyDrawingHints", simplifyHints ); + settings.setValue( "/qgis/simplifyDrawingHints", ( int ) simplifyHints ); settings.setValue( "/qgis/simplifyDrawingTol", mSimplifyDrawingSpinBox->value() ); settings.setValue( "/qgis/simplifyLocal", !mSimplifyDrawingAtProvider->isChecked() ); settings.setValue( "/qgis/simplifyMaxScale", 1.0 / mSimplifyMaximumScaleComboBox->scale() ); diff --git a/src/app/qgsvectorlayerproperties.cpp b/src/app/qgsvectorlayerproperties.cpp index 2657589a2e1..c1914b56dbe 100644 --- a/src/app/qgsvectorlayerproperties.cpp +++ b/src/app/qgsvectorlayerproperties.cpp @@ -393,7 +393,7 @@ void QgsVectorLayerProperties::syncToLayer( void ) // get simplify drawing configuration const QgsVectorSimplifyMethod& simplifyMethod = layer->simplifyMethod(); - mSimplifyDrawingGroupBox->setChecked( simplifyMethod.simplifyHints() != QgsVectorLayer::NoSimplification ); + mSimplifyDrawingGroupBox->setChecked( simplifyMethod.simplifyHints() != QgsVectorSimplifyMethod::NoSimplification ); mSimplifyDrawingSpinBox->setValue( simplifyMethod.threshold() ); if ( !( layer->dataProvider()->capabilities() & QgsVectorDataProvider::SimplifyGeometries ) ) @@ -558,11 +558,11 @@ void QgsVectorLayerProperties::apply() layer->setMetadataUrlFormat( mLayerMetadataUrlFormatComboBox->currentText() ); //layer simplify drawing configuration - int simplifyHints = QgsVectorLayer::NoSimplification; + QgsVectorSimplifyMethod::SimplifyHints simplifyHints = QgsVectorSimplifyMethod::NoSimplification; if ( mSimplifyDrawingGroupBox->isChecked() ) { - simplifyHints |= QgsVectorLayer::GeometrySimplification; - if ( mSimplifyDrawingSpinBox->value() > 1 ) simplifyHints |= QgsVectorLayer::AntialiasingSimplification; + simplifyHints |= QgsVectorSimplifyMethod::GeometrySimplification; + if ( mSimplifyDrawingSpinBox->value() > 1 ) simplifyHints |= QgsVectorSimplifyMethod::AntialiasingSimplification; } QgsVectorSimplifyMethod simplifyMethod = layer->simplifyMethod(); simplifyMethod.setSimplifyHints( simplifyHints ); diff --git a/src/core/qgsfeaturerequest.h b/src/core/qgsfeaturerequest.h index 6c9f25a1910..f471d00b805 100644 --- a/src/core/qgsfeaturerequest.h +++ b/src/core/qgsfeaturerequest.h @@ -123,7 +123,10 @@ class CORE_EXPORT QgsFeatureRequest QgsFeatureRequest& setSubsetOfAttributes( const QStringList& attrNames, const QgsFields& fields ); //! Set a simplification method for geometries that will be fetched + //! @note added in 2.2 QgsFeatureRequest& setSimplifyMethod( const QgsSimplifyMethod& simplifyMethod ); + //! Get simplification method for geometries that will be fetched + //! @note added in 2.2 const QgsSimplifyMethod& simplifyMethod() const { return mSimplifyMethod; } /** diff --git a/src/core/qgssimplifymethod.h b/src/core/qgssimplifymethod.h index 47f31de4c03..009c471e892 100644 --- a/src/core/qgssimplifymethod.h +++ b/src/core/qgssimplifymethod.h @@ -20,6 +20,7 @@ class QgsAbstractGeometrySimplifier; /** * This class contains information about how to simplify geometries fetched from a QgsFeatureIterator + * @note added in 2.2 */ class CORE_EXPORT QgsSimplifyMethod { diff --git a/src/core/qgsvectorlayer.cpp b/src/core/qgsvectorlayer.cpp index 77b158e41e8..0c13ad4cf02 100644 --- a/src/core/qgsvectorlayer.cpp +++ b/src/core/qgsvectorlayer.cpp @@ -186,7 +186,7 @@ QgsVectorLayer::QgsVectorLayer( QString vectorLayerPath, // Default simplify drawing settings QSettings settings; - mSimplifyMethod.setSimplifyHints( settings.value( "/qgis/simplifyDrawingHints", mSimplifyMethod.simplifyHints() ).toInt() ); + mSimplifyMethod.setSimplifyHints( ( QgsVectorSimplifyMethod::SimplifyHints ) settings.value( "/qgis/simplifyDrawingHints", ( int ) mSimplifyMethod.simplifyHints() ).toInt() ); mSimplifyMethod.setThreshold( settings.value( "/qgis/simplifyDrawingTol", mSimplifyMethod.threshold() ).toFloat() ); mSimplifyMethod.setForceLocalOptimization( settings.value( "/qgis/simplifyLocal", mSimplifyMethod.forceLocalOptimization() ).toBool() ); mSimplifyMethod.setMaximumScale( settings.value( "/qgis/simplifyMaxScale", mSimplifyMethod.maximumScale() ).toFloat() ); @@ -704,7 +704,7 @@ bool QgsVectorLayer::draw( QgsRenderContext& rendererContext ) .setSubsetOfAttributes( attributes ); // enable the simplification of the geometries (Using the current map2pixel context) before send it to renderer engine. - if ( simplifyDrawingCanbeApplied( rendererContext, QgsVectorLayer::GeometrySimplification ) ) + if ( simplifyDrawingCanbeApplied( rendererContext, QgsVectorSimplifyMethod::GeometrySimplification ) ) { QPainter* p = rendererContext.painter(); double dpi = ( p->device()->logicalDpiX() + p->device()->logicalDpiY() ) / 2; @@ -1290,7 +1290,7 @@ bool QgsVectorLayer::setSubsetString( QString subset ) return res; } -bool QgsVectorLayer::simplifyDrawingCanbeApplied( const QgsRenderContext& renderContext, int simplifyHint ) const +bool QgsVectorLayer::simplifyDrawingCanbeApplied( const QgsRenderContext& renderContext, QgsVectorSimplifyMethod::SimplifyHint simplifyHint ) const { if ( mDataProvider && !mEditBuffer && ( hasGeometryType() && geometryType() != QGis::Point ) && ( mSimplifyMethod.simplifyHints() & simplifyHint ) && renderContext.useRenderingOptimization() ) { @@ -1907,7 +1907,7 @@ bool QgsVectorLayer::readSymbology( const QDomNode& node, QString& errorMessage } // get the simplification drawing settings - mSimplifyMethod.setSimplifyHints( e.attribute( "simplifyDrawingHints", "1" ).toInt() ); + mSimplifyMethod.setSimplifyHints( ( QgsVectorSimplifyMethod::SimplifyHints ) e.attribute( "simplifyDrawingHints", "1" ).toInt() ); mSimplifyMethod.setThreshold( e.attribute( "simplifyDrawingTol", "1" ).toFloat() ); mSimplifyMethod.setForceLocalOptimization( e.attribute( "simplifyLocal", "1" ).toInt() ); mSimplifyMethod.setMaximumScale( e.attribute( "simplifyMaxScale", "1" ).toFloat() ); diff --git a/src/core/qgsvectorlayer.h b/src/core/qgsvectorlayer.h index 226bbe4ab76..d74e865167d 100644 --- a/src/core/qgsvectorlayer.h +++ b/src/core/qgsvectorlayer.h @@ -1376,21 +1376,20 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer /** @note not available in python bindings */ inline QgsGeometryCache* cache() { return mCache; } - /** Simplification flags for fast rendering of features */ - enum SimplifyHint - { - NoSimplification = 0, //!< No simplification can be applied - GeometrySimplification = 1, //!< The geometries can be simplified using the current map2pixel context state - AntialiasingSimplification = 2, //!< The geometries can be rendered with 'AntiAliasing' disabled because of it is '1-pixel size' - FullSimplification = 3, //!< All simplification hints can be applied ( Geometry + AA-disabling ) - }; - /** Set the simplification settings for fast rendering of features */ + /** Set the simplification settings for fast rendering of features + * @note added in 2.2 + */ void setSimplifyMethod( const QgsVectorSimplifyMethod& simplifyMethod ) { mSimplifyMethod = simplifyMethod; } - /** Returns the simplification settings for fast rendering of features */ + /** Returns the simplification settings for fast rendering of features + * @note added in 2.2 + */ inline const QgsVectorSimplifyMethod& simplifyMethod() const { return mSimplifyMethod; } - /** Returns whether the VectorLayer can apply the specified simplification hint */ - bool simplifyDrawingCanbeApplied( const QgsRenderContext& renderContext, int simplifyHint ) const; + /** Returns whether the VectorLayer can apply the specified simplification hint + * @note Do not use in 3rd party code - may be removed in future version! + * @note added in 2.2 + */ + bool simplifyDrawingCanbeApplied( const QgsRenderContext& renderContext, QgsVectorSimplifyMethod::SimplifyHint simplifyHint ) const; public slots: /** diff --git a/src/core/qgsvectorsimplifymethod.cpp b/src/core/qgsvectorsimplifymethod.cpp index 9119ce40a4b..cd0705922eb 100644 --- a/src/core/qgsvectorsimplifymethod.cpp +++ b/src/core/qgsvectorsimplifymethod.cpp @@ -18,7 +18,7 @@ #include "qgsvectorlayer.h" QgsVectorSimplifyMethod::QgsVectorSimplifyMethod() - : mSimplifyHints( QGis::DEFAULT_MAPTOPIXEL_THRESHOLD > 1 ? QgsVectorLayer::FullSimplification : QgsVectorLayer::GeometrySimplification ) + : mSimplifyHints( QGis::DEFAULT_MAPTOPIXEL_THRESHOLD > 1 ? QgsVectorSimplifyMethod::FullSimplification : QgsVectorSimplifyMethod::GeometrySimplification ) , mThreshold( QGis::DEFAULT_MAPTOPIXEL_THRESHOLD ) , mLocalOptimization( true ) , mMaximumScale( 1 ) diff --git a/src/core/qgsvectorsimplifymethod.h b/src/core/qgsvectorsimplifymethod.h index 6c754c7e5ea..c5f5761b4d8 100644 --- a/src/core/qgsvectorsimplifymethod.h +++ b/src/core/qgsvectorsimplifymethod.h @@ -16,7 +16,11 @@ #ifndef QGSVECTORSIMPLIFYMETHOD_H #define QGSVECTORSIMPLIFYMETHOD_H -/** This class contains information how to simplify geometries fetched from a vector layer */ +#include + +/** This class contains information how to simplify geometries fetched from a vector layer + * @note added in 2.2 + */ class CORE_EXPORT QgsVectorSimplifyMethod { public: @@ -27,10 +31,20 @@ class CORE_EXPORT QgsVectorSimplifyMethod //! assignment operator QgsVectorSimplifyMethod& operator=( const QgsVectorSimplifyMethod& rh ); + /** Simplification flags for fast rendering of features */ + enum SimplifyHint + { + NoSimplification = 0, //!< No simplification can be applied + GeometrySimplification = 1, //!< The geometries can be simplified using the current map2pixel context state + AntialiasingSimplification = 2, //!< The geometries can be rendered with 'AntiAliasing' disabled because of it is '1-pixel size' + FullSimplification = 3, //!< All simplification hints can be applied ( Geometry + AA-disabling ) + }; + Q_DECLARE_FLAGS( SimplifyHints, SimplifyHint ) + /** Sets the simplification hints of the vector layer managed */ - void setSimplifyHints( int simplifyHints ) { mSimplifyHints = simplifyHints; } + void setSimplifyHints( SimplifyHints simplifyHints ) { mSimplifyHints = simplifyHints; } /** Gets the simplification hints of the vector layer managed */ - inline int simplifyHints() const { return mSimplifyHints; } + inline SimplifyHints simplifyHints() const { return mSimplifyHints; } /** Sets the simplification threshold of the vector layer managed */ void setThreshold( float threshold ) { mThreshold = threshold; } @@ -49,7 +63,7 @@ class CORE_EXPORT QgsVectorSimplifyMethod private: /** Simplification hints for fast rendering of features of the vector layer managed */ - int mSimplifyHints; + SimplifyHints mSimplifyHints; /** Simplification threshold */ float mThreshold; /** Simplification executes after fetch the geometries from provider, otherwise it executes, when supported, in provider before fetch the geometries */ @@ -58,4 +72,6 @@ class CORE_EXPORT QgsVectorSimplifyMethod float mMaximumScale; }; +Q_DECLARE_OPERATORS_FOR_FLAGS( QgsVectorSimplifyMethod::SimplifyHints ) + #endif // QGSVECTORSIMPLIFYMETHOD_H diff --git a/src/core/symbology-ng/qgslinesymbollayerv2.cpp b/src/core/symbology-ng/qgslinesymbollayerv2.cpp index e8c20267a2b..60d76ab25a9 100644 --- a/src/core/symbology-ng/qgslinesymbollayerv2.cpp +++ b/src/core/symbology-ng/qgslinesymbollayerv2.cpp @@ -188,7 +188,7 @@ void QgsSimpleLineSymbolLayerV2::renderPolyline( const QPolygonF& points, QgsSym p->setPen( context.selected() ? mSelPen : mPen ); // Disable 'Antialiasing' if the geometry was generalized in the current RenderContext (We known that it must have least #2 points). - if ( points.size() <= 2 && context.layer() && context.layer()->simplifyDrawingCanbeApplied( context.renderContext(), QgsVectorLayer::AntialiasingSimplification ) && QgsAbstractGeometrySimplifier::canbeGeneralizedByDeviceBoundingBox( points, context.layer()->simplifyMethod().threshold() ) && ( p->renderHints() & QPainter::Antialiasing ) ) + if ( points.size() <= 2 && context.layer() && context.layer()->simplifyDrawingCanbeApplied( context.renderContext(), QgsVectorSimplifyMethod::AntialiasingSimplification ) && QgsAbstractGeometrySimplifier::canbeGeneralizedByDeviceBoundingBox( points, context.layer()->simplifyMethod().threshold() ) && ( p->renderHints() & QPainter::Antialiasing ) ) { p->setRenderHint( QPainter::Antialiasing, false ); p->drawPolyline( points ); diff --git a/src/core/symbology-ng/qgssymbollayerv2.cpp b/src/core/symbology-ng/qgssymbollayerv2.cpp index 49703325f32..0f9ab0c8f89 100644 --- a/src/core/symbology-ng/qgssymbollayerv2.cpp +++ b/src/core/symbology-ng/qgssymbollayerv2.cpp @@ -388,7 +388,7 @@ void QgsFillSymbolLayerV2::_renderPolygon( QPainter* p, const QPolygonF& points, } // Disable 'Antialiasing' if the geometry was generalized in the current RenderContext (We known that it must have least #5 points). - if ( points.size() <= 5 && context.layer() && context.layer()->simplifyDrawingCanbeApplied( context.renderContext(), QgsVectorLayer::AntialiasingSimplification ) && QgsAbstractGeometrySimplifier::canbeGeneralizedByDeviceBoundingBox( points, context.layer()->simplifyMethod().threshold() ) && ( p->renderHints() & QPainter::Antialiasing ) ) + if ( points.size() <= 5 && context.layer() && context.layer()->simplifyDrawingCanbeApplied( context.renderContext(), QgsVectorSimplifyMethod::AntialiasingSimplification ) && QgsAbstractGeometrySimplifier::canbeGeneralizedByDeviceBoundingBox( points, context.layer()->simplifyMethod().threshold() ) && ( p->renderHints() & QPainter::Antialiasing ) ) { p->setRenderHint( QPainter::Antialiasing, false ); p->drawRect( points.boundingRect() ); diff --git a/tests/src/core/testqgsatlascomposition.cpp b/tests/src/core/testqgsatlascomposition.cpp index 53eb324710a..594c8f9914f 100644 --- a/tests/src/core/testqgsatlascomposition.cpp +++ b/tests/src/core/testqgsatlascomposition.cpp @@ -81,7 +81,7 @@ void TestQgsAtlasComposition::initTestCase() "ogr" ); QgsVectorSimplifyMethod simplifyMethod; - simplifyMethod.setSimplifyHints( QgsVectorLayer::NoSimplification ); + simplifyMethod.setSimplifyHints( QgsVectorSimplifyMethod::NoSimplification ); mVectorLayer->setSimplifyMethod( simplifyMethod ); QgsMapLayerRegistry::instance()->addMapLayers( QList() << mVectorLayer ); diff --git a/tests/src/core/testqgsblendmodes.cpp b/tests/src/core/testqgsblendmodes.cpp index de0de582255..d6a655f1844 100644 --- a/tests/src/core/testqgsblendmodes.cpp +++ b/tests/src/core/testqgsblendmodes.cpp @@ -89,7 +89,7 @@ void TestQgsBlendModes::initTestCase() myPolyFileInfo.completeBaseName(), "ogr" ); QgsVectorSimplifyMethod simplifyMethod; - simplifyMethod.setSimplifyHints( QgsVectorLayer::NoSimplification ); + simplifyMethod.setSimplifyHints( QgsVectorSimplifyMethod::NoSimplification ); mpPolysLayer->setSimplifyMethod( simplifyMethod ); QgsMapLayerRegistry::instance()->addMapLayers( diff --git a/tests/src/core/testqgsgradients.cpp b/tests/src/core/testqgsgradients.cpp index 1e56b564fa4..926667987f5 100644 --- a/tests/src/core/testqgsgradients.cpp +++ b/tests/src/core/testqgsgradients.cpp @@ -96,7 +96,7 @@ void TestQgsGradients::initTestCase() myPolyFileInfo.completeBaseName(), "ogr" ); QgsVectorSimplifyMethod simplifyMethod; - simplifyMethod.setSimplifyHints( QgsVectorLayer::NoSimplification ); + simplifyMethod.setSimplifyHints( QgsVectorSimplifyMethod::NoSimplification ); mpPolysLayer->setSimplifyMethod( simplifyMethod ); // Register the layer with the registry @@ -250,7 +250,7 @@ void TestQgsGradients::gradientSymbolFromQml() mReport += "

Gradient symbol from QML test

\n"; QVERIFY( setQml( "gradient" ) ); QgsVectorSimplifyMethod simplifyMethod; - simplifyMethod.setSimplifyHints( QgsVectorLayer::NoSimplification ); + simplifyMethod.setSimplifyHints( QgsVectorSimplifyMethod::NoSimplification ); mpPolysLayer->setSimplifyMethod( simplifyMethod ); QVERIFY( imageCheck( "gradient_from_qml" ) ); }