Skip to content

Commit

Permalink
Fix GeometryType in documentation:
Browse files Browse the repository at this point in the history
QgsWkbTypes::GeometryType to Qgis::GeometryType
and QgsWkbTypes::<geometry>Geometry to Qgis::GeometryType::<geometry>
  • Loading branch information
Alexey Karandashev authored and nyalldawson committed Mar 31, 2023
1 parent f7410c6 commit 30700f1
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion python/core/auto_generated/geometry/qgswkbtypes.sip.in
Expand Up @@ -191,7 +191,7 @@ Invalid geometry types will return a dimension of 0.
%Docstring
Returns the geometry type for a WKB type, e.g., both MultiPolygon and CurvePolygon would have a
PolygonGeometry geometry type.
GeometryCollections are reported as QgsWkbTypes.UnknownGeometry.
GeometryCollections are reported as Qgis.GeometryType.Unknown.
%End

static QString displayString( Qgis::WkbType type ) /HoldGIL/;
Expand Down
Expand Up @@ -1848,7 +1848,7 @@ A geometry parameter for processing algorithms.
%Docstring
Constructor for QgsProcessingParameterGeometry.

The ``geometryTypes`` argument allows for specifying a list of geometry types (see :py:class:`QgsWkbTypes`.GeometryType) acceptable for this
The ``geometryTypes`` argument allows for specifying a list of geometry types (see Qgis.GeometryType) acceptable for this
parameter. Passing a empty list will allow for any type of geometry.
The ``allowMultiPart`` argument allows specifying a multi part geometry
%End
Expand All @@ -1875,14 +1875,14 @@ Returns the type name for the parameter class.

QList<int> geometryTypes() const;
%Docstring
Returns the parameter allowed geometries, as a list of :py:class:`QgsWkbTypes`.GeometryType values.
Returns the parameter allowed geometries, as a list of Qgis.GeometryType values.

.. seealso:: :py:func:`setGeometryTypes`
%End

void setGeometryTypes( const QList<int> &geometryTypes );
%Docstring
Sets the allowed ``geometryTypes``, as a list of :py:class:`QgsWkbTypes`.GeometryType values.
Sets the allowed ``geometryTypes``, as a list of Qgis.GeometryType values.

.. seealso:: :py:func:`geometryTypes`
%End
Expand Down
2 changes: 1 addition & 1 deletion python/core/auto_generated/symbology/qgsstyle.sip.in
Expand Up @@ -400,7 +400,7 @@ with the specified ``name``, or an empty list if a matching 3d symbol is not pre
Qgis::GeometryType labelSettingsLayerType( const QString &name ) const;
%Docstring
Returns the layer geometry type corresponding to the label settings
with the specified ``name``, or :py:class:`QgsWkbTypes`.UnknownGeometry
with the specified ``name``, or Qgis.GeometryType.Unknown
if matching label settings are not present.

.. versionadded:: 3.10
Expand Down
4 changes: 2 additions & 2 deletions python/core/auto_generated/symbology/qgsstylemodel.sip.in
Expand Up @@ -234,7 +234,7 @@ no effect on non-symbol entities (i.e. color ramps).

Qgis::GeometryType layerType() const;
%Docstring
Returns the layer type filter, or :py:class:`QgsWkbTypes`.UnknownGeometry if no
Returns the layer type filter, or Qgis.GeometryType.Unknown if no
layer type filter is present.

This setting has an effect on label settings entities and 3d symbols only.
Expand All @@ -244,7 +244,7 @@ This setting has an effect on label settings entities and 3d symbols only.

void setLayerType( Qgis::GeometryType type );
%Docstring
Sets the layer ``type`` filter. Set ``type`` to :py:class:`QgsWkbTypes`.UnknownGeometry if no
Sets the layer ``type`` filter. Set ``type`` to Qgis.GeometryType.Unknown if no
layer type filter is desired.

.. seealso:: :py:func:`layerType`
Expand Down
2 changes: 1 addition & 1 deletion python/gui/auto_generated/qgsrubberband.sip.in
Expand Up @@ -72,7 +72,7 @@ Creates a new RubberBand.
Its CRS will be used to map points onto screen coordinates.
The ownership is transferred to this canvas.
:param geometryType: Defines how the data should be drawn onto the screen.
:py:class:`QgsWkbTypes`.LineGeometry, :py:class:`QgsWkbTypes`.PolygonGeometry or :py:class:`QgsWkbTypes`.PointGeometry
Qgis.GeometryType.Line, Qgis.GeometryType.Polygon or Qgis.GeometryType.Point
%End
~QgsRubberBand();

Expand Down
2 changes: 1 addition & 1 deletion python/gui/auto_generated/qgsstyleitemslistwidget.sip.in
Expand Up @@ -55,7 +55,7 @@ Sets the ``type`` of symbols to show in the widget.

void setLayerType( Qgis::GeometryType type );
%Docstring
Sets the layer ``type`` to show in the widget. Set ``type`` to :py:class:`QgsWkbTypes`.UnknownGeometry if no
Sets the layer ``type`` to show in the widget. Set ``type`` to Qgis.GeometryType.Unknown if no
layer type filter is desired.

This setting only applies to label settings and 3d style entities.
Expand Down
2 changes: 1 addition & 1 deletion src/core/geometry/qgswkbtypes.h
Expand Up @@ -860,7 +860,7 @@ class CORE_EXPORT QgsWkbTypes
/**
* Returns the geometry type for a WKB type, e.g., both MultiPolygon and CurvePolygon would have a
* PolygonGeometry geometry type.
* GeometryCollections are reported as QgsWkbTypes::UnknownGeometry.
* GeometryCollections are reported as Qgis::GeometryType::Unknown.
*/
static Qgis::GeometryType geometryType( Qgis::WkbType type ) SIP_HOLDGIL
{
Expand Down
6 changes: 3 additions & 3 deletions src/core/processing/qgsprocessingparameters.h
Expand Up @@ -1903,7 +1903,7 @@ class CORE_EXPORT QgsProcessingParameterGeometry : public QgsProcessingParameter
/**
* Constructor for QgsProcessingParameterGeometry.
*
* The \a geometryTypes argument allows for specifying a list of geometry types (see QgsWkbTypes::GeometryType) acceptable for this
* The \a geometryTypes argument allows for specifying a list of geometry types (see Qgis::GeometryType) acceptable for this
* parameter. Passing a empty list will allow for any type of geometry.
* The \a allowMultiPart argument allows specifying a multi part geometry
*/
Expand All @@ -1923,13 +1923,13 @@ class CORE_EXPORT QgsProcessingParameterGeometry : public QgsProcessingParameter
bool fromVariantMap( const QVariantMap &map ) override;

/**
* Returns the parameter allowed geometries, as a list of QgsWkbTypes::GeometryType values.
* Returns the parameter allowed geometries, as a list of Qgis::GeometryType values.
* \see setGeometryTypes()
*/
QList<int> geometryTypes() const { return mGeomTypes; }

/**
* Sets the allowed \a geometryTypes, as a list of QgsWkbTypes::GeometryType values.
* Sets the allowed \a geometryTypes, as a list of Qgis::GeometryType values.
* \see geometryTypes()
*/
void setGeometryTypes( const QList<int> &geometryTypes ) { mGeomTypes = geometryTypes; }
Expand Down
2 changes: 1 addition & 1 deletion src/core/symbology/qgsstyle.h
Expand Up @@ -452,7 +452,7 @@ class CORE_EXPORT QgsStyle : public QObject

/**
* Returns the layer geometry type corresponding to the label settings
* with the specified \a name, or QgsWkbTypes::UnknownGeometry
* with the specified \a name, or Qgis::GeometryType::Unknown
* if matching label settings are not present.
*
* \since QGIS 3.10
Expand Down
4 changes: 2 additions & 2 deletions src/core/symbology/qgsstylemodel.h
Expand Up @@ -344,7 +344,7 @@ class CORE_EXPORT QgsStyleProxyModel: public QSortFilterProxyModel
void setSymbolTypeFilterEnabled( bool enabled );

/**
* Returns the layer type filter, or QgsWkbTypes::UnknownGeometry if no
* Returns the layer type filter, or Qgis::GeometryType::Unknown if no
* layer type filter is present.
*
* This setting has an effect on label settings entities and 3d symbols only.
Expand All @@ -354,7 +354,7 @@ class CORE_EXPORT QgsStyleProxyModel: public QSortFilterProxyModel
Qgis::GeometryType layerType() const;

/**
* Sets the layer \a type filter. Set \a type to QgsWkbTypes::UnknownGeometry if no
* Sets the layer \a type filter. Set \a type to Qgis::GeometryType::Unknown if no
* layer type filter is desired.
*
* \see layerType()
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsrubberband.h
Expand Up @@ -137,7 +137,7 @@ class GUI_EXPORT QgsRubberBand : public QgsMapCanvasItem
* Its CRS will be used to map points onto screen coordinates.
* The ownership is transferred to this canvas.
* \param geometryType Defines how the data should be drawn onto the screen.
* QgsWkbTypes::LineGeometry, QgsWkbTypes::PolygonGeometry or QgsWkbTypes::PointGeometry
* Qgis::GeometryType::Line, Qgis::GeometryType::Polygon or Qgis::GeometryType::Point
*/
QgsRubberBand( QgsMapCanvas *mapCanvas SIP_TRANSFERTHIS, Qgis::GeometryType geometryType = Qgis::GeometryType::Line );
~QgsRubberBand() override;
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsstyleitemslistwidget.h
Expand Up @@ -117,7 +117,7 @@ class GUI_EXPORT QgsStyleItemsListWidget : public QWidget, private Ui::QgsStyleI
void setSymbolType( Qgis::SymbolType type );

/**
* Sets the layer \a type to show in the widget. Set \a type to QgsWkbTypes::UnknownGeometry if no
* Sets the layer \a type to show in the widget. Set \a type to Qgis::GeometryType::Unknown if no
* layer type filter is desired.
*
* This setting only applies to label settings and 3d style entities.
Expand Down
8 changes: 4 additions & 4 deletions tests/code_layout/acceptable_missing_doc.py
Expand Up @@ -253,7 +253,7 @@
"QgsMeshRendererMeshSettingsWidget": ["MeshType"],
"QgsLayerTreeNode": ["QgsLayerTreeNode(const QgsLayerTreeNode &other)"],
"QgsRasterResampleFilter": ["zoomedInResampler() const", "maxOversampling() const", "zoomedOutResampler() const", "QgsRasterResampleFilter(QgsRasterInterface *input=nullptr)", "setMaxOversampling(double os)"],
"QgsRuleBasedRenderer": ["FeatureFlags", "rootRule()", "createFromSld(QDomElement &element, QgsWkbTypes::GeometryType geomType)"],
"QgsRuleBasedRenderer": ["FeatureFlags", "rootRule()", "createFromSld(QDomElement &element, Qgis::GeometryType geomType)"],
"QgsRangeConfigDlg": ["QgsRangeConfigDlg(QgsVectorLayer *vl, int fieldIdx, QWidget *parent)", "rangeWidgetChanged(int index)"],
"QgsManageConnectionsDialog": ["doExportImport()", "selectionChanged()", "clearSelection()", "Type", "selectAll()", "Mode"],
"QgsRelationReferenceConfigDlg": ["QgsRelationReferenceConfigDlg(QgsVectorLayer *vl, int fieldIdx, QWidget *parent)"],
Expand Down Expand Up @@ -291,7 +291,7 @@
"QgsRasterCalcNode": ["QgsRasterCalcNode(const QString &rasterName)", "parseRasterCalcString(const QString &str, QString &parserErrorMsg)", "QgsRasterCalcNode(Operator op, QgsRasterCalcNode *left, QgsRasterCalcNode *right)", "QgsRasterCalcNode(double number)", "setRight(QgsRasterCalcNode *right)", "type() const", "setLeft(QgsRasterCalcNode *left)", "QgsRasterCalcNode(QgsRasterMatrix *matrix)"],
"QgsPluginLayer": ["QgsPluginLayer(const QString &layerType, const QString &layerName=QString())"],
"QgsGlowEffect": ["QgsGlowEffect(const QgsGlowEffect &other)"],
"QgsMapToolEdit": ["createGeometryRubberBand(QgsWkbTypes::GeometryType geometryType=QgsWkbTypes::LineGeometry, bool alternativeBand=false) const", "QgsMapToolEdit(QgsMapCanvas *canvas)"],
"QgsMapToolEdit": ["createGeometryRubberBand(Qgis::GeometryType geometryType=Qgis::GeometryType::Line, bool alternativeBand=false) const", "QgsMapToolEdit(QgsMapCanvas *canvas)"],
"QgsMeshDatasetGroupTreeWidget": ["datasetGroupAdded()"],
"QgsMimeDataUtils": ["decodeUriList(const QMimeData *data)", "isUriList(const QMimeData *data)"],
"QgsTextDiagram": ["Shape", "Orientation"],
Expand Down Expand Up @@ -345,7 +345,7 @@
"QgsLUDialog": ["QgsLUDialog(QWidget *parent=nullptr, Qt::WindowFlags fl=QgsGuiUtils::ModalDialogFlags)", "upperValue() const", "setUpperValue(const QString &val)", "setLowerValue(const QString &val)", "lowerValue() const"],
"QgsIFeatureSelectionManager": ["QgsIFeatureSelectionManager(QObject *parent)"],
"QgsAttributeEditorContext": ["QgsAttributeEditorContext(const QgsAttributeEditorContext &parentContext, FormMode formMode)", "parentContext() const", "FormMode", "QgsAttributeEditorContext(const QgsAttributeEditorContext &parentContext, const QgsRelation &relation, RelationMode relationMode, FormMode widgetMode)"],
"QgsGeometryRubberBand": ["QgsGeometryRubberBand(QgsMapCanvas *mapCanvas, QgsWkbTypes::GeometryType geomType=QgsWkbTypes::LineGeometry)", "IconType"],
"QgsGeometryRubberBand": ["QgsGeometryRubberBand(QgsMapCanvas *mapCanvas, Qgis::GeometryType geomType=Qgis::GeometryType::Line)", "IconType"],
"QgsExpressionHighlighter": ["addFields(const QStringList &fieldList)", "QgsExpressionHighlighter(QTextDocument *parent=nullptr)"],
"QgsErrorMessage": ["tag() const", "message() const", "line() const", "file() const", "function() const"],
"QgsSingleSymbolRendererWidget": ["create(QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer)", "QgsSingleSymbolRendererWidget(QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer)"],
Expand Down Expand Up @@ -417,7 +417,7 @@
"QgsRasterRendererWidget": ["stdDev()", "selectedBand(int index=0)", "max(int index=0)", "setStdDev(const QString &value)", "setMin(const QString &value, int index=0)", "setMax(const QString &value, int index=0)", "QgsRasterRendererWidget(QgsRasterLayer *layer, const QgsRectangle &extent)", "min(int index=0)"],
"QgsSymbolLevelItem": ["QgsSymbolLevelItem(QgsSymbol *symbol, int layer)"],
"QgsPaintEffect": ["QgsPaintEffect(const QgsPaintEffect &other)"],
"QgsRendererAbstractMetadata": ["createRendererFromSld(QDomElement &elem, QgsWkbTypes::GeometryType geomType)"],
"QgsRendererAbstractMetadata": ["createRendererFromSld(QDomElement &elem, Qgis::GeometryType geomType)"],
"QgsPenJoinStyleComboBox": ["QgsPenJoinStyleComboBox(QWidget *parent=nullptr)", "penJoinStyle() const", "setPenJoinStyle(Qt::PenJoinStyle style)"],
"QgsRasterBandStats": ["Stats"],
"QgsPalettedRasterRenderer": ["create(const QDomElement &elem, QgsRasterInterface *input)"],
Expand Down

0 comments on commit 30700f1

Please sign in to comment.