Skip to content

Commit

Permalink
Merge pull request #8711 from 3nids/sipify_out_super
Browse files Browse the repository at this point in the history
 [sipify] enhanced SIP_OUT handling
  • Loading branch information
3nids committed Dec 19, 2018
2 parents a753f8b + 166e952 commit 0e7427f
Show file tree
Hide file tree
Showing 29 changed files with 144 additions and 114 deletions.
Expand Up @@ -84,8 +84,8 @@ Calculates interpolation value for map coordinates x, y
:param y: y-coordinate (in map units) :param y: y-coordinate (in map units)
:param feedback: optional feedback object for progress and cancelation support :param feedback: optional feedback object for progress and cancelation support


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




Expand Down
4 changes: 2 additions & 2 deletions python/core/auto_generated/expression/qgsexpression.sip.in
Expand Up @@ -250,8 +250,8 @@ Tests whether a string is a valid expression.
:param text: string to test :param text: string to test
:param context: optional expression context :param context: optional expression context


:return: true if string is a valid expression :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 .. versionadded:: 2.12
%End %End
Expand Down
Expand Up @@ -307,8 +307,8 @@ Returns next vertex id and coordinates
:param id: initial value should be the starting vertex id. The next vertex id will be stored :param id: initial value should be the starting vertex id. The next vertex id will be stored
in this variable if found. in this variable if found.


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


virtual void adjacentVertices( QgsVertexId vertex, QgsVertexId &previousVertex /Out/, QgsVertexId &nextVertex /Out/ ) const = 0; virtual void adjacentVertices( QgsVertexId vertex, QgsVertexId &previousVertex /Out/, QgsVertexId &nextVertex /Out/ ) const = 0;
Expand Down Expand Up @@ -346,8 +346,8 @@ Searches for the closest segment of the geometry to a given point.
:param vertexAfter: storage for the ID of the vertex at the end of the closest segment :param vertexAfter: storage for the ID of the vertex at the end of the closest segment
:param epsilon: epsilon for segment snapping :param epsilon: epsilon for segment snapping


:return: squared distance to closest segment or negative value on error :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 %End




Expand Down
4 changes: 2 additions & 2 deletions python/core/auto_generated/geometry/qgscurve.sip.in
Expand Up @@ -136,8 +136,8 @@ Returns the point and vertex id of a point within the curve.
:param node: node number, where the first node is 0 :param node: node number, where the first node is 0
:param type: will be set to the vertex type of the node :param type: will be set to the vertex type of the node


:return: true if node exists within the curve :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 %End


virtual QgsCurve *reversed() const = 0 /Factory/; virtual QgsCurve *reversed() const = 0 /Factory/;
Expand Down
11 changes: 7 additions & 4 deletions python/core/auto_generated/geometry/qgsgeometry.sip.in
Expand Up @@ -633,8 +633,8 @@ Searches for the closest vertex in this geometry to the given point.


:param point: Specifiest the point for search :param point: Specifiest the point for search


:return: The squared Cartesian distance is also returned in sqrDist, negative number on error :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 %End


double closestSegmentWithContext( const QgsPointXY &point, QgsPointXY &minDistPoint /Out/, int &afterVertex /Out/, int *leftOf /Out/ = 0, double epsilon = DEFAULT_SEGMENT_EPSILON ) const; double closestSegmentWithContext( const QgsPointXY &point, QgsPointXY &minDistPoint /Out/, int &afterVertex /Out/, int *leftOf /Out/ = 0, double epsilon = DEFAULT_SEGMENT_EPSILON ) const;
Expand All @@ -648,8 +648,8 @@ Searches for the closest segment of geometry to the given point
that the test was unsuccessful, e.g. for a point exactly on the line) that the test was unsuccessful, e.g. for a point exactly on the line)
:param epsilon: epsilon for segment snapping :param epsilon: epsilon for segment snapping


:return: The squared Cartesian distance is also returned in sqrDist, negative number on error :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 %End


OperationResult addRing( const QVector<QgsPointXY> &ring ); OperationResult addRing( const QVector<QgsPointXY> &ring );
Expand Down Expand Up @@ -821,6 +821,9 @@ Returns the minimal enclosing circle for the geometry.
:param radius: Radius of the minimal enclosing circle returned :param radius: Radius of the minimal enclosing circle returned
:param segments: Number of segments used to segment geometry. :py:func:`QgsEllipse.toPolygon` :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

.. versionadded:: 3.0 .. versionadded:: 3.0
%End %End


Expand Down
16 changes: 8 additions & 8 deletions python/core/auto_generated/geometry/qgsgeometryutils.sip.in
Expand Up @@ -67,8 +67,8 @@ Retrieves the vertices which are before and after the interpolated point at a sp
:param distance: distance to traverse along geometry :param distance: distance to traverse along geometry
:param previousVertex: will be set to previous vertex ID :param previousVertex: will be set to previous vertex ID


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


.. note:: .. note::


Expand Down Expand Up @@ -98,8 +98,8 @@ supported and is retrieved from the first 3D point amongst ``p1`` and
:param p2: Point on the second line :param p2: Point on the second line
:param v2: Direction vector of the second line :param v2: Direction vector of the second line


:return: Whether the lines intersect :return: - Whether the lines intersect
intersection: Output parameter, the intersection point - intersection: Output parameter, the intersection point
%End %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 ); 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 );
Expand All @@ -114,8 +114,8 @@ Compute the intersection between two segments
:param tolerance: The tolerance to use :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). :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 :return: - Whether the segments intersect
intersectionPoint: Output parameter, the intersection point - intersectionPoint: Output parameter, the intersection point
* Example: * Example:
.. code-block:: python .. code-block:: python


Expand Down Expand Up @@ -574,8 +574,8 @@ An algorithm to calculate an (approximate) intersection of two lines in 3D.
:param Lb1: is the first point on the second line, :param Lb1: is the first point on the second line,
:param Lb2: is the second point on the second line, :param Lb2: is the second point on the second line,


:return: true if the intersection can be found, false - otherwise. :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: example:
.. code-block:: python .. code-block:: python


Expand Down
4 changes: 2 additions & 2 deletions python/core/auto_generated/qgsdistancearea.sip.in
Expand Up @@ -222,8 +222,8 @@ otherwise QgsPoint.project() will be called after QgsUnitTypes.fromUnitToUnitFac
:param distance: must be in meters :param distance: must be in meters
:param azimuth: - azimuth in radians, clockwise from North :param azimuth: - azimuth in radians, clockwise from North


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


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


Expand Down
28 changes: 14 additions & 14 deletions python/core/auto_generated/qgsmaplayer.sip.in
Expand Up @@ -651,8 +651,8 @@ Save the current metadata of this layer as the default metadata
record in the users style table in their personal qgis.db) record in the users style table in their personal qgis.db)




:return: a QString with any status messages :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 .. versionadded:: 3.0
%End %End
Expand Down Expand Up @@ -688,8 +688,8 @@ record in the users style table in their personal qgis.db)
table will be consulted to see if there is a metadata who's table will be consulted to see if there is a metadata who's
key matches the URI. key matches the URI.


:return: a QString with any status messages :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 .. versionadded:: 3.0
%End %End
Expand Down Expand Up @@ -751,8 +751,8 @@ exists (either as a .qml file on disk or as a
record in the users style table in their personal qgis.db) record in the users style table in their personal qgis.db)




:return: a QString with any status messages :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` .. seealso:: :py:func:`also`
%End %End
Expand All @@ -770,8 +770,8 @@ record in the users style table in their personal qgis.db)
key matches the URI. key matches the URI.
:param categories: the style categories to be loaded. :param categories: the style categories to be loaded.


:return: a QString with any status messages :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` .. seealso:: :py:func:`also`
%End %End
Expand All @@ -783,8 +783,8 @@ Retrieve a named style for this layer from a sqlite database.
:param db: path to sqlite database :param db: path to sqlite database
:param uri: uri for table :param uri: uri for table


:return: true if style was successfully loaded :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 %End


virtual bool importNamedStyle( QDomDocument &doc, QString &errorMsg /Out/, virtual bool importNamedStyle( QDomDocument &doc, QString &errorMsg /Out/,
Expand Down Expand Up @@ -831,8 +831,8 @@ Save the properties of this layer as the default style
record in the users style table in their personal qgis.db) record in the users style table in their personal qgis.db)




:return: a QString with any status messages :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` .. seealso:: :py:func:`loadNamedStyle`
%End %End
Expand All @@ -850,8 +850,8 @@ record in the users style table in their personal qgis.db)
key matches the URI. key matches the URI.
:param categories: the style categories to be saved. :param categories: the style categories to be saved.


:return: a QString with any status messages :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` .. seealso:: :py:func:`saveDefaultStyle`
%End %End
Expand Down
24 changes: 12 additions & 12 deletions python/core/auto_generated/qgsproperty.sip.in
Expand Up @@ -322,8 +322,8 @@ Calculates the current value of the property, including any transforms which are
is able to respond to the current environment, layers and features within QGIS. 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 defaultValue: default value to return if the property is not active or cannot be calculated


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


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


Expand All @@ -343,8 +343,8 @@ Calculates the current value of the property and interprets it as a string.
:param context: QgsExpressionContext to evaluate the property for. :param context: QgsExpressionContext to evaluate the property for.
:param defaultString: default string to return if the property cannot be calculated as a string :param defaultString: default string to return if the property cannot be calculated as a string


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


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


Expand All @@ -364,8 +364,8 @@ Calculates the current value of the property and interprets it as a color.
:param context: QgsExpressionContext to evaluate the property for. :param context: QgsExpressionContext to evaluate the property for.
:param defaultColor: default color to return if the property cannot be calculated as a color :param defaultColor: default color to return if the property cannot be calculated as a color


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


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


Expand All @@ -385,8 +385,8 @@ Calculates the current value of the property and interprets it as a double.
:param context: QgsExpressionContext to evaluate the property for. :param context: QgsExpressionContext to evaluate the property for.
:param defaultValue: default double to return if the property cannot be calculated as a double :param defaultValue: default double to return if the property cannot be calculated as a double


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


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


Expand All @@ -406,8 +406,8 @@ Calculates the current value of the property and interprets it as an integer.
:param context: QgsExpressionContext to evaluate the property for. :param context: QgsExpressionContext to evaluate the property for.
:param defaultValue: default integer to return if the property cannot be calculated as an integer :param defaultValue: default integer to return if the property cannot be calculated as an integer


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


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


Expand All @@ -427,8 +427,8 @@ Calculates the current value of the property and interprets it as an boolean.
:param context: QgsExpressionContext to evaluate the property for. :param context: QgsExpressionContext to evaluate the property for.
:param defaultValue: default boolean to return if the property cannot be calculated as an boolean :param defaultValue: default boolean to return if the property cannot be calculated as an boolean


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


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


Expand Down
20 changes: 10 additions & 10 deletions python/core/auto_generated/qgspropertycollection.sip.in
Expand Up @@ -118,8 +118,8 @@ Calculates the current value of the property with the specified key and interpre
:param context: QgsExpressionContext to evaluate the property for. :param context: QgsExpressionContext to evaluate the property for.
:param defaultString: default string to return if the property cannot be calculated as a string :param defaultString: default string to return if the property cannot be calculated as a string


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


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


Expand All @@ -141,8 +141,8 @@ Calculates the current value of the property with the specified key and interpre
:param context: QgsExpressionContext to evaluate the property for. :param context: QgsExpressionContext to evaluate the property for.
:param defaultColor: default color to return if the property cannot be calculated as a color :param defaultColor: default color to return if the property cannot be calculated as a color


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


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


Expand All @@ -164,8 +164,8 @@ Calculates the current value of the property with the specified key and interpre
:param context: QgsExpressionContext to evaluate the property for. :param context: QgsExpressionContext to evaluate the property for.
:param defaultValue: default double to return if the property cannot be calculated as a double :param defaultValue: default double to return if the property cannot be calculated as a double


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


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


Expand All @@ -187,8 +187,8 @@ Calculates the current value of the property with the specified key and interpre
:param context: QgsExpressionContext to evaluate the property for. :param context: QgsExpressionContext to evaluate the property for.
:param defaultValue: default integer to return if the property cannot be calculated as a integer :param defaultValue: default integer to return if the property cannot be calculated as a integer


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


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


Expand All @@ -210,8 +210,8 @@ Calculates the current value of the property with the specified key and interpre
:param context: QgsExpressionContext to evaluate the property for. :param context: QgsExpressionContext to evaluate the property for.
:param defaultValue: default boolean to return if the property cannot be calculated as a boolean :param defaultValue: default boolean to return if the property cannot be calculated as a boolean


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


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


Expand Down
12 changes: 6 additions & 6 deletions python/core/auto_generated/qgspropertytransformer.sip.in
Expand Up @@ -299,8 +299,8 @@ Attempts to parse an expression into a corresponding property transformer.
to the property transformer. This will be set to an to the property transformer. This will be set to an
empty string if an expression is the transformer input. empty string if an expression is the transformer input.


:return: corresponding property transformer, or None if expression could not :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. be parsed to a transformer.
%End %End


Expand Down Expand Up @@ -366,8 +366,8 @@ Attempts to parse an expression into a corresponding :py:class:`QgsSizeScaleTran
to the property transformer. This will be set to an to the property transformer. This will be set to an
empty string if an expression is the transformer input. empty string if an expression is the transformer input.


:return: corresponding :py:class:`QgsSizeScaleTransformer`, or None if expression could not :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. be parsed to a size scale transformer.
%End %End


Expand Down Expand Up @@ -513,8 +513,8 @@ Attempts to parse an expression into a corresponding QgsSizeScaleTransformer.
to the property transformer. This will be set to an to the property transformer. This will be set to an
empty string if an expression is the transformer input. empty string if an expression is the transformer input.


:return: corresponding QgsSizeScaleTransformer, or None if expression could not :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. be parsed to a size scale transformer.
%End %End


Expand Down
4 changes: 2 additions & 2 deletions python/core/auto_generated/qgstransaction.sip.in
Expand Up @@ -92,8 +92,8 @@ Execute the ``sql`` string.
:param isDirty: Flag to indicate if the underlying data will be modified :param isDirty: Flag to indicate if the underlying data will be modified
:param name: Name of the transaction ( only used if `isDirty` is true) :param name: Name of the transaction ( only used if `isDirty` is true)


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


static bool supportsTransaction( const QgsVectorLayer *layer ); static bool supportsTransaction( const QgsVectorLayer *layer );
Expand Down

0 comments on commit 0e7427f

Please sign in to comment.