Skip to content

Commit

Permalink
Fix documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 18, 2024
1 parent b392630 commit c33b8b2
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 21 deletions.
14 changes: 7 additions & 7 deletions python/PyQt6/core/auto_generated/raster/qgsrasterlabeling.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -261,13 +261,13 @@ Returns the maximum map scale (i.e. most "zoomed in" scale) at which the labels
The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map.
A scale of 0 indicates no maximum scale visibility.

This setting is only considered if :py:func:`~QgsRasterLayerSimpleLabeling.scaleVisibility` is ``True``.
This setting is only considered if :py:func:`~QgsRasterLayerSimpleLabeling.hasScaleBasedVisibility` is ``True``.

.. seealso:: :py:func:`setMaximumScale`

.. seealso:: :py:func:`minimumScale`

.. seealso:: :py:func:`scaleVisibility`
.. seealso:: :py:func:`hasScaleBasedVisibility`
%End

void setMaximumScale( double scale );
Expand All @@ -277,7 +277,7 @@ Sets the maximum map ``scale`` (i.e. most "zoomed in" scale) at which the labels
The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map.
A scale of 0 indicates no maximum scale visibility.

This setting is only considered if :py:func:`~QgsRasterLayerSimpleLabeling.scaleVisibility` is ``True``.
This setting is only considered if :py:func:`~QgsRasterLayerSimpleLabeling.hasScaleBasedVisibility` is ``True``.

.. seealso:: :py:func:`maximumScale`

Expand All @@ -293,13 +293,13 @@ Returns the minimum map scale (i.e. most "zoomed out" scale) at which the labels
The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map.
A scale of 0 indicates no minimum scale visibility.

This setting is only considered if :py:func:`~QgsRasterLayerSimpleLabeling.scaleVisibility` is ``True``.
This setting is only considered if :py:func:`~QgsRasterLayerSimpleLabeling.hasScaleBasedVisibility` is ``True``.

.. seealso:: :py:func:`setMinimumScale`

.. seealso:: :py:func:`maximumScale`

.. seealso:: :py:func:`scaleVisibility`
.. seealso:: :py:func:`hasScaleBasedVisibility`
%End

void setMinimumScale( double scale );
Expand All @@ -309,13 +309,13 @@ Sets the minimum map ``scale`` (i.e. most "zoomed out" scale) at which the label
The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map.
A scale of 0 indicates no minimum scale visibility.

This setting is only considered if :py:func:`~QgsRasterLayerSimpleLabeling.scaleVisibility` is ``True``.
This setting is only considered if :py:func:`~QgsRasterLayerSimpleLabeling.hasScaleBasedVisibility` is ``True``.

.. seealso:: :py:func:`minimumScale`

.. seealso:: :py:func:`setMaximumScale`

.. seealso:: :py:func:`scaleVisibility`
.. seealso:: :py:func:`hasScaleBasedVisibility`
%End

void setScaleBasedVisibility( bool enabled );
Expand Down
14 changes: 7 additions & 7 deletions python/core/auto_generated/raster/qgsrasterlabeling.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -261,13 +261,13 @@ Returns the maximum map scale (i.e. most "zoomed in" scale) at which the labels
The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map.
A scale of 0 indicates no maximum scale visibility.

This setting is only considered if :py:func:`~QgsRasterLayerSimpleLabeling.scaleVisibility` is ``True``.
This setting is only considered if :py:func:`~QgsRasterLayerSimpleLabeling.hasScaleBasedVisibility` is ``True``.

.. seealso:: :py:func:`setMaximumScale`

.. seealso:: :py:func:`minimumScale`

.. seealso:: :py:func:`scaleVisibility`
.. seealso:: :py:func:`hasScaleBasedVisibility`
%End

void setMaximumScale( double scale );
Expand All @@ -277,7 +277,7 @@ Sets the maximum map ``scale`` (i.e. most "zoomed in" scale) at which the labels
The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map.
A scale of 0 indicates no maximum scale visibility.

This setting is only considered if :py:func:`~QgsRasterLayerSimpleLabeling.scaleVisibility` is ``True``.
This setting is only considered if :py:func:`~QgsRasterLayerSimpleLabeling.hasScaleBasedVisibility` is ``True``.

.. seealso:: :py:func:`maximumScale`

Expand All @@ -293,13 +293,13 @@ Returns the minimum map scale (i.e. most "zoomed out" scale) at which the labels
The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map.
A scale of 0 indicates no minimum scale visibility.

This setting is only considered if :py:func:`~QgsRasterLayerSimpleLabeling.scaleVisibility` is ``True``.
This setting is only considered if :py:func:`~QgsRasterLayerSimpleLabeling.hasScaleBasedVisibility` is ``True``.

.. seealso:: :py:func:`setMinimumScale`

.. seealso:: :py:func:`maximumScale`

.. seealso:: :py:func:`scaleVisibility`
.. seealso:: :py:func:`hasScaleBasedVisibility`
%End

void setMinimumScale( double scale );
Expand All @@ -309,13 +309,13 @@ Sets the minimum map ``scale`` (i.e. most "zoomed out" scale) at which the label
The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map.
A scale of 0 indicates no minimum scale visibility.

This setting is only considered if :py:func:`~QgsRasterLayerSimpleLabeling.scaleVisibility` is ``True``.
This setting is only considered if :py:func:`~QgsRasterLayerSimpleLabeling.hasScaleBasedVisibility` is ``True``.

.. seealso:: :py:func:`minimumScale`

.. seealso:: :py:func:`setMaximumScale`

.. seealso:: :py:func:`scaleVisibility`
.. seealso:: :py:func:`hasScaleBasedVisibility`
%End

void setScaleBasedVisibility( bool enabled );
Expand Down
24 changes: 17 additions & 7 deletions src/core/raster/qgsrasterlabeling.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,25 @@ class QgsRasterLayerRendererFeedback;
class CORE_EXPORT QgsRasterLayerLabelProvider final : public QgsAbstractLabelProvider
{
public:

/**
* Constructor for QgsRasterLayerLabelProvider.
*/
explicit QgsRasterLayerLabelProvider( QgsRasterLayer *layer );

~QgsRasterLayerLabelProvider() final;
QList<QgsLabelFeature *> labelFeatures( QgsRenderContext & ) final;
void drawLabel( QgsRenderContext &context, pal::LabelPosition *label ) const final;
void startRender( QgsRenderContext &context ) final;

/**
* Generates the labels, given a render context and input pipe.
*/
void generateLabels( QgsRenderContext &context, QgsRasterPipe *pipe, QgsRasterViewPort *rasterViewPort, QgsRasterLayerRendererFeedback *feedback );

/**
* Adds a label at the specified point in map coordinates.
*/
void addLabel( const QgsPoint &mapPoint, const QString &text, QgsRenderContext &context );

/**
Expand Down Expand Up @@ -385,11 +395,11 @@ class CORE_EXPORT QgsRasterLayerSimpleLabeling : public QgsAbstractRasterLayerLa
* The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map.
* A scale of 0 indicates no maximum scale visibility.
*
* This setting is only considered if scaleVisibility() is TRUE.
* This setting is only considered if hasScaleBasedVisibility() is TRUE.
*
* \see setMaximumScale()
* \see minimumScale()
* \see scaleVisibility()
* \see hasScaleBasedVisibility()
*/
double maximumScale() const;

Expand All @@ -399,7 +409,7 @@ class CORE_EXPORT QgsRasterLayerSimpleLabeling : public QgsAbstractRasterLayerLa
* The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map.
* A scale of 0 indicates no maximum scale visibility.
*
* This setting is only considered if scaleVisibility() is TRUE.
* This setting is only considered if hasScaleBasedVisibility() is TRUE.
*
* \see maximumScale()
* \see setMinimumScale()
Expand All @@ -413,11 +423,11 @@ class CORE_EXPORT QgsRasterLayerSimpleLabeling : public QgsAbstractRasterLayerLa
* The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map.
* A scale of 0 indicates no minimum scale visibility.
*
* This setting is only considered if scaleVisibility() is TRUE.
* This setting is only considered if hasScaleBasedVisibility() is TRUE.
*
* \see setMinimumScale()
* \see maximumScale()
* \see scaleVisibility()
* \see hasScaleBasedVisibility()
*/
double minimumScale() const;

Expand All @@ -427,11 +437,11 @@ class CORE_EXPORT QgsRasterLayerSimpleLabeling : public QgsAbstractRasterLayerLa
* The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map.
* A scale of 0 indicates no minimum scale visibility.
*
* This setting is only considered if scaleVisibility() is TRUE.
* This setting is only considered if hasScaleBasedVisibility() is TRUE.
*
* \see minimumScale()
* \see setMaximumScale()
* \see scaleVisibility()
* \see hasScaleBasedVisibility()
*/
void setMinimumScale( double scale );

Expand Down
3 changes: 3 additions & 0 deletions src/gui/raster/qgsrasterlabelsettingswidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ class GUI_EXPORT QgsRasterLabelSettingsWidget : public QgsLabelingGui
QgsRasterLabelSettingsWidget( QgsRasterLayer *layer, QgsMapCanvas *mapCanvas, QWidget *parent = nullptr );
~QgsRasterLabelSettingsWidget() override;

/**
* Sets the \a labeling settings to show in the widget.
*/
void setLabeling( QgsAbstractRasterLayerLabeling *labeling );

/**
Expand Down

0 comments on commit c33b8b2

Please sign in to comment.