Skip to content

Commit f8d7061

Browse files
committedJan 11, 2017
Add SIP bindings
1 parent 33955c8 commit f8d7061

File tree

5 files changed

+26
-5
lines changed

5 files changed

+26
-5
lines changed
 

‎python/core/geometry/qgsgeometry.sip

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,19 @@ class QgsGeometry
215215
*/
216216
bool insertVertex( double x, double y, int beforeVertex );
217217

218+
/** Insert a new vertex before the given vertex index,
219+
* ring and item (first number is index 0)
220+
* If the requested vertex number (beforeVertex.back()) is greater
221+
* than the last actual vertex on the requested ring and item,
222+
* it is assumed that the vertex is to be appended instead of inserted.
223+
* Returns false if atVertex does not correspond to a valid vertex
224+
* on this geometry (including if this geometry is a Point).
225+
* It is up to the caller to distinguish between
226+
* these error conditions. (Or maybe we add another method to this
227+
* object to help make the distinction?)
228+
*/
229+
bool insertVertex( const QgsPointV2& point, int beforeVertex );
230+
218231
/** Moves the vertex at the given position number
219232
* and item (first number is index 0)
220233
* to the given coordinates.

‎python/core/qgsvectorlayer.sip

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -821,6 +821,12 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator
821821
*/
822822
bool insertVertex( double x, double y, QgsFeatureId atFeatureId, int beforeVertex );
823823

824+
/** Insert a new vertex before the given vertex number,
825+
* in the given ring, item (first number is index 0), and feature
826+
* Not meaningful for Point geometries
827+
*/
828+
bool insertVertex( const QgsPointV2& point, QgsFeatureId atFeatureId, int beforeVertex );
829+
824830
/** Moves the vertex at the given position number,
825831
* ring and item (first number is index 0), and feature
826832
* to the given coordinates

‎python/core/qgsvectorlayereditutils.sip

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ class QgsVectorLayerEditUtils
1515
*/
1616
bool insertVertex( double x, double y, QgsFeatureId atFeatureId, int beforeVertex );
1717

18+
/** Insert a new vertex before the given vertex number,
19+
* in the given ring, item (first number is index 0), and feature
20+
* Not meaningful for Point geometries
21+
*/
22+
bool insertVertex( const QgsPointV2& point, QgsFeatureId atFeatureId, int beforeVertex );
23+
1824
/** Moves the vertex at the given position number,
1925
* ring and item (first number is index 0), and feature
2026
* to the given coordinates

‎python/gui/qgsmaptoolcapture.sip

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,6 @@ class QgsMapToolCapture : public QgsMapToolAdvancedDigitizing
6060
*/
6161
void deleteTempRubberBand();
6262

63-
/**
64-
* Return defalut Z value
65-
*/
66-
double defaultZValue();
67-
6863
private slots:
6964
void validationFinished();
7065
void currentLayerChanged( QgsMapLayer *layer );

‎python/gui/qgsmaptooledit.sip

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class QgsMapToolEdit: QgsMapTool
2727

2828
virtual Flags flags() const;
2929

30+
double defaultZValue() const;
3031
protected:
3132

3233
/** Creates a rubber band with the color/line width from

0 commit comments

Comments
 (0)
Please sign in to comment.