Skip to content
Permalink
Browse files

Merge pull request #8708 from 3nids/sipify_sip_out

 [sipify] handles SIP_OUT arguments
  • Loading branch information
3nids committed Dec 19, 2018
2 parents 514c5e2 + c20b5b2 commit 6bb0720bb7cf64a8281c8fbb645530a6f8e9bde6
Showing with 115 additions and 100 deletions.
  1. +1 −1 python/analysis/auto_generated/interpolation/qgsinterpolator.sip.in
  2. +1 −1 python/core/auto_generated/expression/qgsexpression.sip.in
  3. +2 −5 python/core/auto_generated/geometry/qgsabstractgeometry.sip.in
  4. +1 −1 python/core/auto_generated/geometry/qgscurve.sip.in
  5. +4 −6 python/core/auto_generated/geometry/qgsgeometry.sip.in
  6. +4 −5 python/core/auto_generated/geometry/qgsgeometryutils.sip.in
  7. +1 −1 python/core/auto_generated/qgsdistancearea.sip.in
  8. +7 −13 python/core/auto_generated/qgsmaplayer.sip.in
  9. +0 −6 python/core/auto_generated/qgsmaplayerstore.sip.in
  10. +0 −5 python/core/auto_generated/qgspallabeling.sip.in
  11. +0 −6 python/core/auto_generated/qgsproject.sip.in
  12. +6 −6 python/core/auto_generated/qgsproperty.sip.in
  13. +5 −5 python/core/auto_generated/qgspropertycollection.sip.in
  14. +3 −9 python/core/auto_generated/qgspropertytransformer.sip.in
  15. +1 −1 python/core/auto_generated/qgstransaction.sip.in
  16. +5 −7 python/core/auto_generated/qgsunittypes.sip.in
  17. +0 −1 python/core/auto_generated/qgsvectordataprovider.sip.in
  18. +2 −3 python/core/auto_generated/qgsvectorlayer.sip.in
  19. +0 −1 python/core/auto_generated/qgsvectorlayerjoinbuffer.sip.in
  20. +2 −2 python/core/auto_generated/qgsvectorlayertools.sip.in
  21. +0 −1 python/core/auto_generated/qgsziputils.sip.in
  22. +2 −2 python/core/auto_generated/raster/qgsrastershader.sip.in
  23. +2 −2 python/core/auto_generated/raster/qgsrastershaderfunction.sip.in
  24. +1 −1 python/gui/auto_generated/editorwidgets/core/qgseditorwidgetautoconf.sip.in
  25. +0 −2 python/gui/auto_generated/editorwidgets/core/qgseditorwidgetregistry.sip.in
  26. +0 −1 python/gui/auto_generated/qgsattributeformwidget.sip.in
  27. +0 −1 python/gui/auto_generated/qgsexpressionlineedit.sip.in
  28. +1 −1 python/server/auto_generated/qgsserverexception.sip.in
  29. +60 −0 scripts/sipify.pl
  30. +4 −4 src/core/geometry/qgsgeometry.h
@@ -82,10 +82,10 @@ Calculates interpolation value for map coordinates x, y

:param x: x-coordinate (in map units)
:param y: y-coordinate (in map units)
:param result: out: interpolation result
:param feedback: optional feedback object for progress and cancelation support

:return: 0 in case of success*
result: out: interpolation result
%End


@@ -249,9 +249,9 @@ Tests whether a string is a valid expression.

:param text: string to test
:param context: optional expression context
:param errorMessage: will be filled with any error message from the validation

:return: true if string is a valid expression
errorMessage: will be filled with any error message from the validation

.. versionadded:: 2.12
%End
@@ -306,9 +306,9 @@ Returns next vertex id and coordinates

:param id: initial value should be the starting vertex id. The next vertex id will be stored
in this variable if found.
:param vertex: container for found node

:return: false if at end
vertex: container for found node
%End

virtual void adjacentVertices( QgsVertexId vertex, QgsVertexId &previousVertex /Out/, QgsVertexId &nextVertex /Out/ ) const = 0;
@@ -344,13 +344,10 @@ Searches for the closest segment of the geometry to a given point.
:param pt: specifies the point to find closest segment to
:param segmentPt: storage for the closest point within the geometry
:param vertexAfter: storage for the ID of the vertex at the end of the closest segment
:param leftOf: indicates whether the point lies on the left side of the geometry (-1 if point is to the left
of the geometry, +1 if the point is to the right of the geometry, or 0 for cases where left/right could not
be determined, e.g. point exactly on a line)
false if point is to right of segment)
:param epsilon: epsilon for segment snapping

:return: squared distance to closest segment or negative value on error
leftOf: indicates whether the point lies on the left side of the geometry (-1 if point is to the left of the geometry, +1 if the point is to the right of the geometry, or 0 for cases where left/right could not be determined, e.g. point exactly on a line) false if point is to right of segment)
%End


@@ -134,10 +134,10 @@ Sums up the area of the curve by iterating over the vertices (shoelace formula).
Returns the point and vertex id of a point within the curve.

:param node: node number, where the first node is 0
:param point: will be set to point at corresponding node in the curve
:param type: will be set to the vertex type of the node

:return: true if node exists within the curve
point: will be set to point at corresponding node in the curve
%End

virtual QgsCurve *reversed() const = 0 /Factory/;
@@ -632,24 +632,24 @@ Returns the shortest line joining this geometry to another geometry.
Searches for the closest vertex in this geometry to the given point.

:param point: Specifiest the point for search
:param atVertex: Receives index of the closest vertex

:return: The squared Cartesian distance is also returned in sqrDist, negative number on error
atVertex: Receives index of the closest vertex
%End

double closestSegmentWithContext( const QgsPointXY &point, QgsPointXY &minDistPoint /Out/, int &afterVertex /Out/, int *leftOf /Out/ = 0, double epsilon = DEFAULT_SEGMENT_EPSILON ) const;
%Docstring
Searches for the closest segment of geometry to the given point

:param point: Specifies the point for search
:param minDistPoint: Receives the nearest point on the segment
:param afterVertex: Receives index of the vertex after the closest segment. The vertex
before the closest segment is always afterVertex - 1
:param leftOf: Out: Returns if the point lies on the left of left side of the geometry ( < 0 means left, > 0 means right, 0 indicates
that the test was unsuccessful, e.g. for a point exactly on the line)
:param epsilon: epsilon for segment snapping

:return: The squared Cartesian distance is also returned in sqrDist, negative number on error
minDistPoint: Receives the nearest point on the segment
%End

OperationResult addRing( const QVector<QgsPointXY> &ring );
@@ -818,7 +818,6 @@ width and height of the rotated bounding box will also be returned.
%Docstring
Returns the minimal enclosing circle for the geometry.

:param center: Center of the minimal enclosing circle returneds
:param radius: Radius of the minimal enclosing circle returned
:param segments: Number of segments used to segment geometry. :py:func:`QgsEllipse.toPolygon`

@@ -1612,14 +1611,13 @@ empty if none of the child geometries match the desired type.
%Docstring
Modifies geometry to avoid intersections with the layers specified in project properties

:param avoidIntersectionsLayers: list of layers to check for intersections

:return: 0 in case of success,
1 if geometry is not of polygon type,
2 if avoid intersection would change the geometry type,
3 other error during intersection removal

:param avoidIntersectionsLayers: list of layers to check for intersections
:param ignoreFeatures: possibility to give a list of features where intersections should be ignored (not available in Python bindings)

.. versionadded:: 1.5
%End

@@ -66,9 +66,9 @@ Retrieves the vertices which are before and after the interpolated point at a sp
:param geometry: line or polygon geometry
:param distance: distance to traverse along geometry
:param previousVertex: will be set to previous vertex ID
:param nextVertex: will be set to next vertex ID

:return: true if vertices were successfully retrieved
nextVertex: will be set to next vertex ID

.. note::

@@ -97,9 +97,9 @@ supported and is retrieved from the first 3D point amongst ``p1`` and
:param v1: Direction vector of the first line
:param p2: Point on the second line
:param v2: Direction vector of the second line
:param intersection: Output parameter, the intersection point

:return: Whether the lines intersect
intersection: Output parameter, the intersection point
%End

static bool segmentIntersection( const QgsPoint &p1, const QgsPoint &p2, const QgsPoint &q1, const QgsPoint &q2, QgsPoint &intersectionPoint /Out/, bool &isIntersection /Out/, double tolerance = 1e-8, bool acceptImproperIntersection = false );
@@ -110,12 +110,12 @@ Compute the intersection between two segments
:param p2: First segment end point
:param q1: Second segment start point
:param q2: Second segment end point
:param intersectionPoint: Output parameter, the intersection point
:param isIntersection: Output parameter, return true if an intersection is found
:param tolerance: The tolerance to use
:param acceptImproperIntersection: By default, this method returns true only if segments have proper intersection. If set true, returns also true if segments have improper intersection (end of one segment on other segment ; continuous segments).

:return: Whether the segments intersect
intersectionPoint: Output parameter, the intersection point
* Example:
.. code-block:: python

@@ -515,7 +515,6 @@ Returns the coefficients (a, b, c for equation "ax + by + c = 0") of a line defi

:param pt1: first point.
:param pt2: second point.
:param a: Output parameter, a coefficient of the equation.
:param b: Output parameter, b coefficient of the equation.
:param c: Output parameter, c coefficient of the equation.

@@ -574,9 +573,9 @@ An algorithm to calculate an (approximate) intersection of two lines in 3D.
:param La2: is the second point on the first line,
:param Lb1: is the first point on the second line,
:param Lb2: is the second point on the second line,
:param intersection: is the result intersection, of it can be found.

:return: true if the intersection can be found, false - otherwise.
intersection: is the result intersection, of it can be found.
example:
.. code-block:: python

@@ -221,9 +221,9 @@ otherwise QgsPoint.project() will be called after QgsUnitTypes.fromUnitToUnitFac
:param p1: start point [can be Cartesian or Geographic]
:param distance: must be in meters
:param azimuth: - azimuth in radians, clockwise from North
:param projectedPoint: calculated projected point

:return: distance in mapUnits
projectedPoint: calculated projected point

.. seealso:: :py:func:`sourceCrs`

@@ -650,10 +650,9 @@ Save the current metadata of this layer as the default metadata
(either as a .qmd file on disk or as a
record in the users style table in their personal qgis.db)

:param resultFlag: a reference to a flag that will be set to false if
we did not manage to save the default metadata.

:return: a QString with any status messages
resultFlag: a reference to a flag that will be set to false if we did not manage to save the default metadata.

.. versionadded:: 3.0
%End
@@ -688,10 +687,9 @@ record in the users style table in their personal qgis.db)
is a file and load that, if that fails the qgis.db metadata
table will be consulted to see if there is a metadata who's
key matches the URI.
:param resultFlag: a reference to a flag that will be set to false if
we did not manage to load the default metadata.

:return: a QString with any status messages
resultFlag: a reference to a flag that will be set to false if we did not manage to load the default metadata.

.. versionadded:: 3.0
%End
@@ -752,10 +750,9 @@ Retrieve the default style for this layer if one
exists (either as a .qml file on disk or as a
record in the users style table in their personal qgis.db)

:param resultFlag: a reference to a flag that will be set to false if
we did not manage to load the default style.

:return: a QString with any status messages
resultFlag: a reference to a flag that will be set to false if we did not manage to load the default style.

.. seealso:: :py:func:`also`
%End
@@ -771,11 +768,10 @@ record in the users style table in their personal qgis.db)
is a file and load that, if that fails the qgis.db styles
table will be consulted to see if there is a style who's
key matches the URI.
:param resultFlag: a reference to a flag that will be set to false if
we did not manage to load the default style.
:param categories: the style categories to be loaded.

:return: a QString with any status messages
resultFlag: a reference to a flag that will be set to false if we did not manage to load the default style.

.. seealso:: :py:func:`also`
%End
@@ -786,9 +782,9 @@ Retrieve a named style for this layer from a sqlite database.

:param db: path to sqlite database
:param uri: uri for table
:param qml: will be set to QML style content from database

:return: true if style was successfully loaded
qml: will be set to QML style content from database
%End

virtual bool importNamedStyle( QDomDocument &doc, QString &errorMsg /Out/,
@@ -834,10 +830,9 @@ Save the properties of this layer as the default style
(either as a .qml file on disk or as a
record in the users style table in their personal qgis.db)

:param resultFlag: a reference to a flag that will be set to false if
we did not manage to save the default style.

:return: a QString with any status messages
resultFlag: a reference to a flag that will be set to false if we did not manage to save the default style.

.. seealso:: :py:func:`loadNamedStyle`
%End
@@ -853,11 +848,10 @@ record in the users style table in their personal qgis.db)
is a file and save to that, if that fails the qgis.db styles
table will be used to create a style entry who's
key matches the URI.
:param resultFlag: a reference to a flag that will be set to false if
we did not manage to save the default style.
:param categories: the style categories to be saved.

:return: a QString with any status messages
resultFlag: a reference to a flag that will be set to false if we did not manage to save the default style.

.. seealso:: :py:func:`saveDefaultStyle`
%End
@@ -119,9 +119,6 @@ to the store.
The layersAdded() and layerWasAdded() signals will always be emitted.

:param layers: A list of layer which should be added to the store.
:param takeOwnership: Ownership will be transferred to the layer store.
If you specify false here you have take care of deleting
the layers yourself. Not available in Python.

:return: a list of the map layers that were added
successfully. If a layer already exists in the store,
@@ -142,9 +139,6 @@ If you are adding multiple layers at once, you should use
addMapLayers() instead.

:param layer: A layer to add to the store
:param takeOwnership: Ownership will be transferred to the layer store.
If you specify false here you have take care of deleting
the layers yourself. Not available in Python.

:return: None if unable to add layer, otherwise pointer to newly added layer

@@ -398,11 +398,6 @@ Register a feature for labeling.
must have already had the feature and fields sets prior to calling this method.
:param labelFeature: if using :py:class:`QgsLabelingEngine`, this will receive the label feature. Not available
in Python bindings.
:param obstacleGeometry: optional obstacle geometry, if a different geometry to the feature's geometry
should be used as an obstacle for labels (e.g., if the feature has been rendered with an offset point
symbol, the obstacle geometry should represent the bounds of the offset symbol). If not set,
the feature's original geometry will be used as an obstacle for labels. Not available
in Python bindings.
%End

void readXml( QDomElement &elem, const QgsReadWriteContext &context );
@@ -765,9 +765,6 @@ The legendLayersAdded() signal is emitted only if addToLegend is true.
:param addToLegend: If true (by default), the layers will be added to the
legend and to the main canvas. If you have a private
layer you can set this parameter to false to hide it.
:param takeOwnership: Ownership will be transferred to the layer registry.
If you specify false here you have take care of deleting
the layers yourself. Not available in Python.

:return: a list of the map layers that were added
successfully. If a layer or already exists in the registry,
@@ -803,9 +800,6 @@ addMapLayers() instead.
:param addToLegend: If true (by default), the layer will be added to the
legend and to the main canvas. If you have a private
layer you can set this parameter to false to hide it.
:param takeOwnership: Ownership will be transferred to the layer registry.
If you specify false here you have take care of deleting
the layer yourself. Not available in Python.

:return: None if unable to add layer, otherwise pointer to newly added layer

@@ -321,9 +321,9 @@ Calculates the current value of the property, including any transforms which are
in the expression context can be used to alter the calculated value for the property, so that a property
is able to respond to the current environment, layers and features within QGIS.
:param defaultValue: default value to return if the property is not active or cannot be calculated
:param ok: if specified, will be set to true if conversion was successful

:return: calculated value for property
ok: if specified, will be set to true if conversion was successful

.. seealso:: :py:func:`valueAsString`

@@ -342,9 +342,9 @@ Calculates the current value of the property and interprets it as a string.

:param context: QgsExpressionContext to evaluate the property for.
:param defaultString: default string to return if the property cannot be calculated as a string
:param ok: if specified, will be set to true if conversion was successful

:return: value parsed to string
ok: if specified, will be set to true if conversion was successful

.. seealso:: :py:func:`value`

@@ -363,9 +363,9 @@ Calculates the current value of the property and interprets it as a color.

:param context: QgsExpressionContext to evaluate the property for.
:param defaultColor: default color to return if the property cannot be calculated as a color
:param ok: if specified, will be set to true if conversion was successful

:return: value parsed to color
ok: if specified, will be set to true if conversion was successful

.. seealso:: :py:func:`value`

@@ -384,9 +384,9 @@ Calculates the current value of the property and interprets it as a double.

:param context: QgsExpressionContext to evaluate the property for.
:param defaultValue: default double to return if the property cannot be calculated as a double
:param ok: if specified, will be set to true if conversion was successful

:return: value parsed to double
ok: if specified, will be set to true if conversion was successful

.. seealso:: :py:func:`value`

@@ -405,9 +405,9 @@ Calculates the current value of the property and interprets it as an integer.

:param context: QgsExpressionContext to evaluate the property for.
:param defaultValue: default integer to return if the property cannot be calculated as an integer
:param ok: if specified, will be set to true if conversion was successful

:return: value parsed to integer
ok: if specified, will be set to true if conversion was successful

.. seealso:: :py:func:`value`

@@ -426,9 +426,9 @@ Calculates the current value of the property and interprets it as an boolean.

:param context: QgsExpressionContext to evaluate the property for.
:param defaultValue: default boolean to return if the property cannot be calculated as an boolean
:param ok: if specified, will be set to true if conversion was successful

:return: value parsed to boolean
ok: if specified, will be set to true if conversion was successful

.. seealso:: :py:func:`value`

0 comments on commit 6bb0720

Please sign in to comment.
You can’t perform that action at this time.