Slight improvements to Python docs

This commit is contained in:
Nyall Dawson 2019-02-04 08:18:37 +10:00
parent 109fcc0abc
commit 4b0f6b756c
6 changed files with 12 additions and 12 deletions

View File

@ -42,7 +42,7 @@ Returns encoded representation of the object
QgsVectorLayer *vectorLayer( bool &owner, QString &error ) const;
%Docstring
Gets vector layer from uri if possible, otherwise returns 0 and error is set
Gets vector layer from uri if possible, otherwise returns None and error is set
:param owner: set to true if caller becomes owner
:param error: set to error message if cannot get vector
@ -50,7 +50,7 @@ Gets vector layer from uri if possible, otherwise returns 0 and error is set
QgsRasterLayer *rasterLayer( bool &owner, QString &error ) const;
%Docstring
Gets raster layer from uri if possible, otherwise returns 0 and error is set
Gets raster layer from uri if possible, otherwise returns None and error is set
:param owner: set to true if caller becomes owner
:param error: set to error message if cannot get raster
@ -58,7 +58,7 @@ Gets raster layer from uri if possible, otherwise returns 0 and error is set
QgsMeshLayer *meshLayer( bool &owner, QString &error ) const;
%Docstring
Gets mesh layer from uri if possible, otherwise returns 0 and error is set
Gets mesh layer from uri if possible, otherwise returns None and error is set
:param owner: set to true if caller becomes owner
:param error: set to error message if cannot get raster

View File

@ -225,7 +225,7 @@ In contrast to addGeometry(), this method does also change the geometry type of
:param geom: the geometry object
:param layer: the layer containing the feature, used for coord transformation to map
crs. In case of 0 pointer, the coordinates are not going to be transformed.
crs. If ``layer`` is None, the coordinates are not going to be transformed.
%End
void setToGeometry( const QgsGeometry &geometry, const QgsCoordinateReferenceSystem &crs = QgsCoordinateReferenceSystem() );
@ -256,7 +256,7 @@ setToGeometry() is also to be preferred for backwards-compatibility.
:param geometry: the geometry object. Will be treated as a collection of vertices.
:param layer: the layer containing the feature, used for coord transformation to map
crs. In case of 0 pointer, the coordinates are not going to be transformed.
crs. If ``layer`` is None, the coordinates are not going to be transformed.
%End
void addGeometry( const QgsGeometry &geometry, const QgsCoordinateReferenceSystem &crs = QgsCoordinateReferenceSystem() );

View File

@ -68,7 +68,7 @@ be modified by users.
%Docstring
Returns the current editable scope for the widget.
:return: editable scope, or 0 if no editable scope is set
:return: editable scope, or None if no editable scope is set
.. seealso:: :py:func:`setEditableScopeIndex`
%End

View File

@ -52,21 +52,21 @@ class CORE_EXPORT QgsMimeDataUtils
QString data() const;
/**
* Gets vector layer from uri if possible, otherwise returns 0 and error is set
* Gets vector layer from uri if possible, otherwise returns nullptr and error is set
* \param owner set to true if caller becomes owner
* \param error set to error message if cannot get vector
*/
QgsVectorLayer *vectorLayer( bool &owner, QString &error ) const;
/**
* Gets raster layer from uri if possible, otherwise returns 0 and error is set
* Gets raster layer from uri if possible, otherwise returns nullptr and error is set
* \param owner set to true if caller becomes owner
* \param error set to error message if cannot get raster
*/
QgsRasterLayer *rasterLayer( bool &owner, QString &error ) const;
/**
* Gets mesh layer from uri if possible, otherwise returns 0 and error is set
* Gets mesh layer from uri if possible, otherwise returns nullptr and error is set
* \param owner set to true if caller becomes owner
* \param error set to error message if cannot get raster
*/

View File

@ -256,7 +256,7 @@ class GUI_EXPORT QgsRubberBand : public QObject, public QgsMapCanvasItem
* In contrast to addGeometry(), this method does also change the geometry type of the rubberband.
* \param geom the geometry object
* \param layer the layer containing the feature, used for coord transformation to map
* crs. In case of 0 pointer, the coordinates are not going to be transformed.
* crs. If \a layer is nullptr, the coordinates are not going to be transformed.
*/
void setToGeometry( const QgsGeometry &geom, QgsVectorLayer *layer );
@ -286,7 +286,7 @@ class GUI_EXPORT QgsRubberBand : public QObject, public QgsMapCanvasItem
*
* \param geometry the geometry object. Will be treated as a collection of vertices.
* \param layer the layer containing the feature, used for coord transformation to map
* crs. In case of 0 pointer, the coordinates are not going to be transformed.
* crs. If \a layer is nullptr, the coordinates are not going to be transformed.
*/
void addGeometry( const QgsGeometry &geometry, QgsVectorLayer *layer );

View File

@ -82,7 +82,7 @@ class GUI_EXPORT QgsVariableEditorWidget : public QWidget
/**
* Returns the current editable scope for the widget.
* \returns editable scope, or 0 if no editable scope is set
* \returns editable scope, or nullptr if no editable scope is set
* \see setEditableScopeIndex()
*/
QgsExpressionContextScope *editableScope() const;