Skip to content

Commit

Permalink
[sipify] Catch more class references and insert :py:class: annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 30, 2021
1 parent f314dc8 commit 50b9bea
Show file tree
Hide file tree
Showing 511 changed files with 1,570 additions and 1,556 deletions.
4 changes: 2 additions & 2 deletions python/3d/auto_generated/materials/qgsmaterialregistry.sip.in
Expand Up @@ -19,7 +19,7 @@ Stores metadata about one 3D material settings class.
.. note::

It's necessary to implement :py:func:`~createMaterialSettings` function.
In C++ you can use QgsMaterialSettingsMetadata convenience class.
In C++ you can use :py:class:`QgsMaterialSettingsMetadata` convenience class.

.. versionadded:: 3.16
%End
Expand Down Expand Up @@ -78,7 +78,7 @@ class QgsMaterialRegistry
%Docstring
Registry of available 3d material settings classes.

QgsMaterialRegistry is not usually directly created, but rather accessed through
:py:class:`QgsMaterialRegistry` is not usually directly created, but rather accessed through
Qgs3D.materialRegistry().

.. versionadded:: 3.16
Expand Down
Expand Up @@ -16,13 +16,13 @@ struct QgsInterpolatorVertexData

QgsInterpolatorVertexData( double x, double y, double z );
%Docstring
Constructor for QgsInterpolatorVertexData with the specified
Constructor for :py:class:`QgsInterpolatorVertexData` with the specified
``x``, ``y``, and ``z`` coordinate.
%End

QgsInterpolatorVertexData();
%Docstring
Constructor for QgsInterpolatorVertexData
Constructor for :py:class:`QgsInterpolatorVertexData`
%End

double x;
Expand Down
Expand Up @@ -32,7 +32,7 @@ Interpolation in a triangular irregular network
QgsTinInterpolator( const QList<QgsInterpolator::LayerData> &inputData, TinInterpolation interpolation = Linear, QgsFeedback *feedback = 0 );
%Docstring
Constructor for QgsTinInterpolator.
The ``feedback`` object specifies an optional QgsFeedback object for progress reports and cancellation support.
The ``feedback`` object specifies an optional :py:class:`QgsFeedback` object for progress reports and cancellation support.
Ownership of ``feedback`` is not transferred and callers must ensure that it exists for the lifetime of this object.
%End
~QgsTinInterpolator();
Expand Down
Expand Up @@ -14,7 +14,7 @@
class QgsGraphBuilder : QgsGraphBuilderInterface /NoDefaultCtors/
{
%Docstring
This class used for making the QgsGraph object
This class used for making the :py:class:`QgsGraph` object
%End

%TypeHeaderCode
Expand Down
Expand Up @@ -18,7 +18,7 @@ class QgsGraphBuilderInterface
{
%Docstring
Determine interface for creating a graph. Contains the settings of the graph.
QgsGraphBuilder and QgsGraphDirector both use a "builder" design pattern
:py:class:`QgsGraphBuilder` and :py:class:`QgsGraphDirector` both use a "builder" design pattern
%End

%TypeHeaderCode
Expand Down
Expand Up @@ -17,7 +17,7 @@
class QgsGraphDirector : QObject
{
%Docstring
Determine making the graph. QgsGraphBuilder and QgsGraphDirector implemented
Determine making the graph. :py:class:`QgsGraphBuilder` and :py:class:`QgsGraphDirector` implemented
using "builder" design patter.
%End

Expand Down
Expand Up @@ -18,10 +18,10 @@
class QgsNetworkStrategy
{
%Docstring
QgsNetworkStrategy defines strategy used for calculation of the edge cost. For example it can
:py:class:`QgsNetworkStrategy` defines strategy used for calculation of the edge cost. For example it can
take into account travel distance, amount of time or money. Currently there are two strategies
implemented in the analysis library: QgsNetworkDistanceStrategy and QgsNetworkSpeedStrategy.
QgsNetworkStrategy implemented using "strategy" design pattern.
implemented in the analysis library: :py:class:`QgsNetworkDistanceStrategy` and :py:class:`QgsNetworkSpeedStrategy`.
:py:class:`QgsNetworkStrategy` implemented using "strategy" design pattern.

.. versionadded:: 3.0
%End
Expand Down
Expand Up @@ -14,7 +14,7 @@ class QgsBatchGeocodeAlgorithm : QgsProcessingFeatureBasedAlgorithm
{
%Docstring

A base class for batch geocoder algorithms, which takes a QgsGeocoderInterface object and exposes it as
A base class for batch geocoder algorithms, which takes a :py:class:`QgsGeocoderInterface` object and exposes it as
a Processing algorithm for batch geocoding operations.

Example
Expand Down
2 changes: 1 addition & 1 deletion python/analysis/auto_generated/qgsanalysis.sip.in
Expand Up @@ -14,7 +14,7 @@
class QgsAnalysis
{
%Docstring
QgsAnalysis is a singleton class containing various registry and other global members
:py:class:`QgsAnalysis` is a singleton class containing various registry and other global members
related to analysis classes.

.. versionadded:: 3.4
Expand Down
Expand Up @@ -14,7 +14,7 @@
class QgsAlignRaster
{
%Docstring
QgsAlignRaster takes one or more raster layers and warps (resamples) them
:py:class:`QgsAlignRaster` takes one or more raster layers and warps (resamples) them
so they have the same:

- coordinate reference system
Expand Down
Expand Up @@ -24,14 +24,14 @@ Implementing a custom geometry check consists of the following parts
Writing the check
-----------------

A new subclass of QgsGeometryCheck needs to be written and at least the following
A new subclass of :py:class:`QgsGeometryCheck` needs to be written and at least the following
abstract methods need to be implemented:

- :py:func:`~compatibleGeometryTypes`: A list of geometry types to which this check applies
- :py:func:`~resolutionMethods`: A list of names for (automated) resolution methods that can be used to fix errors of this type
- :py:func:`~description`: A description for the geometry check.
- :py:func:`~id`: A unique id for this check.
- :py:func:`~checkType`: One of QgsGeometryCheck.LayerCheck, QgsGeometryCheck.FeatureCheck,QgsGeometryCheck.FeatureNodeCheck
- :py:func:`~checkType`: One of :py:class:`QgsGeometryCheck`.LayerCheck, :py:class:`QgsGeometryCheck`.FeatureCheck,:py:class:`QgsGeometryCheck`.FeatureNodeCheck
- :py:func:`~collectErrors`: This method will be called to validate geometries. All geometries which should be validated are passed
into this method with the parameter ids and should be retrieved from the available featurePools to make
use of caching. New errors should be appended to the error list and other message strings to messages.
Expand All @@ -41,18 +41,18 @@ Creating a geometry check factory
---------------------------------

A Geometry check factory manages meta information for checks. There will always be one single
geometry check factory created per check type, but it's possible that multiple QgsGeometryCheck
geometry check factory created per check type, but it's possible that multiple :py:class:`QgsGeometryCheck`
instances are created and used in parallel.

A new subclass of QgsGeometryCheckFactory needs to be written and at least the following
A new subclass of :py:class:`QgsGeometryCheckFactory` needs to be written and at least the following
abstract methods need to be implemented:

- :py:func:`QgsGeometryCheckFactory.createGeometryCheck()`: Needs to return a new subclassed QgsGeometryCheck object that has been written in the previous step.
- :py:func:`QgsGeometryCheckFactory.createGeometryCheck()`: Needs to return a new subclassed :py:class:`QgsGeometryCheck` object that has been written in the previous step.
- :py:func:`QgsGeometryCheckFactory.id()`: A unique id for this geometry check.
- :py:func:`QgsGeometryCheckFactory.description()`: A description for this geometry check that can be presented to the user for more explanation.
- :py:func:`QgsGeometryCheckFactory.isCompatible()`: Returns a boolean that determines if this check is available for a given layer. This often
checks for the geometry type of the layer.
- :py:func:`QgsGeometryCheckFactory.flags()`: Returns additional flags for a geometry check. If unsure return QgsGeometryCheck.AvailableInValidation.
- :py:func:`QgsGeometryCheckFactory.flags()`: Returns additional flags for a geometry check. If unsure return :py:class:`QgsGeometryCheck`.AvailableInValidation.
- :py:func:`QgsGeometryCheckFactory.checkType()`: Returns the type of this geometry check.

Registering the geometry check
Expand Down Expand Up @@ -195,7 +195,7 @@ Returns a list of descriptions for available resolutions for errors.
The index will be passed as ``method`` to :py:func:`fixError`.

.. deprecated:: QGIS 3.12
use availableResolutionMethods() instead
use :py:func:`~QgsGeometryCheck.availableResolutionMethods` instead

.. versionadded:: 3.4
%End
Expand Down
Expand Up @@ -16,7 +16,7 @@ class QgsGeometryCheckRegistry
%Docstring
This class manages all known geometry check factories.

QgsGeometryCheckRegistry is not usually directly created, but rather accessed through
:py:class:`QgsGeometryCheckRegistry` is not usually directly created, but rather accessed through
:py:func:`QgsAnalysis.geometryCheckRegistry()`.

.. note::
Expand Down
Expand Up @@ -15,7 +15,7 @@ class QgsSingleGeometryCheckError
{
%Docstring

An error from a QgsSingleGeometryCheck.
An error from a :py:class:`QgsSingleGeometryCheck`.

.. note::

Expand Down Expand Up @@ -83,7 +83,7 @@ class QgsGeometryCheckErrorSingle : QgsGeometryCheckError
{
%Docstring

Wraps a QgsSingleGeometryError into a standard :py:class:`QgsGeometryCheckError`.
Wraps a :py:class:`QgsSingleGeometryError` into a standard :py:class:`QgsGeometryCheckError`.
The single error can be obtained via singleError.

.. note::
Expand Down Expand Up @@ -146,7 +146,7 @@ Creates a new single geometry check.
%Docstring
Check the ``geometry`` for errors. It may make use of ``configuration`` options.

Returns a list of QgsSingleGeometryCheckErrors, ownership is transferred to the caller.
Returns a list of :py:class:`QgsSingleGeometryCheckErrors`, ownership is transferred to the caller.
An empty list is returned for geometries without errors.

.. versionadded:: 3.4
Expand Down
Expand Up @@ -13,7 +13,7 @@
class QgsGeometrySnapper : QObject
{
%Docstring
QgsGeometrySnapper allows a geometry to be snapped to the geometries within a
:py:class:`QgsGeometrySnapper` allows a geometry to be snapped to the geometries within a
different reference layer. Vertices in the geometries will be modified to
match the reference layer features within a specified snap tolerance.

Expand Down Expand Up @@ -75,14 +75,14 @@ Emitted each time a feature has been processed when calling :py:func:`~QgsGeomet
class QgsInternalGeometrySnapper
{
%Docstring
QgsInternalGeometrySnapper allows a set of geometries to be snapped to each other. It can be used to close gaps in layers.
:py:class:`QgsInternalGeometrySnapper` allows a set of geometries to be snapped to each other. It can be used to close gaps in layers.

To use :py:class:`QgsInternalGeometrySnapper`, first construct the snapper using the desired snap parameters. Then,
features are fed to to the snapper one-by-one by calling :py:func:`~QgsGeometrySnapper.snapFeature`. Each feature passed by calling
:py:func:`~QgsGeometrySnapper.snapFeature` will be snapped to any features which have already been processed by the snapper.

After processing all desired features, the results can be fetched by calling :py:func:`~QgsGeometrySnapper.snappedGeometries`.
The returned QgsGeometryMap can be passed to :py:func:`QgsVectorDataProvider.changeGeometryValues()` to save
The returned :py:class:`QgsGeometryMap` can be passed to :py:func:`QgsVectorDataProvider.changeGeometryValues()` to save
the snapped geometries back to the source layer.

.. versionadded:: 3.0
Expand All @@ -107,7 +107,7 @@ calls to :py:func:`~QgsInternalGeometrySnapper.snapFeature` in this object, and

QgsGeometryMap snappedGeometries() const;
%Docstring
Returns a QgsGeometryMap of all feature geometries snapped by this object.
Returns a :py:class:`QgsGeometryMap` of all feature geometries snapped by this object.
%End

};
Expand Down
Expand Up @@ -66,7 +66,7 @@ The raster layer must exist for the lifetime of the zonal statistics calculation
.. warning::

Constructing QgsZonalStatistics using this method is not thread safe, and
the constructor which accepts a QgsRasterInterface should be used instead.
the constructor which accepts a :py:class:`QgsRasterInterface` should be used instead.
%End

QgsZonalStatistics( QgsVectorLayer *polygonLayer,
Expand Down
12 changes: 6 additions & 6 deletions python/core/auto_generated/annotations/qgsannotation.sip.in
Expand Up @@ -17,11 +17,11 @@ class QgsAnnotation : QObject

Abstract base class for annotation items which are drawn over a map.

QgsAnnotation is an abstract base class for map annotation items. These annotations can be
:py:class:`QgsAnnotation` is an abstract base class for map annotation items. These annotations can be
drawn within a map, and have either a fixed map position (retrieved using :py:func:`~mapPosition`)
or are placed relative to the map's frame (retrieved using :py:func:`~relativePosition`).
Annotations with a fixed map position also have a corresponding
QgsCoordinateReferenceSystem, which can be determined by calling :py:func:`~mapPositionCrs`.
:py:class:`QgsCoordinateReferenceSystem`, which can be determined by calling :py:func:`~mapPositionCrs`.

Derived classes should implement their custom painting routines within
a :py:func:`~renderAnnotation` override.
Expand Down Expand Up @@ -150,7 +150,7 @@ Sets the annotation's frame's offset (in pixels) from the :py:func:`~QgsAnnotati
.. seealso:: :py:func:`frameOffsetFromReferencePoint`

.. deprecated::
use setFrameOffsetFromReferencePointMm() instead
use :py:func:`~QgsAnnotation.setFrameOffsetFromReferencePointMm` instead
%End

QPointF frameOffsetFromReferencePoint() const /Deprecated/;
Expand All @@ -160,7 +160,7 @@ Returns the annotation's frame's offset (in pixels) from the :py:func:`~QgsAnnot
.. seealso:: :py:func:`setFrameOffsetFromReferencePoint`

.. deprecated::
use frameOffsetFromReferencePointMm() instead
use :py:func:`~QgsAnnotation.frameOffsetFromReferencePointMm` instead
%End

void setFrameOffsetFromReferencePointMm( QPointF offset );
Expand Down Expand Up @@ -189,7 +189,7 @@ the annotation's content is drawn).
.. seealso:: :py:func:`frameSize`

.. deprecated::
use setFrameSizeMm() instead
use :py:func:`~QgsAnnotation.setFrameSizeMm` instead
%End

QSizeF frameSize() const /Deprecated/;
Expand All @@ -200,7 +200,7 @@ the annotation's content is drawn).
.. seealso:: :py:func:`setFrameSize`

.. deprecated::
use frameSizeMm() instead
use :py:func:`~QgsAnnotation.frameSizeMm` instead
%End

void setFrameSizeMm( QSizeF size );
Expand Down
Expand Up @@ -13,7 +13,7 @@
class QgsAnnotationItem
{
%Docstring
Abstract base class for annotation items which are drawn with QgsAnnotationLayers.
Abstract base class for annotation items which are drawn with :py:class:`QgsAnnotationLayers`.

.. versionadded:: 3.16
%End
Expand Down
Expand Up @@ -13,12 +13,12 @@ class QgsAnnotationItemAbstractMetadata
%Docstring
Stores metadata about one annotation item class.

A companion class, QgsAnnotationItemAbstractGuiMetadata, handles the
GUI behavior of QgsAnnotationItems.
A companion class, :py:class:`QgsAnnotationItemAbstractGuiMetadata`, handles the
GUI behavior of :py:class:`QgsAnnotationItems`.

.. note::

In C++ you can use QgsAnnotationItemMetadata convenience class.
In C++ you can use :py:class:`QgsAnnotationItemMetadata` convenience class.

.. versionadded:: 3.16
%End
Expand Down Expand Up @@ -70,7 +70,7 @@ class QgsAnnotationItemRegistry : QObject
%Docstring
Registry of available annotation item types.

QgsAnnotationItemRegistry is not usually directly created, but rather accessed through
:py:class:`QgsAnnotationItemRegistry` is not usually directly created, but rather accessed through
:py:func:`QgsApplication.annotationItemRegistry()`.

A companion class, :py:class:`QgsAnnotationItemGuiRegistry`, handles the GUI behavior
Expand Down
Expand Up @@ -18,7 +18,7 @@ class QgsAnnotationLayer : QgsMapLayer
Represents a map layer containing a set of georeferenced annotations, e.g. markers, lines, polygons or
text items.

Annotation layers store a set of QgsAnnotationItem items, which are rendered according to the item's
Annotation layers store a set of :py:class:`QgsAnnotationItem` items, which are rendered according to the item's
z-order.

.. versionadded:: 3.16
Expand Down
Expand Up @@ -13,13 +13,13 @@ class QgsAnnotationManager : QObject
{
%Docstring

Manages storage of a set of QgsAnnotation annotation objects.
Manages storage of a set of :py:class:`QgsAnnotation` annotation objects.

QgsAnnotationManager handles the storage, serializing and deserializing
of QgsAnnotations. Usually this class is not constructed directly, but
rather accessed through a QgsProject via :py:func:`QgsProject.annotationManager()`.
:py:class:`QgsAnnotationManager` handles the storage, serializing and deserializing
of :py:class:`QgsAnnotations`. Usually this class is not constructed directly, but
rather accessed through a :py:class:`QgsProject` via :py:func:`QgsProject.annotationManager()`.

QgsAnnotationManager retains ownership of all the annotations contained
:py:class:`QgsAnnotationManager` retains ownership of all the annotations contained
in the manager.

.. versionadded:: 3.0
Expand Down
4 changes: 2 additions & 2 deletions python/core/auto_generated/auth/qgsauthconfig.sip.in
Expand Up @@ -40,7 +40,7 @@ Gets 'authcfg' 7-character alphanumeric ID of the config

.. note::

This is set by QgsAuthManager when the config is initially stored
This is set by :py:class:`QgsAuthManager` when the config is initially stored
%End
void setId( const QString &id );
%Docstring
Expand Down Expand Up @@ -90,7 +90,7 @@ The extended configuration, as stored and retrieved from the authentication data

.. note::

This is an internal construct used by QgsAuthManager that should generally not be set by client code
This is an internal construct used by :py:class:`QgsAuthManager` that should generally not be set by client code
%End

void loadConfigString( const QString &configstr );
Expand Down
4 changes: 2 additions & 2 deletions python/core/auto_generated/auth/qgsauthmanager.sip.in
Expand Up @@ -19,7 +19,7 @@ class QgsAuthManager : QObject
Singleton offering an interface to manage the authentication configuration database
and to utilize configurations through various authentication method plugins

QgsAuthManager should not usually be directly created, but rather accessed through
:py:class:`QgsAuthManager` should not usually be directly created, but rather accessed through
:py:func:`QgsApplication.authManager()`.
%End

Expand Down Expand Up @@ -353,7 +353,7 @@ Provider call to update a QNetworkReply with an authentication config (used to s
bool updateDataSourceUriItems( QStringList &connectionItems /In,Out/, const QString &authcfg,
const QString &dataprovider = QString() );
%Docstring
Provider call to update a QgsDataSourceUri with an authentication config
Provider call to update a :py:class:`QgsDataSourceUri` with an authentication config

:param connectionItems: The connection items, e.g. username=myname, of :py:class:`QgsDataSourceUri`
:param authcfg: Associated authentication config id
Expand Down

0 comments on commit 50b9bea

Please sign in to comment.