Skip to content

Commit

Permalink
Hide unimplemented GeometryV2 clip methods
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jun 22, 2015
1 parent 5f49335 commit c590e1e
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/core/geometry/qgsabstractgeometryv2.sip
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion python/core/geometry/qgscircularstringv2.sip
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion python/core/geometry/qgsgeometrycollectionv2.sip
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
2 changes: 2 additions & 0 deletions src/core/geometry/qgsabstractgeometryv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ bool QgsAbstractGeometryV2::isMeasure() const
return ( mWkbType >= 2001 && mWkbType <= 3012 );
}

#if 0
void QgsAbstractGeometryV2::clip( const QgsRectangle& rect )
{
// TODO
Expand All @@ -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 )
{
Expand Down
2 changes: 2 additions & 0 deletions src/core/geometry/qgsabstractgeometryv2.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/core/geometry/qgscircularstringv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 2 additions & 0 deletions src/core/geometry/qgscircularstringv2.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 2 additions & 0 deletions src/core/geometry/qgsgeometrycollectionv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ void QgsGeometryCollectionV2::transform( const QTransform& t )
}
}

#if 0
void QgsGeometryCollectionV2::clip( const QgsRectangle& rect )
{
QVector< QgsAbstractGeometryV2* >::iterator it = mGeometries.begin();
Expand All @@ -156,6 +157,7 @@ void QgsGeometryCollectionV2::clip( const QgsRectangle& rect )
( *it )->clip( rect );
}
}
#endif

void QgsGeometryCollectionV2::draw( QPainter& p ) const
{
Expand Down
2 changes: 2 additions & 0 deletions src/core/geometry/qgsgeometrycollectionv2.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c590e1e

Please sign in to comment.