Add SIP bindings

This commit is contained in:
alisovenko 2017-01-11 09:51:38 +03:00
parent 33955c88ce
commit f8d70619db
5 changed files with 26 additions and 5 deletions

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -60,11 +60,6 @@ class QgsMapToolCapture : public QgsMapToolAdvancedDigitizing
*/
void deleteTempRubberBand();
/**
* Return defalut Z value
*/
double defaultZValue();
private slots:
void validationFinished();
void currentLayerChanged( QgsMapLayer *layer );

View File

@ -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