Skip to content

Commit

Permalink
Update sip bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Apr 29, 2016
1 parent caad989 commit bd6d22d
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 7 deletions.
6 changes: 6 additions & 0 deletions python/core/geometry/qgsabstractgeometryv2.sip
Expand Up @@ -306,6 +306,12 @@ class QgsAbstractGeometryV2
*/ */
virtual QgsAbstractGeometryV2* segmentize() const /Factory/; virtual QgsAbstractGeometryV2* segmentize() const /Factory/;


/** Returns the geometry converted to the more generic curve type.
E.g. QgsLineStringV2 -> QgsCompoundCurveV2, QgsPolygonV2 -> QgsCurvePolygonV2,
QgsMultiLineStringV2 -> QgsMultiCurveV2, QgsMultiPolygonV2 -> QgsMultiSurfaceV2
@return the converted geometry. Caller takes ownership*/
virtual QgsAbstractGeometryV2* toCurveType() const /Factory/;

/** Returns approximate angle at a vertex. This is usually the average angle between adjacent /** Returns approximate angle at a vertex. This is usually the average angle between adjacent
* segments, and can be pictured as the orientation of a line following the curvature of the * segments, and can be pictured as the orientation of a line following the curvature of the
* geometry at the specified vertex. * geometry at the specified vertex.
Expand Down
4 changes: 4 additions & 0 deletions python/core/geometry/qgslinestringv2.sip
Expand Up @@ -106,6 +106,10 @@ class QgsLineStringV2: public QgsCurveV2
*/ */
QPolygonF asQPolygonF() const; QPolygonF asQPolygonF() const;


/** Returns the geometry converted to the more generic curve type QgsCompoundCurveV2
@return the converted geometry. Caller takes ownership*/
QgsAbstractGeometryV2* toCurveType() const /Factory/;

//reimplemented methods //reimplemented methods


virtual QString geometryType() const; virtual QString geometryType() const;
Expand Down
4 changes: 4 additions & 0 deletions python/core/geometry/qgsmultilinestringv2.sip
Expand Up @@ -20,6 +20,10 @@ class QgsMultiLineStringV2: public QgsMultiCurveV2
/** Adds a geometry and takes ownership. Returns true in case of success*/ /** Adds a geometry and takes ownership. Returns true in case of success*/
virtual bool addGeometry( QgsAbstractGeometryV2* g ); virtual bool addGeometry( QgsAbstractGeometryV2* g );


/** Returns the geometry converted to the more generic curve type QgsMultiCurveV2
@return the converted geometry. Caller takes ownership*/
QgsAbstractGeometryV2* toCurveType() const /Factory/;

protected: protected:


virtual bool wktOmitChildType() const; virtual bool wktOmitChildType() const;
Expand Down
4 changes: 4 additions & 0 deletions python/core/geometry/qgsmultipolygonv2.sip
Expand Up @@ -20,6 +20,10 @@ class QgsMultiPolygonV2: public QgsMultiSurfaceV2
/** Adds a geometry and takes ownership. Returns true in case of success*/ /** Adds a geometry and takes ownership. Returns true in case of success*/
virtual bool addGeometry( QgsAbstractGeometryV2* g ); virtual bool addGeometry( QgsAbstractGeometryV2* g );


/** Returns the geometry converted to the more generic curve type QgsMultiSurfaceV2
@return the converted geometry. Caller takes ownership*/
QgsAbstractGeometryV2* toCurveType() const /Factory/;

protected: protected:


virtual bool wktOmitChildType() const; virtual bool wktOmitChildType() const;
Expand Down
4 changes: 4 additions & 0 deletions python/core/geometry/qgspolygonv2.sip
Expand Up @@ -26,6 +26,10 @@ class QgsPolygonV2: public QgsCurvePolygonV2


QgsPolygonV2* surfaceToPolygon() const; QgsPolygonV2* surfaceToPolygon() const;


/** Returns the geometry converted to the more generic curve type QgsCurvePolygonV2
@return the converted geometry. Caller takes ownership*/
QgsAbstractGeometryV2* toCurveType() const /Factory/;

void addInteriorRing( QgsCurveV2* ring /Transfer/ ); void addInteriorRing( QgsCurveV2* ring /Transfer/ );
//overridden to handle LineString25D rings //overridden to handle LineString25D rings
virtual void setExteriorRing( QgsCurveV2* ring /Transfer/ ); virtual void setExteriorRing( QgsCurveV2* ring /Transfer/ );
Expand Down
3 changes: 2 additions & 1 deletion src/core/geometry/qgsabstractgeometryv2.h
Expand Up @@ -294,7 +294,8 @@ class CORE_EXPORT QgsAbstractGeometryV2


/** Returns the geometry converted to the more generic curve type. /** Returns the geometry converted to the more generic curve type.
E.g. QgsLineStringV2 -> QgsCompoundCurveV2, QgsPolygonV2 -> QgsCurvePolygonV2, E.g. QgsLineStringV2 -> QgsCompoundCurveV2, QgsPolygonV2 -> QgsCurvePolygonV2,
QgsMultiLineStringV2 -> QgsMultiCurveV2, QgsMultiPolygonV2 -> QgsMultiSurfaceV2*/ QgsMultiLineStringV2 -> QgsMultiCurveV2, QgsMultiPolygonV2 -> QgsMultiSurfaceV2
@return the converted geometry. Caller takes ownership*/
virtual QgsAbstractGeometryV2* toCurveType() const { return 0; } virtual QgsAbstractGeometryV2* toCurveType() const { return 0; }


/** Returns approximate angle at a vertex. This is usually the average angle between adjacent /** Returns approximate angle at a vertex. This is usually the average angle between adjacent
Expand Down
3 changes: 2 additions & 1 deletion src/core/geometry/qgslinestringv2.h
Expand Up @@ -132,7 +132,8 @@ class CORE_EXPORT QgsLineStringV2: public QgsCurveV2
*/ */
QPolygonF asQPolygonF() const; QPolygonF asQPolygonF() const;


/** Returns the geometry converted to QgsCompoundCurveV2*/ /** Returns the geometry converted to the more generic curve type QgsCompoundCurveV2
@return the converted geometry. Caller takes ownership*/
QgsAbstractGeometryV2* toCurveType() const override; QgsAbstractGeometryV2* toCurveType() const override;


//reimplemented methods //reimplemented methods
Expand Down
3 changes: 2 additions & 1 deletion src/core/geometry/qgsmultilinestringv2.h
Expand Up @@ -42,7 +42,8 @@ class CORE_EXPORT QgsMultiLineStringV2: public QgsMultiCurveV2
/** Adds a geometry and takes ownership. Returns true in case of success*/ /** Adds a geometry and takes ownership. Returns true in case of success*/
virtual bool addGeometry( QgsAbstractGeometryV2* g ) override; virtual bool addGeometry( QgsAbstractGeometryV2* g ) override;


/** Returns the geometry converted to QgsMultiCurveV2*/ /** Returns the geometry converted to the more generic curve type QgsMultiCurveV2
@return the converted geometry. Caller takes ownership*/
QgsAbstractGeometryV2* toCurveType() const override; QgsAbstractGeometryV2* toCurveType() const override;


protected: protected:
Expand Down
3 changes: 2 additions & 1 deletion src/core/geometry/qgsmultipolygonv2.h
Expand Up @@ -43,7 +43,8 @@ class CORE_EXPORT QgsMultiPolygonV2: public QgsMultiSurfaceV2
/** Adds a geometry and takes ownership. Returns true in case of success*/ /** Adds a geometry and takes ownership. Returns true in case of success*/
virtual bool addGeometry( QgsAbstractGeometryV2* g ) override; virtual bool addGeometry( QgsAbstractGeometryV2* g ) override;


/** Returns the geometry converted to QgsMultiSurfaceV2*/ /** Returns the geometry converted to the more generic curve type QgsMultiSurfaceV2
@return the converted geometry. Caller takes ownership*/
QgsAbstractGeometryV2* toCurveType() const override; QgsAbstractGeometryV2* toCurveType() const override;


protected: protected:
Expand Down
3 changes: 2 additions & 1 deletion src/core/geometry/qgspolygonv2.h
Expand Up @@ -50,7 +50,8 @@ class CORE_EXPORT QgsPolygonV2: public QgsCurvePolygonV2


QgsPolygonV2* surfaceToPolygon() const override; QgsPolygonV2* surfaceToPolygon() const override;


/** Returns the geometry converted to QgsCurvePolygonV2*/ /** Returns the geometry converted to the more generic curve type QgsCurvePolygonV2
@return the converted geometry. Caller takes ownership*/
QgsAbstractGeometryV2* toCurveType() const override; QgsAbstractGeometryV2* toCurveType() const override;


void addInteriorRing( QgsCurveV2* ring ) override; void addInteriorRing( QgsCurveV2* ring ) override;
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsvectorlayereditbuffer.h
Expand Up @@ -156,8 +156,6 @@ class CORE_EXPORT QgsVectorLayerEditBuffer : public QObject


void updateLayerFields(); void updateLayerFields();


QgsAbstractGeometryV2* outputGeometry( QgsAbstractGeometryV2* geom ) const;

protected: protected:
QgsVectorLayer* L; QgsVectorLayer* L;
friend class QgsVectorLayer; friend class QgsVectorLayer;
Expand Down Expand Up @@ -191,6 +189,8 @@ class CORE_EXPORT QgsVectorLayerEditBuffer : public QObject
/** Changed geometries which are not commited. */ /** Changed geometries which are not commited. */
QgsGeometryMap mChangedGeometries; QgsGeometryMap mChangedGeometries;


private:
QgsAbstractGeometryV2* outputGeometry( QgsAbstractGeometryV2* geom ) const;
}; };


#endif // QGSVECTORLAYEREDITBUFFER_H #endif // QGSVECTORLAYEREDITBUFFER_H

0 comments on commit bd6d22d

Please sign in to comment.