Skip to content

Commit

Permalink
Add SIP bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
alisovenko committed Jan 11, 2017
1 parent 33955c8 commit f8d7061
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 5 deletions.
13 changes: 13 additions & 0 deletions python/core/geometry/qgsgeometry.sip
Expand Up @@ -215,6 +215,19 @@ class QgsGeometry
*/
bool insertVertex( double x, double y, int beforeVertex );

/** Insert a new vertex before the given vertex index,
* ring and item (first number is index 0)
* If the requested vertex number (beforeVertex.back()) is greater
* than the last actual vertex on the requested ring and item,
* it is assumed that the vertex is to be appended instead of inserted.
* Returns false if atVertex does not correspond to a valid vertex
* on this geometry (including if this geometry is a Point).
* It is up to the caller to distinguish between
* these error conditions. (Or maybe we add another method to this
* object to help make the distinction?)
*/
bool insertVertex( const QgsPointV2& point, int beforeVertex );

/** Moves the vertex at the given position number
* and item (first number is index 0)
* to the given coordinates.
Expand Down
6 changes: 6 additions & 0 deletions python/core/qgsvectorlayer.sip
Expand Up @@ -821,6 +821,12 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator
*/
bool insertVertex( double x, double y, QgsFeatureId atFeatureId, int beforeVertex );

/** Insert a new vertex before the given vertex number,
* in the given ring, item (first number is index 0), and feature
* Not meaningful for Point geometries
*/
bool insertVertex( const QgsPointV2& point, QgsFeatureId atFeatureId, int beforeVertex );

/** Moves the vertex at the given position number,
* ring and item (first number is index 0), and feature
* to the given coordinates
Expand Down
6 changes: 6 additions & 0 deletions python/core/qgsvectorlayereditutils.sip
Expand Up @@ -15,6 +15,12 @@ class QgsVectorLayerEditUtils
*/
bool insertVertex( double x, double y, QgsFeatureId atFeatureId, int beforeVertex );

/** Insert a new vertex before the given vertex number,
* in the given ring, item (first number is index 0), and feature
* Not meaningful for Point geometries
*/
bool insertVertex( const QgsPointV2& point, QgsFeatureId atFeatureId, int beforeVertex );

/** Moves the vertex at the given position number,
* ring and item (first number is index 0), and feature
* to the given coordinates
Expand Down
5 changes: 0 additions & 5 deletions python/gui/qgsmaptoolcapture.sip
Expand Up @@ -60,11 +60,6 @@ class QgsMapToolCapture : public QgsMapToolAdvancedDigitizing
*/
void deleteTempRubberBand();

/**
* Return defalut Z value
*/
double defaultZValue();

private slots:
void validationFinished();
void currentLayerChanged( QgsMapLayer *layer );
Expand Down
1 change: 1 addition & 0 deletions python/gui/qgsmaptooledit.sip
Expand Up @@ -27,6 +27,7 @@ class QgsMapToolEdit: QgsMapTool

virtual Flags flags() const;

double defaultZValue() const;
protected:

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

0 comments on commit f8d7061

Please sign in to comment.