Skip to content
Permalink
Browse files

Minor improvements to PyQGIS returns for SIP_OUT params

  • Loading branch information
nyalldawson committed Feb 4, 2019
1 parent 4b0f6b7 commit 384d31023315e26db5e895a43505f3c73d88d9d5
Showing with 60 additions and 59 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 −2 python/core/auto_generated/geometry/qgsabstractgeometry.sip.in
  4. +1 −1 python/core/auto_generated/geometry/qgscurve.sip.in
  5. +3 −3 python/core/auto_generated/geometry/qgsgeometry.sip.in
  6. +4 −4 python/core/auto_generated/geometry/qgsgeometryutils.sip.in
  7. +2 −2 python/core/auto_generated/qgsdistancearea.sip.in
  8. +7 −7 python/core/auto_generated/qgsmaplayer.sip.in
  9. +6 −6 python/core/auto_generated/qgsproperty.sip.in
  10. +5 −5 python/core/auto_generated/qgspropertycollection.sip.in
  11. +3 −3 python/core/auto_generated/qgspropertytransformer.sip.in
  12. +1 −1 python/core/auto_generated/qgstransaction.sip.in
  13. +7 −7 python/core/auto_generated/qgsunittypes.sip.in
  14. +2 −2 python/core/auto_generated/qgsvectorlayer.sip.in
  15. +1 −1 python/core/auto_generated/qgsvectorlayerjoinbuffer.sip.in
  16. +2 −2 python/core/auto_generated/qgsvectorlayertools.sip.in
  17. +1 −1 python/core/auto_generated/qgsziputils.sip.in
  18. +1 −1 python/core/auto_generated/raster/qgsrasteriterator.sip.in
  19. +2 −2 python/core/auto_generated/raster/qgsrastershader.sip.in
  20. +2 −2 python/core/auto_generated/raster/qgsrastershaderfunction.sip.in
  21. +1 −1 python/gui/auto_generated/editorwidgets/core/qgseditorwidgetautoconf.sip.in
  22. +1 −1 python/gui/auto_generated/qgsexpressionlineedit.sip.in
  23. +1 −1 python/gui/auto_generated/qgsnewvectorlayerdialog.sip.in
  24. +1 −1 python/server/auto_generated/qgsserverexception.sip.in
  25. +2 −1 scripts/sipify.pl
@@ -85,7 +85,7 @@ Calculates interpolation value for map coordinates x, y
:param feedback: optional feedback object for progress and cancelation support

:return: - 0 in case of success
- result: interpolation result
- result: interpolation result
%End


@@ -251,7 +251,7 @@ Tests whether a string is a valid expression.
:param context: optional expression context

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

.. versionadded:: 2.12
%End
@@ -309,7 +309,7 @@ Returns next vertex id and coordinates
in this variable if found.

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

virtual void adjacentVertices( QgsVertexId vertex, QgsVertexId &previousVertex /Out/, QgsVertexId &nextVertex /Out/ ) const = 0;
@@ -348,7 +348,7 @@ Searches for the closest segment of the geometry to a given point.
: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)
- 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


@@ -137,7 +137,7 @@ Returns the point and vertex id of a point within 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
- point: will be set to point at corresponding node in the curve
%End

virtual QgsCurve *reversed() const = 0 /Factory/;
@@ -634,7 +634,7 @@ Searches for the closest vertex in this geometry to the given point.
:param point: Specifiest the point for search

:return: - The squared Cartesian distance is also returned in sqrDist, negative number on error
- atVertex: Receives index of the closest vertex
- 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;
@@ -649,7 +649,7 @@ Searches for the closest segment of geometry to the given point
: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
- minDistPoint: Receives the nearest point on the segment
%End

OperationResult addRing( const QVector<QgsPointXY> &ring );
@@ -822,7 +822,7 @@ Returns the minimal enclosing circle for the geometry.
:param segments: Number of segments used to segment geometry. :py:func:`QgsEllipse.toPolygon`

:return: - the minimal enclosing circle as a QGIS geometry
- center: Center of the minimal enclosing circle returneds
- center: Center of the minimal enclosing circle returneds

.. versionadded:: 3.0
%End
@@ -68,7 +68,7 @@ Retrieves the vertices which are before and after the interpolated point at a sp
:param previousVertex: will be set to previous vertex ID

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

.. note::

@@ -99,7 +99,7 @@ supported and is retrieved from the first 3D point amongst ``p1`` and
:param v2: Direction vector of the second line

:return: - Whether the lines intersect
- intersection: Output parameter, the intersection point
- 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 );
@@ -115,7 +115,7 @@ Compute the intersection between two segments
: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
- intersectionPoint: Output parameter, the intersection point
* Example:
.. code-block:: python

@@ -598,7 +598,7 @@ An algorithm to calculate an (approximate) intersection of two lines in 3D.
:param Lb2: is the second point on the second line,

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

@@ -238,7 +238,7 @@ otherwise QgsPoint.project() will be called after QgsUnitTypes.fromUnitToUnitFac
:param azimuth: - azimuth in radians, clockwise from North

:return: - distance in mapUnits
- projectedPoint: calculated projected point
- projectedPoint: calculated projected point

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

@@ -405,7 +405,7 @@ will also be in this same CRS.
:param p2: Ending point, in ellipsoidCrs()

:return: - the latitude at which the geodesic crosses the antimeridian
- fractionAlongLine: will be set to the fraction along the geodesic line joining ``p1`` to ``p2`` at which the antimeridian crossing occurs.
- fractionAlongLine: will be set to the fraction along the geodesic line joining ``p1`` to ``p2`` at which the antimeridian crossing occurs.

.. seealso:: :py:func:`splitGeometryAtAntimeridian`

@@ -652,7 +652,7 @@ record in the users style table in their personal qgis.db)


: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.
- 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
@@ -689,7 +689,7 @@ record in the users style table in their personal qgis.db)
key matches the URI.

: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.
- 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,7 +752,7 @@ record in the users style table in their personal qgis.db)


: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.
- 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,7 +771,7 @@ record in the users style table in their personal qgis.db)
: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.
- 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
@@ -784,7 +784,7 @@ Retrieve a named style for this layer from a sqlite database.
:param uri: uri for table

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

virtual bool importNamedStyle( QDomDocument &doc, QString &errorMsg /Out/,
@@ -832,7 +832,7 @@ record in the users style table in their personal qgis.db)


: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.
- 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
@@ -851,7 +851,7 @@ record in the users style table in their personal qgis.db)
: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.
- 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
@@ -330,7 +330,7 @@ Calculates the current value of the property, including any transforms which are
:param defaultValue: default value to return if the property is not active or cannot be calculated

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

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

@@ -351,7 +351,7 @@ Calculates the current value of the property and interprets it as a string.
:param defaultString: default string to return if the property cannot be calculated as a string

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

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

@@ -372,7 +372,7 @@ Calculates the current value of the property and interprets it as a color.
:param defaultColor: default color to return if the property cannot be calculated as a color

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

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

@@ -393,7 +393,7 @@ Calculates the current value of the property and interprets it as a double.
:param defaultValue: default double to return if the property cannot be calculated as a double

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

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

@@ -414,7 +414,7 @@ Calculates the current value of the property and interprets it as an integer.
:param defaultValue: default integer to return if the property cannot be calculated as an integer

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

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

@@ -435,7 +435,7 @@ Calculates the current value of the property and interprets it as an boolean.
:param defaultValue: default boolean to return if the property cannot be calculated as an boolean

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

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

@@ -119,7 +119,7 @@ Calculates the current value of the property with the specified key and interpre
:param defaultString: default string to return if the property cannot be calculated as a string

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

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

@@ -142,7 +142,7 @@ Calculates the current value of the property with the specified key and interpre
:param defaultColor: default color to return if the property cannot be calculated as a color

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

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

@@ -165,7 +165,7 @@ Calculates the current value of the property with the specified key and interpre
:param defaultValue: default double to return if the property cannot be calculated as a double

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

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

@@ -188,7 +188,7 @@ Calculates the current value of the property with the specified key and interpre
:param defaultValue: default integer to return if the property cannot be calculated as a integer

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

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

@@ -211,7 +211,7 @@ Calculates the current value of the property with the specified key and interpre
:param defaultValue: default boolean to return if the property cannot be calculated as a boolean

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

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

@@ -300,7 +300,7 @@ Attempts to parse an expression into a corresponding property transformer.
empty string if an expression is the transformer input.

:return: - corresponding property transformer, or None if expression could not
- baseExpression: will be set to the component of the source expression which is used to calculate the input to the property transformer. This will be set to an empty string if a field reference is the transformer input.
- baseExpression: will be set to the component of the source expression which is used to calculate the input to the property transformer. This will be set to an empty string if a field reference is the transformer input.
be parsed to a transformer.
%End

@@ -367,7 +367,7 @@ Attempts to parse an expression into a corresponding :py:class:`QgsSizeScaleTran
empty string if an expression is the transformer input.

:return: - corresponding :py:class:`QgsSizeScaleTransformer`, or None if expression could not
- baseExpression: will be set to the component of the source expression which is used to calculate the input to the property transformer. This will be set to an empty string if a field reference is the transformer input.
- baseExpression: will be set to the component of the source expression which is used to calculate the input to the property transformer. This will be set to an empty string if a field reference is the transformer input.
be parsed to a size scale transformer.
%End

@@ -514,7 +514,7 @@ Attempts to parse an expression into a corresponding QgsSizeScaleTransformer.
empty string if an expression is the transformer input.

:return: - corresponding QgsSizeScaleTransformer, or None if expression could not
- baseExpression: will be set to the component of the source expression which is used to calculate the input to the property transformer. This will be set to an empty string if a field reference is the transformer input.
- baseExpression: will be set to the component of the source expression which is used to calculate the input to the property transformer. This will be set to an empty string if a field reference is the transformer input.
be parsed to a size scale transformer.
%End

@@ -93,7 +93,7 @@ Execute the ``sql`` string.
:param name: Name of the transaction ( only used if `isDirty` is true)

:return: - true if everything is OK, false otherwise
- error: The error message
- error: The error message
%End

static bool supportsTransaction( const QgsVectorLayer *layer );
@@ -154,7 +154,7 @@ Decodes a distance unit from a string.
:param string: string to decode

:return: - decoded units
- ok: optional boolean, will be set to true if string was converted successfully
- ok: boolean, will be set to true if string was converted successfully

.. seealso:: :py:func:`encodeUnit`
%End
@@ -186,7 +186,7 @@ Converts a translated string to a distance unit.
:param string: string representing a distance unit

:return: - the distance unit
- ok: optional boolean, will be set to true if string was converted successfully
- ok: boolean, will be set to true if string was converted successfully

.. seealso:: :py:func:`toString`
%End
@@ -225,7 +225,7 @@ Decodes an areal unit from a string.
:param string: string to decode

:return: - decoded units
- ok: optional boolean, will be set to true if string was converted successfully
- ok: boolean, will be set to true if string was converted successfully

.. seealso:: :py:func:`encodeUnit`
%End
@@ -257,7 +257,7 @@ Converts a translated string to an areal unit.
:param string: string representing an areal unit

:return: - the area unit
- ok: optional boolean, will be set to true if string was converted successfully
- ok: boolean, will be set to true if string was converted successfully

.. seealso:: :py:func:`toString`
%End
@@ -300,7 +300,7 @@ Decodes an angular unit from a string.
:param string: string to decode

:return: - decoded units
- ok: optional boolean, will be set to true if string was converted successfully
- ok: boolean, will be set to true if string was converted successfully

.. seealso:: :py:func:`encodeUnit`
%End
@@ -409,7 +409,7 @@ Decodes a render unit from a string.
:param string: string to decode

:return: - decoded units
- ok: optional boolean, will be set to true if string was converted successfully
- ok: boolean, will be set to true if string was converted successfully

.. seealso:: :py:func:`encodeUnit`
%End
@@ -443,7 +443,7 @@ Decodes a layout unit from a string.
:param string: string to decode

:return: - decoded units
- ok: optional boolean, will be set to true if string was converted successfully
- ok: boolean, will be set to true if string was converted successfully

.. seealso:: :py:func:`encodeUnit`

0 comments on commit 384d310

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