Skip to content

Commit

Permalink
Sipify
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 9, 2020
1 parent 0e36265 commit 4ee9feb
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 39 deletions.
2 changes: 1 addition & 1 deletion python/core/auto_generated/geometry/qgscurve.sip.in
Expand Up @@ -136,10 +136,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 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
- type: will be set to the vertex type of the node
%End

virtual QgsCurve *reversed() const = 0 /Factory/;
Expand Down
16 changes: 6 additions & 10 deletions python/core/auto_generated/geometry/qgsgeometry.sip.in
Expand Up @@ -556,14 +556,12 @@ Returns the vertex closest to the given point, the corresponding vertex index, s
and the indices of the vertices before and after the closest vertex.

:param point: point to search for
:param beforeVertex: will be set to the vertex index of the previous vertex from the closest one. Will be set to -1 if
not present.
:param afterVertex: will be set to the vertex index of the next vertex after the closest one. Will be set to -1 if
not present.
:param sqrDist: will be set to the square distance between the closest vertex and the specified point

:return: - closest point in geometry. If not found (empty geometry), returns null point and sqrDist is negative.
- atVertex: will be set to the vertex index of the closest found vertex
- beforeVertex: will be set to the vertex index of the previous vertex from the closest one. Will be set to -1 if not present.
- afterVertex: will be set to the vertex index of the next vertex after the closest one. Will be set to -1 if not present.
- sqrDist: will be set to the square distance between the closest vertex and the specified point
%End

double distanceToVertex( int vertex ) const;
Expand Down Expand Up @@ -724,14 +722,12 @@ Searches for the closest vertex in this geometry to the given point.
Searches for the closest segment of geometry to the given point

:param point: Specifies the point for search
: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
- afterVertex: Receives index of the vertex after the closest segment. The vertex before the closest segment is always afterVertex - 1
- 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)
%End

OperationResult addRing( const QVector<QgsPointXY> &ring );
Expand Down Expand Up @@ -946,11 +942,11 @@ by calling :py:func:`~QgsGeometry.lastError` on the returned geometry.
%Docstring
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
- radius: Radius of the minimal enclosing circle returned

.. versionadded:: 3.0
%End
Expand Down
5 changes: 1 addition & 4 deletions python/core/auto_generated/geometry/qgsgeometryutils.sip.in
Expand Up @@ -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 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
- isIntersection: Output parameter, return ``True`` if an intersection is found

Example
-------
Expand Down Expand Up @@ -565,8 +565,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 b: Output parameter, b coefficient of the equation.
:param c: Output parameter, c coefficient of the equation.

.. versionadded:: 3.0
%End
Expand Down Expand Up @@ -678,7 +676,6 @@ Returns a weighted point inside the triangle denoted by the points (``aX``, ``aY
:param cY: y-coordinate of third vertex in triangle
:param weightB: weighting factor along axis A-B (between 0 and 1)
:param weightC: weighting factor along axis A-C (between 0 and 1)
:param pointY: y-coordinate of generated point

.. versionadded:: 3.10
%End
Expand Down
1 change: 0 additions & 1 deletion python/core/auto_generated/labeling/qgspallabeling.sip.in
Expand Up @@ -553,7 +553,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 symbol: feature symbol to label (ownership is not transferred, and ``symbol`` must exist until the labeling is complete)
%End

void readXml( const QDomElement &elem, const QgsReadWriteContext &context );
Expand Down
Expand Up @@ -132,12 +132,12 @@ the corresponding ``numerator`` and ``denominator``, within the specified ``tole
This method is based of Richard's algorithm (1981) from "Continued Fractions without Tears" (University of Minnesota).

:param value: input value to convert
:param denominator: will be set to the calculated fraction denominator
:param sign: will be set to the sign of the result (as -1 or +1 values)
:param tolerance: acceptable tolerance. Larger values will give "nicer" fractions.

:return: - ``True`` if ``value`` was successfully converted to a fraction
- numerator: will be set to calculated fraction numerator
- denominator: will be set to the calculated fraction denominator
- sign: will be set to the sign of the result (as -1 or +1 values)
%End

static QString toUnicodeSuperscript( const QString &input );
Expand Down
Expand Up @@ -106,10 +106,10 @@ Decodes a provider key and layer ``uri`` from an encoded string, for use with
:py:func:`~QgsProcessingUtils.encodeProviderKeyAndUri`

:param string: encoded string, as returned by :py:func:`~QgsProcessingUtils.encodeProviderKeyAndUri`
:param uri: decoded layer uri

:return: - ``True`` if ``string`` was successfully decoded
- providerKey: ID key for corresponding data provider
- uri: decoded layer uri

.. versionadded:: 3.14
%End
Expand Down
5 changes: 0 additions & 5 deletions python/core/auto_generated/qgsmapsettingsutils.sip.in
Expand Up @@ -42,11 +42,6 @@ The optional ``flags`` argument can be used to fine-tune the check behavior.
Computes the six parameters of a world file.

:param mapSettings: map settings
:param b: the b parameter
:param c: the c parameter
:param d: the d parameter
:param e: the e parameter
:param f: the f parameter

.. versionadded:: 3.10
%End
Expand Down
12 changes: 3 additions & 9 deletions python/core/auto_generated/qgspropertytransformer.sip.in
Expand Up @@ -295,12 +295,10 @@ of a sub-expression reflecting the parent property's state.
Attempts to parse an expression into a corresponding property transformer.

:param expression: expression to parse
:param fieldName: will be set to a field name which is used to calculate the input
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.
- fieldName: will be set to a field name which is used to calculate the input to the property transformer. This will be set to an empty string if an expression is the transformer input.
be parsed to a transformer.
%End

Expand Down Expand Up @@ -362,12 +360,10 @@ Constructor for QgsGenericNumericTransformer.
Attempts to parse an expression into a corresponding :py:class:`QgsSizeScaleTransformer`.

:param expression: expression to parse
:param fieldName: will be set to a field name which is used to calculate the input
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.
- fieldName: will be set to a field name which is used to calculate the input to the property transformer. This will be set to an empty string if an expression is the transformer input.
be parsed to a size scale transformer.
%End

Expand Down Expand Up @@ -509,12 +505,10 @@ Constructor for QgsSizeScaleTransformer.
Attempts to parse an expression into a corresponding QgsSizeScaleTransformer.

:param expression: expression to parse
:param fieldName: will be set to a field name which is used to calculate the input
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.
- fieldName: will be set to a field name which is used to calculate the input to the property transformer. This will be set to an empty string if an expression is the transformer input.
be parsed to a size scale transformer.
%End

Expand Down
2 changes: 1 addition & 1 deletion python/core/auto_generated/qgsvectorlayer.sip.in
Expand Up @@ -880,10 +880,10 @@ Lists all the style in db split into related to the layer and not related to

:param ids: the list in which will be stored the style db ids
:param names: the list in which will be stored the style names
:param msgError:

:return: - the number of styles related to current layer (-1 on not implemented)
- descriptions: the list in which will be stored the style descriptions
- msgError:

.. note::

Expand Down
8 changes: 4 additions & 4 deletions python/core/auto_generated/raster/qgsrasteriterator.sip.in
Expand Up @@ -46,13 +46,13 @@ the pixels in n rasters whilst aligning the result to a reference layer which is
Note that calling this method also advances the iterator, just like calling :py:func:`~QgsRasterIterator.readNextRasterPart`.

:param bandNumber: band to read
:param rows: number of rows on output device
:param topLeftColumn: top left column
:param topLeftRow: top left row
:param blockExtent: exact extent of returned raster block

:return: - ``False`` if the last part was already returned
- columns: number of columns on output device
- rows: number of rows on output device
- topLeftColumn: top left column
- topLeftRow: top left row
- blockExtent: exact extent of returned raster block

.. versionadded:: 3.6
%End
Expand Down
2 changes: 1 addition & 1 deletion python/gui/auto_generated/qgsnewvectorlayerdialog.sip.in
Expand Up @@ -44,11 +44,11 @@ If ``encoding`` is specified, it will be set to the encoding of the created file

:param parent: parent widget for dialog
:param initialPath: initial file path to show in dialog
:param encoding: if specified, will be set to file encoding of created layer
:param crs: default layer CRS to show in dialog

:return: - Newly created file name, or an empty string if user canceled or an error occurred.
- errorMessage: will be set to any error message encountered during layer creation
- encoding: will be set to file encoding of created layer


.. versionadded:: 3.4.5
Expand Down

0 comments on commit 4ee9feb

Please sign in to comment.