Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
More list formatting fixes
  • Loading branch information
nyalldawson committed Jun 13, 2020
1 parent 561a832 commit cedd73e
Show file tree
Hide file tree
Showing 38 changed files with 260 additions and 119 deletions.
Expand Up @@ -528,7 +528,8 @@ Ownership is transferred to the caller.
If the gridified geometry could not be calculated ``None`` will be returned.
It may generate an invalid geometry (in some corner cases).
It can also be thought as rounding the edges and it may be useful for removing errors.
Example:

### Example:

In this case we use a 2D grid of 1x1 to gridify.
In this case, it can be thought like rounding the x and y of all the points/vertices to full units (remove all decimals).
Expand Down Expand Up @@ -687,7 +688,8 @@ Checks validity of the geometry, and returns ``True`` if the geometry is valid.
Returns Java-style iterator for traversal of parts of the geometry. This iterator
can safely be used to modify parts of the geometry.

* Example:
### Example:

.. code-block:: python

# print the WKT representation of each part in a multi-point geometry
Expand Down Expand Up @@ -726,7 +728,8 @@ Returns a read-only, Java-style iterator for traversal of vertices of all the ge
The iterator returns a copy of individual vertices, and accordingly geometries cannot be
modified using the iterator. See transformVertices() for a safe method to modify vertices "in-place".

* Example:
### Example:

.. code-block:: python

# print the x and y coordinate for each vertex in a LineString
Expand Down
9 changes: 6 additions & 3 deletions python/core/auto_generated/geometry/qgsgeometry.sip.in
Expand Up @@ -410,7 +410,8 @@ Returns a read-only, Java-style iterator for traversal of vertices of all the ge
The iterator returns a copy of individual vertices, and accordingly geometries cannot be
modified using the iterator. See transformVertices() for a safe method to modify vertices "in-place".

* Example:
### Example:

.. code-block:: python

# print the x and y coordinate for each vertex in a LineString
Expand All @@ -437,7 +438,8 @@ can safely be used to modify parts of the geometry.
This method forces a detach. Use constParts() to avoid the detach
if the parts are not going to be modified.

* Example:
### Example:

.. code-block:: python

# print the WKT representation of each part in a multi-point geometry
Expand Down Expand Up @@ -476,7 +478,8 @@ returns read-only references to parts and cannot be used to modify the parts.
Unlike parts(), this method does not force a detach and is more efficient if read-only
iteration only is required.

* Example:
### Example:

.. code-block:: python

# print the WKT representation of each part in a multi-point geometry
Expand Down
12 changes: 9 additions & 3 deletions python/core/auto_generated/geometry/qgsgeometryutils.sip.in
Expand Up @@ -116,7 +116,9 @@ Compute the intersection between two segments

:return: - Whether the segments intersect
- intersectionPoint: Output parameter, the intersection point
* Example:

### Example:

.. code-block:: python

ret = QgsGeometryUtils.segmentIntersection( QgsPoint( 0, 0 ), QgsPoint( 0, 1 ), QgsPoint( 1, 1 ), QgsPoint( 1, 0 ) )
Expand Down Expand Up @@ -474,7 +476,9 @@ M value is computed if one of this point have M.
:param pt2: second point.

:return: New point at middle between points pt1 and pt2.
* Example:

### Example:

.. code-block:: python

p = QgsPoint( 4, 6 ) # 2D point
Expand Down Expand Up @@ -620,7 +624,9 @@ An algorithm to calculate an (approximate) intersection of two lines in 3D.

:return: - ``True`` if the intersection can be found, ``False`` - otherwise.
- intersection: is the result intersection, of it can be found.
example:

### Example:

.. code-block:: python

QgsGeometryUtils.linesIntersection3D(QgsVector3D(0,0,0), QgsVector3D(5,0,0), QgsVector3D(2,1,0), QgsVector3D(2,3,0))
Expand Down
4 changes: 3 additions & 1 deletion python/core/auto_generated/geometry/qgspoint.sip.in
Expand Up @@ -316,7 +316,9 @@ M value is preserved.

:return: The point projected. If a 2D point is projected a 3D point will be returned except if
inclination is 90. A 3D point is always returned if a 3D point is projected.
Example:

### Example:

.. code-block:: python

p = QgsPoint( 1, 2 ) # 2D point
Expand Down
72 changes: 54 additions & 18 deletions python/core/auto_generated/geometry/qgstriangle.sip.in
Expand Up @@ -116,7 +116,9 @@ Returns the three lengths of the triangle.

:return: Lengths of triangle ABC where [AB] is at 0, [BC] is at 1, [CA] is at 2.
An empty list is returned for empty triangle.
* Example:

### Example:

.. code-block:: python

tri = QgsTriangle( QgsPoint( 0, 0 ), QgsPoint( 0, 5 ), QgsPoint( 5, 5 ) )
Expand All @@ -132,7 +134,9 @@ Returns the three angles of the triangle.

:return: Angles in radians of triangle ABC where angle BAC is at 0, angle ABC is at 1, angle BCA is at 2.
An empty list is returned for empty triangle.
* Example:

### Example:

.. code-block:: python

tri = QgsTriangle( QgsPoint( 0, 0 ), QgsPoint( 0, 5 ), QgsPoint( 5, 5 ) )
Expand All @@ -147,7 +151,9 @@ Returns the three angles of the triangle.
Convenient method checking if the geometry is degenerate (have duplicate or colinear point(s)).

:return: ``True`` if the triangle is degenerate or empty, otherwise ``False``.
Example:

### Example:

.. code-block:: python

tri = QgsTriangle()
Expand All @@ -171,7 +177,9 @@ Is the triangle isocele (two sides with the same length)?
:param lengthTolerance: The tolerance to use

:return: ``True`` or ``False``. Always ``False`` for empty triangle.
* Example:

### Example:

.. code-block:: python

tri = QgsTriangle( QgsPoint( 0, 0 ), QgsPoint( 0, 5 ), QgsPoint( 5, 5 ) )
Expand All @@ -191,7 +199,9 @@ Is the triangle equilateral (three sides with the same length)?
:param lengthTolerance: The tolerance to use

:return: ``True`` or ``False``. Always ``False`` for empty triangle.
* Example:

### Example:

.. code-block:: python

tri = QgsTriangle( QgsPoint( 10, 10 ), QgsPoint( 16, 10 ), QgsPoint( 13, 15.1962 ) )
Expand All @@ -211,7 +221,9 @@ Is the triangle right-angled?
:param angleTolerance: The tolerance to use

:return: ``True`` or ``False``. Always ``False`` for empty triangle.
* Example:

### Example:

.. code-block:: python

tri = QgsTriangle( QgsPoint( 0, 0 ), QgsPoint( 0, 5 ), QgsPoint( 5, 5 ) )
Expand All @@ -231,7 +243,9 @@ Is the triangle scalene (all sides have different lengths)?
:param lengthTolerance: The tolerance to use

:return: ``True`` or ``False``. Always ``False`` for empty triangle.
* Example:

### Example:

.. code-block:: python

tri = QgsTriangle( QgsPoint( 7.2825, 4.2368 ), QgsPoint( 13.0058, 3.3218 ), QgsPoint( 9.2145, 6.5242 ) )
Expand All @@ -250,7 +264,9 @@ An altitude is a segment (defined by a :py:class:`QgsLineString`) from a vertex

:return: Three altitudes from this triangle.
An empty list is returned for empty triangle.
* Example:

### Example:

.. code-block:: python

tri = QgsTriangle( QgsPoint( 0, 0 ), QgsPoint( 0, 5 ), QgsPoint( 5, 5 ) )
Expand All @@ -266,7 +282,9 @@ A median is a segment (defined by a :py:class:`QgsLineString`) from a vertex to

:return: Three medians from this triangle.
An empty list is returned for empty triangle.
* Example:

### Example:

.. code-block:: python

tri = QgsTriangle( QgsPoint( 0, 0 ), QgsPoint( 0, 5 ), QgsPoint( 5, 5 ) )
Expand All @@ -284,7 +302,9 @@ The segment (defined by a :py:class:`QgsLineString`) returned bisect the angle o

:return: Three angle bisector from this triangle.
An empty list is returned for empty triangle.
* Example:

### Example:

.. code-block:: python

tri = QgsTriangle( QgsPoint( 0, 0 ), QgsPoint( 0, 5 ), QgsPoint( 5, 5 ) )
Expand All @@ -300,7 +320,9 @@ Medial (or midpoint) triangle of a triangle ABC is the triangle with vertices at

:return: The medial from this triangle.
An empty triangle is returned for empty triangle.
* Example:

### Example:

.. code-block:: python

tri = QgsTriangle( QgsPoint( 0, 0 ), QgsPoint( 0, 5 ), QgsPoint( 5, 5 ) )
Expand All @@ -318,7 +340,9 @@ An orthocenter is the point of intersection of the altitudes of a triangle.

:return: The orthocenter of the triangle.
An empty point is returned for empty triangle.
* Example:

### Example:

.. code-block:: python

tri = QgsTriangle( QgsPoint( 0, 0 ), QgsPoint( 0, 5 ), QgsPoint( 5, 5 ) )
Expand All @@ -334,7 +358,9 @@ Center of the circumscribed circle of the triangle.

:return: The center of the circumscribed circle of the triangle.
An empty point is returned for empty triangle.
* Example:

### Example:

.. code-block:: python

tri = QgsTriangle( QgsPoint( 0, 0 ), QgsPoint( 0, 5 ), QgsPoint( 5, 5 ) )
Expand All @@ -350,7 +376,9 @@ Radius of the circumscribed circle of the triangle.

:return: The radius of the circumscribed circle of the triangle.
0.0 is returned for empty triangle.
* Example:

### Example:

.. code-block:: python

tri = QgsTriangle( QgsPoint( 0, 0 ), QgsPoint( 0, 5 ), QgsPoint( 5, 5 ) )
Expand All @@ -366,7 +394,9 @@ Circumscribed circle of the triangle.

:return: The circumbscribed of the triangle with a :py:class:`QgsCircle`.
An empty circle is returned for empty triangle.
Example:

### Example:

.. code-block:: python

tri = QgsTriangle( QgsPoint( 0, 0 ), QgsPoint( 0, 5 ), QgsPoint( 5, 5 ) )
Expand All @@ -383,7 +413,9 @@ supported and is retrieved from the first 3D point amongst vertices.

:return: The center of the inscribed circle of the triangle.
An empty point is returned for empty triangle.
* Example:

### Example:

.. code-block:: python

tri = QgsTriangle( QgsPoint( 0, 0 ), QgsPoint( 0, 5 ), QgsPoint( 5, 5 ) )
Expand All @@ -399,7 +431,9 @@ Radius of the inscribed circle of the triangle.

:return: The radius of the inscribed circle of the triangle.
0.0 is returned for empty triangle.
* Example:

### Example:

.. code-block:: python

tri = QgsTriangle( QgsPoint( 0, 0 ), QgsPoint( 0, 5 ), QgsPoint( 5, 5 ) )
Expand All @@ -415,7 +449,9 @@ Inscribed circle of the triangle.

:return: The inscribed of the triangle with a :py:class:`QgsCircle`.
An empty circle is returned for empty triangle.
Example:

### Example:

.. code-block:: python

tri = QgsTriangle( QgsPoint( 0, 0 ), QgsPoint( 0, 5 ), QgsPoint( 5, 5 ) )
Expand Down
3 changes: 2 additions & 1 deletion python/core/auto_generated/qgseditformconfig.sip.in
Expand Up @@ -138,7 +138,8 @@ If ``ui`` is a URL, a local copy of the file will be made and will be used to cr
%Docstring
Set the editor widget config for a widget which is not for a simple field.

Example:
### Example:

.. code-block:: python

editFormConfig = layer.editFormConfig()
Expand Down
3 changes: 2 additions & 1 deletion python/core/auto_generated/qgsfeature.sip.in
Expand Up @@ -338,7 +338,8 @@ This method is a shortcut for calling:

feature.setGeometry( QgsGeometry( geometry ) )

* Example:
### Example:

.. code-block:: python

# Sets a feature's geometry to a point geometry
Expand Down
5 changes: 3 additions & 2 deletions python/core/auto_generated/symbology/qgsrenderer.sip.in
Expand Up @@ -527,8 +527,9 @@ coordinates
%Docstring
Clones generic renderer data to another renderer.
Currently clones
* Order By
* Paint Effect

- Order By
- Paint Effect

:param destRenderer: destination renderer for copied effect
%End
Expand Down
12 changes: 10 additions & 2 deletions python/core/auto_generated/textrenderer/qgstextformat.sip.in
Expand Up @@ -341,7 +341,11 @@ the rendered text.
.. warning::

Only a small subset of HTML formatting is supported. Currently this is restricted to:
* text color formatting

- text color formatting
- strikethrough
- underline
- overline

.. seealso:: :py:func:`setAllowHtmlFormatting`

Expand All @@ -356,7 +360,11 @@ the rendered text.
.. warning::

Only a small subset of HTML formatting is supported. Currently this is restricted to:
* text color formatting

- text color formatting
- strikethrough
- underline
- overline

.. seealso:: :py:func:`allowHtmlFormatting`

Expand Down
Expand Up @@ -26,9 +26,10 @@ Base class for plugins allowing to pick automatically a widget type for editing
virtual QgsEditorWidgetSetup editorWidgetSetup( const QgsVectorLayer *vl, const QString &fieldName, int &score /Out/ ) const = 0;
%Docstring
Typical scores are:
* 0: no matching type found.
* 10: a widget has been guessed from the type of field.
* 20: a widget has been determined from an external configuration (for example a database table)

- 0: no matching type found.
- 10: a widget has been guessed from the type of field.
- 20: a widget has been determined from an external configuration (for example a database table)

: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
Expand Down
Expand Up @@ -90,10 +90,11 @@ By default, it returns 5 for every fields.
Reimplement this if you only support certain fields.

Typical return values are:
* 0: not supported
* 5: maybe support (for example, Datetime support strings depending on their content)
* 10: basic support (this is what returns TextEdit for example, since it supports everything in a crude way)
* 20: specialized support

- 0: not supported
- 5: maybe support (for example, Datetime support strings depending on their content)
- 10: basic support (this is what returns TextEdit for example, since it supports everything in a crude way)
- 20: specialized support

:param vl:
:param fieldIdx:
Expand Down

0 comments on commit cedd73e

Please sign in to comment.