Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Expand docs
  • Loading branch information
nyalldawson authored and github-actions[bot] committed Apr 22, 2023
1 parent 4baab6d commit b2bb25a
Show file tree
Hide file tree
Showing 4 changed files with 186 additions and 16 deletions.
Expand Up @@ -80,22 +80,65 @@ Returns whether this style is enabled (used for rendering)

void setMinZoomLevel( int minZoom );
%Docstring
Sets minimum zoom level index (negative number means no limit)
Sets minimum zoom level index (negative number means no limit).

The style will be rendered if the zoom level is greater than or equal
to ``minZoom``.

.. seealso:: :py:func:`minZoomLevel`

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

int minZoomLevel() const;
%Docstring
Returns minimum zoom level index (negative number means no limit)
Returns the minimum zoom level index (negative number means no limit).

The style will be rendered if the zoom level is greater than or equal
to the this level.

.. seealso:: :py:func:`setMinZoomLevel`

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

void setMaxZoomLevel( int maxZoom );
%Docstring
Sets maximum zoom level index (negative number means no limit)
Sets maximum zoom level index (negative number means no limit).

The style will be rendered if the zoom level is less than or equal
to ``maxZoom``.

.. warning::

This differs from the handling of the max zoom as defined
in the MapBox Style Specifications, where the style is rendered
only if the zoom level is less than the maximum zoom.

.. seealso:: :py:func:`maxZoomLevel`

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

int maxZoomLevel() const;
%Docstring
Returns maxnimum zoom level index (negative number means no limit)
Returns the maximum zoom level index (negative number means no limit).

The style will be rendered if the zoom level is less than or equal
to the maximum zoom.

.. warning::

This differs from the handling of the max zoom as defined
in the MapBox Style Specifications, where the style is rendered
only if the zoom level is less than the maximum zoom.

.. seealso:: :py:func:`setMaxZoomLevel`

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


bool isActive( int zoomLevel ) const;
%Docstring
Returns whether the style is active at given zoom level (also checks "enabled" flag)
Expand Down
Expand Up @@ -100,20 +100,62 @@ Returns whether this style is enabled (used for rendering)

void setMinZoomLevel( int minZoom );
%Docstring
Sets minimum zoom level index (negative number means no limit)
Sets minimum zoom level index (negative number means no limit).

The style will be rendered if the zoom level is greater than or equal
to ``minZoom``.

.. seealso:: :py:func:`minZoomLevel`

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

int minZoomLevel() const;
%Docstring
Returns minimum zoom level index (negative number means no limit)
Returns the minimum zoom level index (negative number means no limit).

The style will be rendered if the zoom level is greater than or equal
to the this level.

.. seealso:: :py:func:`setMinZoomLevel`

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

void setMaxZoomLevel( int maxZoom );
%Docstring
Sets maximum zoom level index (negative number means no limit)
Sets maximum zoom level index (negative number means no limit).

The style will be rendered if the zoom level is less than or equal
to ``maxZoom``.

.. warning::

This differs from the handling of the max zoom as defined
in the MapBox Style Specifications, where the style is rendered
only if the zoom level is less than the maximum zoom.

.. seealso:: :py:func:`maxZoomLevel`

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

int maxZoomLevel() const;
%Docstring
Returns maxnimum zoom level index (negative number means no limit)
Returns the maximum zoom level index (negative number means no limit).

The style will be rendered if the zoom level is less than or equal
to the maximum zoom.

.. warning::

This differs from the handling of the max zoom as defined
in the MapBox Style Specifications, where the style is rendered
only if the zoom level is less than the maximum zoom.

.. seealso:: :py:func:`setMaxZoomLevel`

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

bool isActive( int zoomLevel ) const;
Expand Down
51 changes: 47 additions & 4 deletions src/core/vectortile/qgsvectortilebasiclabeling.h
Expand Up @@ -62,16 +62,59 @@ class CORE_EXPORT QgsVectorTileBasicLabelingStyle
//! Returns whether this style is enabled (used for rendering)
bool isEnabled() const { return mEnabled; }

//! Sets minimum zoom level index (negative number means no limit)
/**
* Sets minimum zoom level index (negative number means no limit).
*
* The style will be rendered if the zoom level is greater than or equal
* to \a minZoom.
*
* \see minZoomLevel()
* \see setMaxZoomLevel()
*/
void setMinZoomLevel( int minZoom ) { mMinZoomLevel = minZoom; }
//! Returns minimum zoom level index (negative number means no limit)

/**
* Returns the minimum zoom level index (negative number means no limit).
*
* The style will be rendered if the zoom level is greater than or equal
* to the this level.
*
* \see setMinZoomLevel()
* \see maxZoomLevel()
*/
int minZoomLevel() const { return mMinZoomLevel; }

//! Sets maximum zoom level index (negative number means no limit)
/**
* Sets maximum zoom level index (negative number means no limit).
*
* The style will be rendered if the zoom level is less than or equal
* to \a maxZoom.
*
* \warning This differs from the handling of the max zoom as defined
* in the MapBox Style Specifications, where the style is rendered
* only if the zoom level is less than the maximum zoom.
*
* \see maxZoomLevel()
* \see setMinZoomLevel()
*/
void setMaxZoomLevel( int maxZoom ) { mMaxZoomLevel = maxZoom; }
//! Returns maxnimum zoom level index (negative number means no limit)

/**
* Returns the maximum zoom level index (negative number means no limit).
*
* The style will be rendered if the zoom level is less than or equal
* to the maximum zoom.
*
* \warning This differs from the handling of the max zoom as defined
* in the MapBox Style Specifications, where the style is rendered
* only if the zoom level is less than the maximum zoom.
*
* \see setMaxZoomLevel()
* \see minZoomLevel()
*/
int maxZoomLevel() const { return mMaxZoomLevel; }


//! Returns whether the style is active at given zoom level (also checks "enabled" flag)
bool isActive( int zoomLevel ) const
{
Expand Down
50 changes: 46 additions & 4 deletions src/core/vectortile/qgsvectortilebasicrenderer.h
Expand Up @@ -84,14 +84,56 @@ class CORE_EXPORT QgsVectorTileBasicRendererStyle
//! Returns whether this style is enabled (used for rendering)
bool isEnabled() const { return mEnabled; }

//! Sets minimum zoom level index (negative number means no limit)
/**
* Sets minimum zoom level index (negative number means no limit).
*
* The style will be rendered if the zoom level is greater than or equal
* to \a minZoom.
*
* \see minZoomLevel()
* \see setMaxZoomLevel()
*/
void setMinZoomLevel( int minZoom ) { mMinZoomLevel = minZoom; }
//! Returns minimum zoom level index (negative number means no limit)

/**
* Returns the minimum zoom level index (negative number means no limit).
*
* The style will be rendered if the zoom level is greater than or equal
* to the this level.
*
* \see setMinZoomLevel()
* \see maxZoomLevel()
*/
int minZoomLevel() const { return mMinZoomLevel; }

//! Sets maximum zoom level index (negative number means no limit)
/**
* Sets maximum zoom level index (negative number means no limit).
*
* The style will be rendered if the zoom level is less than or equal
* to \a maxZoom.
*
* \warning This differs from the handling of the max zoom as defined
* in the MapBox Style Specifications, where the style is rendered
* only if the zoom level is less than the maximum zoom.
*
* \see maxZoomLevel()
* \see setMinZoomLevel()
*/
void setMaxZoomLevel( int maxZoom ) { mMaxZoomLevel = maxZoom; }
//! Returns maxnimum zoom level index (negative number means no limit)

/**
* Returns the maximum zoom level index (negative number means no limit).
*
* The style will be rendered if the zoom level is less than or equal
* to the maximum zoom.
*
* \warning This differs from the handling of the max zoom as defined
* in the MapBox Style Specifications, where the style is rendered
* only if the zoom level is less than the maximum zoom.
*
* \see setMaxZoomLevel()
* \see minZoomLevel()
*/
int maxZoomLevel() const { return mMaxZoomLevel; }

//! Returns whether the style is active at given zoom level (also checks "enabled" flag)
Expand Down

0 comments on commit b2bb25a

Please sign in to comment.