run sipify

This commit is contained in:
Denis Rouzaud 2018-12-19 08:04:27 -04:00
parent 03f801738d
commit 166e952c33
22 changed files with 119 additions and 102 deletions

View File

@ -84,8 +84,8 @@ Calculates interpolation value for map coordinates x, y
:param y: y-coordinate (in map units)
:param feedback: optional feedback object for progress and cancelation support
:return: 0 in case of success*
result: out: interpolation result
:return: - 0 in case of success
- result: interpolation result
%End

View File

@ -250,8 +250,8 @@ Tests whether a string is a valid expression.
:param text: string to test
:param context: optional expression context
:return: true if string is a valid expression
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

View File

@ -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
in this variable if found.
:return: false if at end
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;
@ -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 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)
: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

View File

@ -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 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
: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/;

View File

@ -633,8 +633,8 @@ 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
: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;
@ -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)
: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
: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 );
@ -821,6 +821,9 @@ Returns the minimal enclosing circle for the geometry.
:param radius: Radius of the minimal enclosing circle returned
: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
%End

View File

@ -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 previousVertex: will be set to previous vertex ID
:return: true if vertices were successfully retrieved
nextVertex: will be set to next vertex ID
:return: - true if vertices were successfully retrieved
- nextVertex: will be set to next vertex ID
.. note::
@ -98,8 +98,8 @@ supported and is retrieved from the first 3D point amongst ``p1`` and
:param p2: Point on the second line
:param v2: Direction vector of the second line
:return: Whether the lines intersect
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 );
@ -114,8 +114,8 @@ Compute the intersection between two segments
: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
:return: - Whether the segments intersect
- intersectionPoint: Output parameter, the intersection point
* Example:
.. code-block:: python
@ -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 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.
:return: - true if the intersection can be found, false - otherwise.
- intersection: is the result intersection, of it can be found.
example:
.. code-block:: python

View File

@ -222,8 +222,8 @@ otherwise QgsPoint.project() will be called after QgsUnitTypes.fromUnitToUnitFac
:param distance: must be in meters
:param azimuth: - azimuth in radians, clockwise from North
:return: distance in mapUnits
projectedPoint: calculated projected point
:return: - distance in mapUnits
- projectedPoint: calculated projected point
.. seealso:: :py:func:`sourceCrs`

View File

@ -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)
: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.
: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,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
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.
: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
@ -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)
: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.
: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
@ -770,8 +770,8 @@ record in the users style table in their personal qgis.db)
key matches the URI.
: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.
: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
@ -783,8 +783,8 @@ Retrieve a named style for this layer from a sqlite database.
:param db: path to sqlite database
:param uri: uri for table
:return: true if style was successfully loaded
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/,
@ -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)
: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.
: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
@ -850,8 +850,8 @@ record in the users style table in their personal qgis.db)
key matches the URI.
: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.
: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

View File

@ -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.
: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
:return: - calculated value for property
- ok: if specified, will be set to true if conversion was successful
.. seealso:: :py:func:`valueAsString`
@ -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 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
:return: - value parsed to string
- ok: if specified, will be set to true if conversion was successful
.. seealso:: :py:func:`value`
@ -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 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
:return: - value parsed to color
- ok: if specified, will be set to true if conversion was successful
.. seealso:: :py:func:`value`
@ -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 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
:return: - value parsed to double
- ok: if specified, will be set to true if conversion was successful
.. seealso:: :py:func:`value`
@ -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 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
:return: - value parsed to integer
- ok: if specified, will be set to true if conversion was successful
.. seealso:: :py:func:`value`
@ -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 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
:return: - value parsed to boolean
- ok: if specified, will be set to true if conversion was successful
.. seealso:: :py:func:`value`

View File

@ -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 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
:return: - value parsed to string
- ok: if specified, will be set to true if conversion was successful
.. seealso:: :py:func:`value`
@ -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 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
:return: - value parsed to color
- ok: if specified, will be set to true if conversion was successful
.. seealso:: :py:func:`value`
@ -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 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
:return: - value parsed to double
- ok: if specified, will be set to true if conversion was successful
.. seealso:: :py:func:`value`
@ -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 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
:return: - value parsed to integer
- ok: if specified, will be set to true if conversion was successful
.. seealso:: :py:func:`value`
@ -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 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
:return: - value parsed to bool
- ok: if specified, will be set to true if conversion was successful
.. seealso:: :py:func:`value`

View File

@ -299,8 +299,8 @@ Attempts to parse an expression into a corresponding property transformer.
to the property transformer. This will be set to an
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.
: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.
be parsed to a transformer.
%End
@ -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
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.
: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.
be parsed to a size scale transformer.
%End
@ -513,8 +513,8 @@ Attempts to parse an expression into a corresponding QgsSizeScaleTransformer.
to the property transformer. This will be set to an
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.
: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.
be parsed to a size scale transformer.
%End

View File

@ -92,8 +92,8 @@ Execute the ``sql`` string.
:param isDirty: Flag to indicate if the underlying data will be modified
:param name: Name of the transaction ( only used if `isDirty` is true)
:return: true if everything is OK, false otherwise
error: The error message
:return: - true if everything is OK, false otherwise
- error: The error message
%End
static bool supportsTransaction( const QgsVectorLayer *layer );

View File

@ -153,8 +153,8 @@ 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
:return: - decoded units
- ok: optional boolean, will be set to true if string was converted successfully
.. seealso:: :py:func:`encodeUnit`
%End
@ -185,6 +185,9 @@ 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
.. seealso:: :py:func:`toString`
%End
@ -221,8 +224,8 @@ 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
:return: - decoded units
- ok: optional boolean, will be set to true if string was converted successfully
.. seealso:: :py:func:`encodeUnit`
%End
@ -253,6 +256,9 @@ 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
.. seealso:: :py:func:`toString`
%End
@ -293,8 +299,8 @@ 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
:return: - decoded units
- ok: optional boolean, will be set to true if string was converted successfully
.. seealso:: :py:func:`encodeUnit`
%End
@ -402,8 +408,8 @@ 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
:return: - decoded units
- ok: optional boolean, will be set to true if string was converted successfully
.. seealso:: :py:func:`encodeUnit`
%End
@ -436,8 +442,8 @@ 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
:return: - decoded units
- ok: optional boolean, will be set to true if string was converted successfully
.. seealso:: :py:func:`encodeUnit`

View File

@ -799,8 +799,8 @@ Lists all the style in db split into related to the layer and not related to
:param names: the list in which will be stored the style names
:param msgError:
:return: the number of styles related to current layer
descriptions: the list in which will be stored the style descriptions
:return: - the number of styles related to current layer
- descriptions: the list in which will be stored the style descriptions
.. note::
@ -818,8 +818,8 @@ Delete a style from the database
:param styleId: the provider's layer_styles table id of the style to delete
:return: true in case of success
msgError: reference to string that will be updated with any error messages
:return: - true in case of success
- msgError: reference to string that will be updated with any error messages
.. versionadded:: 3.0
%End

View File

@ -85,6 +85,9 @@ Finds the vector join for a layer field index.
:param index: this layers attribute index
:param fields: fields of the vector layer (including joined fields)
:return: - the vector layer join info
- sourceFieldIndex: Output: field's index in source layer
%End
int joinedFieldsOffset( const QgsVectorLayerJoinInfo *info, const QgsFields &fields );

View File

@ -35,8 +35,8 @@ This method should/will be called, whenever a new feature will be added to the l
:param defaultValues: Default values for the feature to add
:param defaultGeometry: A default geometry to add to the feature
:return: True in case of success, False if the operation failed/was aborted
feature: Updated feature after adding will be written back to this
:return: - True in case of success, False if the operation failed/was aborted
- feature: Updated feature after adding will be written back to this
TODO QGIS 3: remove const qualifier
%End
@ -87,8 +87,8 @@ Copy and move features with defined translation.
:param dx: The translation on x
:param dy: The translation on y
:return: True if all features could be copied.
errorMsg: If given, it will contain the error message
:return: - True if all features could be copied.
- errorMsg: If given, it will contain the error message
TODO QGIS 3: remove const qualifier
%End

View File

@ -27,13 +27,15 @@ extension, false otherwise.
bool unzip( const QString &zip, const QString &dir, QStringList &files /Out/ );
%Docstring
Unzip a zip file in an output directory. An error is returned if the zip
filename does not exist, the output directory does not exist or is
not writable.
Unzip a zip file in an output directory.
:param zip: The zip filename
:param dir: The output directory
:return: - false if the zip filename does not exist, the output directory
- files: The absolute path of unzipped files
does not exist or is not writable.
.. versionadded:: 3.0
%End

View File

@ -59,8 +59,8 @@ Generates a new RGBA value based on one input ``value``.
:param returnGreenValue: The green component of the new RGBA value
:param returnBlueValue: The blue component of the new RGBA value
:return: True if the return values are valid otherwise false
returnAlpha: The alpha component of the new RGBA value
:return: - True if the return values are valid otherwise false
- returnAlpha: The alpha component of the new RGBA value
%End
bool shade( double redValue,
@ -82,8 +82,8 @@ Generates a new RGBA value based on an original RGBA value.
:param returnGreenValue: The green component of the new RGBA value
:param returnBlueValue: The blue component of the new RGBA value
:return: True if the return values are valid otherwise false
returnAlpha: The alpha component of the new RGBA value
:return: - True if the return values are valid otherwise false
- returnAlpha: The alpha component of the new RGBA value
%End
void setRasterShaderFunction( QgsRasterShaderFunction *function /Transfer/ );

View File

@ -63,8 +63,8 @@ Generates an new RGBA value based on one input ``value``.
:param returnGreenValue: The green component of the new RGBA value
:param returnBlueValue: The blue component of the new RGBA value
:return: True if the return values are valid otherwise false
returnAlpha: The alpha component of the new RGBA value
:return: - True if the return values are valid otherwise false
- returnAlpha: The alpha component of the new RGBA value
%End
virtual bool shade( double redValue,
@ -86,8 +86,8 @@ Generates an new RGBA value based on an original RGBA value.
:param returnGreenValue: The green component of the new RGBA value
:param returnBlueValue: The blue component of the new RGBA value
:return: True if the return values are valid otherwise false
returnAlpha: The alpha component of the new RGBA value
:return: - True if the return values are valid otherwise false
- returnAlpha: The alpha component of the new RGBA value
%End
double minimumMaximumRange() const;

View File

@ -33,8 +33,8 @@ Typical scores are:
:param vl: The vector layer for which this widget will be created
:param fieldName: The field name on the specified layer for which this widget will be created
:return: and integer value rating how good is the setup provided by this plugin.
score: Where the score is returned (default to 0)
:return: - and integer value rating how good is the setup provided by this plugin.
- score: Where the score is returned (default to 0)
%End
};

View File

@ -110,8 +110,11 @@ Returns the current expression shown in the widget.
bool isValidExpression( QString *expressionError /Out/ = 0 ) const;
%Docstring
Returns true if the current expression is valid.
Determines if the current expression is valid.
:return: - true if the current expression is valid.
- expressionError: will be set to any generated error message if specified
%End
void registerExpressionContextGenerator( const QgsExpressionContextGenerator *generator );

View File

@ -39,8 +39,8 @@ Constructor
Format the exception for sending to client
:return: QByteArray the fermatted response.
responseFormat: QString to store the content type of the response format.
:return: - QByteArray the fermatted response.
- responseFormat: QString to store the content type of the response format.
The defaolt implementation return text/xml format.
%End