Skip to content
Permalink
Browse files

Slight improvements to Python docs

(cherry picked from commit 4b0f6b7)
  • Loading branch information
nyalldawson committed Feb 7, 2019
1 parent 33987fa commit abc4cf5e69414ef0671e264e100d7cfe315b6a7d
@@ -42,23 +42,23 @@ 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
%End

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
%End

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
@@ -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() );
@@ -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
@@ -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
*/
@@ -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 );

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

0 comments on commit abc4cf5

Please sign in to comment.
You can’t perform that action at this time.