From c590e1eceec94853ddf9d89cd36a5fbf0ea375da Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Mon, 22 Jun 2015 21:57:01 +1000 Subject: [PATCH] Hide unimplemented GeometryV2 clip methods --- python/core/geometry/qgsabstractgeometryv2.sip | 2 +- python/core/geometry/qgscircularstringv2.sip | 2 +- python/core/geometry/qgsgeometrycollectionv2.sip | 2 +- src/core/geometry/qgsabstractgeometryv2.cpp | 2 ++ src/core/geometry/qgsabstractgeometryv2.h | 2 ++ src/core/geometry/qgscircularstringv2.cpp | 2 ++ src/core/geometry/qgscircularstringv2.h | 2 ++ src/core/geometry/qgsgeometrycollectionv2.cpp | 2 ++ src/core/geometry/qgsgeometrycollectionv2.h | 2 ++ 9 files changed, 15 insertions(+), 3 deletions(-) diff --git a/python/core/geometry/qgsabstractgeometryv2.sip b/python/core/geometry/qgsabstractgeometryv2.sip index e716abc9319..6b49351d28c 100644 --- a/python/core/geometry/qgsabstractgeometryv2.sip +++ b/python/core/geometry/qgsabstractgeometryv2.sip @@ -92,7 +92,7 @@ class QgsAbstractGeometryV2 //render pipeline virtual void transform( const QgsCoordinateTransform& ct ) = 0; virtual void transform( const QTransform& t ) = 0; - virtual void clip( const QgsRectangle& rect ); + //virtual void clip( const QgsRectangle& rect ); virtual void draw( QPainter& p ) const = 0; /**Returns next vertex id and coordinates diff --git a/python/core/geometry/qgscircularstringv2.sip b/python/core/geometry/qgscircularstringv2.sip index 9d0dadd1411..48d312dd551 100644 --- a/python/core/geometry/qgscircularstringv2.sip +++ b/python/core/geometry/qgscircularstringv2.sip @@ -40,7 +40,7 @@ class QgsCircularStringV2: public QgsCurveV2 void draw( QPainter& p ) const; void transform( const QgsCoordinateTransform& ct ); void transform( const QTransform& t ); - void clip( const QgsRectangle& rect ); + //void clip( const QgsRectangle& rect ); void addToPainterPath( QPainterPath& path ) const; void drawAsPolygon( QPainter& p ) const; diff --git a/python/core/geometry/qgsgeometrycollectionv2.sip b/python/core/geometry/qgsgeometrycollectionv2.sip index 2dcdaf63c9a..ab9289e6009 100644 --- a/python/core/geometry/qgsgeometrycollectionv2.sip +++ b/python/core/geometry/qgsgeometrycollectionv2.sip @@ -25,7 +25,7 @@ class QgsGeometryCollectionV2: public QgsAbstractGeometryV2 virtual void transform( const QgsCoordinateTransform& ct ); void transform( const QTransform& t ); - virtual void clip( const QgsRectangle& rect ); + //virtual void clip( const QgsRectangle& rect ); virtual void draw( QPainter& p ) const; bool fromWkb( const unsigned char * wkb ); diff --git a/src/core/geometry/qgsabstractgeometryv2.cpp b/src/core/geometry/qgsabstractgeometryv2.cpp index 829a3cfce1b..c5fb6de51ed 100644 --- a/src/core/geometry/qgsabstractgeometryv2.cpp +++ b/src/core/geometry/qgsabstractgeometryv2.cpp @@ -63,6 +63,7 @@ bool QgsAbstractGeometryV2::isMeasure() const return ( mWkbType >= 2001 && mWkbType <= 3012 ); } +#if 0 void QgsAbstractGeometryV2::clip( const QgsRectangle& rect ) { // TODO @@ -71,6 +72,7 @@ void QgsAbstractGeometryV2::clip( const QgsRectangle& rect ) // Don't insert Q_UNUSED, so we have a warning that reminds us of this TODO } +#endif void QgsAbstractGeometryV2::setZMTypeFromSubGeometry( const QgsAbstractGeometryV2* subgeom, QgsWKBTypes::Type baseGeomType ) { diff --git a/src/core/geometry/qgsabstractgeometryv2.h b/src/core/geometry/qgsabstractgeometryv2.h index 9d0790e8d5d..1cbc423d664 100644 --- a/src/core/geometry/qgsabstractgeometryv2.h +++ b/src/core/geometry/qgsabstractgeometryv2.h @@ -223,7 +223,9 @@ class CORE_EXPORT QgsAbstractGeometryV2 */ virtual void transform( const QTransform& t ) = 0; +#if 0 virtual void clip( const QgsRectangle& rect ); //todo +#endif /** Draws the geometry using the specified QPainter. * @param p destination QPainter diff --git a/src/core/geometry/qgscircularstringv2.cpp b/src/core/geometry/qgscircularstringv2.cpp index fbc5ea7ff6c..963e9a3ec9f 100644 --- a/src/core/geometry/qgscircularstringv2.cpp +++ b/src/core/geometry/qgscircularstringv2.cpp @@ -607,10 +607,12 @@ void QgsCircularStringV2::transform( const QTransform& t ) } } +#if 0 void QgsCircularStringV2::clip( const QgsRectangle& rect ) { //todo... } +#endif void QgsCircularStringV2::addToPainterPath( QPainterPath& path ) const { diff --git a/src/core/geometry/qgscircularstringv2.h b/src/core/geometry/qgscircularstringv2.h index b73fbb55606..9dfee40c2fb 100644 --- a/src/core/geometry/qgscircularstringv2.h +++ b/src/core/geometry/qgscircularstringv2.h @@ -69,7 +69,9 @@ class CORE_EXPORT QgsCircularStringV2: public QgsCurveV2 void draw( QPainter& p ) const override; void transform( const QgsCoordinateTransform& ct ) override; void transform( const QTransform& t ) override; +#if 0 void clip( const QgsRectangle& rect ) override; +#endif void addToPainterPath( QPainterPath& path ) const override; void drawAsPolygon( QPainter& p ) const override; diff --git a/src/core/geometry/qgsgeometrycollectionv2.cpp b/src/core/geometry/qgsgeometrycollectionv2.cpp index f9e15d75a7f..e600ab1a2b4 100644 --- a/src/core/geometry/qgsgeometrycollectionv2.cpp +++ b/src/core/geometry/qgsgeometrycollectionv2.cpp @@ -148,6 +148,7 @@ void QgsGeometryCollectionV2::transform( const QTransform& t ) } } +#if 0 void QgsGeometryCollectionV2::clip( const QgsRectangle& rect ) { QVector< QgsAbstractGeometryV2* >::iterator it = mGeometries.begin(); @@ -156,6 +157,7 @@ void QgsGeometryCollectionV2::clip( const QgsRectangle& rect ) ( *it )->clip( rect ); } } +#endif void QgsGeometryCollectionV2::draw( QPainter& p ) const { diff --git a/src/core/geometry/qgsgeometrycollectionv2.h b/src/core/geometry/qgsgeometrycollectionv2.h index 5a2c3e6b290..d25f4463684 100644 --- a/src/core/geometry/qgsgeometrycollectionv2.h +++ b/src/core/geometry/qgsgeometrycollectionv2.h @@ -64,7 +64,9 @@ class CORE_EXPORT QgsGeometryCollectionV2: public QgsAbstractGeometryV2 virtual void transform( const QgsCoordinateTransform& ct ) override; void transform( const QTransform& t ) override; +#if 0 virtual void clip( const QgsRectangle& rect ) override; +#endif virtual void draw( QPainter& p ) const override; bool fromWkb( const unsigned char * wkb ) override;