Skip to content

Commit

Permalink
Move server specific layer properties to QgsMapLayerServerProperties
Browse files Browse the repository at this point in the history
Eg server layer title, abstract, etc, and deprecate the related
methods at the QgsMapLayer level

This should avoid accidental creep of these specifically server-related
properties into wider use, and help disambiguate them from the
standard layer metadata properties
  • Loading branch information
nyalldawson committed Apr 10, 2024
1 parent 6a1b775 commit 3d59b88
Show file tree
Hide file tree
Showing 40 changed files with 1,058 additions and 534 deletions.
156 changes: 64 additions & 92 deletions python/PyQt6/core/auto_generated/qgsmaplayer.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -209,156 +209,132 @@ Returns the layer's data provider, it may be ``None``.
%End


void setShortName( const QString &shortName );
void setShortName( const QString &shortName ) /Deprecated/;
%Docstring
Sets the short name of the layer
used by QGIS Server to identify the layer.
Sets the short name of the layer used by QGIS Server to identify the layer.

.. seealso:: :py:func:`shortName`
.. deprecated:: QGIS 3.38
use :py:func:`~QgsMapLayer.serverProperties`->:py:func:`~QgsMapLayer.setShortName` instead.
%End

QString shortName() const;
QString shortName() const /Deprecated/;
%Docstring
Returns the short name of the layer
used by QGIS Server to identify the layer.
Returns the short name of the layer used by QGIS Server to identify the layer.

.. seealso:: :py:func:`setShortName`
.. deprecated:: QGIS 3.38
use :py:func:`~QgsMapLayer.serverProperties`->:py:func:`~QgsMapLayer.shortName` instead.
%End

void setTitle( const QString &title );
void setTitle( const QString &title ) /Deprecated/;
%Docstring
Sets the title of the layer
used by QGIS Server in GetCapabilities request.
Sets the title of the layer used by QGIS Server in GetCapabilities request.

.. seealso:: :py:func:`title`
.. deprecated:: QGIS 3.38
use :py:func:`~QgsMapLayer.serverProperties`->:py:func:`~QgsMapLayer.setTitle` instead.
%End

QString title() const;
QString title() const /Deprecated/;
%Docstring
Returns the title of the layer
used by QGIS Server in GetCapabilities request.
Returns the title of the layer used by QGIS Server in GetCapabilities request.

:return: the layer title

.. seealso:: :py:func:`setTitle`
.. deprecated:: QGIS 3.38
use :py:func:`~QgsMapLayer.serverProperties`->:py:func:`~QgsMapLayer.title` instead.
%End

void setAbstract( const QString &abstract );
void setAbstract( const QString &abstract ) /Deprecated/;
%Docstring
Sets the abstract of the layer
used by QGIS Server in GetCapabilities request.
Sets the abstract of the layer used by QGIS Server in GetCapabilities request.

.. seealso:: :py:func:`abstract`
.. deprecated:: QGIS 3.38
use :py:func:`~QgsMapLayer.serverProperties`->:py:func:`~QgsMapLayer.setAbstract` instead.
%End

QString abstract() const;
QString abstract() const /Deprecated/;
%Docstring
Returns the abstract of the layer
used by QGIS Server in GetCapabilities request.

:return: the layer abstract
Returns the abstract of the layer used by QGIS Server in GetCapabilities request.

.. seealso:: :py:func:`setAbstract`
.. deprecated:: QGIS 3.38
use :py:func:`~QgsMapLayer.serverProperties`->:py:func:`~QgsMapLayer.abstract` instead.
%End

void setKeywordList( const QString &keywords );
void setKeywordList( const QString &keywords ) /Deprecated/;
%Docstring
Sets the keyword list of the layer
used by QGIS Server in GetCapabilities request.
Sets the keyword list of the layerused by QGIS Server in GetCapabilities request.

.. seealso:: :py:func:`keywordList`
.. deprecated:: QGIS 3.38
use :py:func:`~QgsMapLayer.serverProperties`->:py:func:`~QgsMapLayer.setKeywordList` instead.
%End

QString keywordList() const;
QString keywordList() const /Deprecated/;
%Docstring
Returns the keyword list of the layer
used by QGIS Server in GetCapabilities request.

:return: the layer keyword list
Returns the keyword list of the layer used by QGIS Server in GetCapabilities request.

.. seealso:: :py:func:`setKeywordList`
.. deprecated:: QGIS 3.38
use :py:func:`~QgsMapLayer.serverProperties`->:py:func:`~QgsMapLayer.keywordList` instead.
%End


void setDataUrl( const QString &dataUrl );
void setDataUrl( const QString &dataUrl ) /Deprecated/;
%Docstring
Sets the DataUrl of the layer
used by QGIS Server in GetCapabilities request.
DataUrl is a a link to the underlying data represented by a particular layer.
Sets the DataUrl of the layer used by QGIS Server in GetCapabilities request.

.. seealso:: :py:func:`dataUrl`
.. deprecated:: QGIS 3.38
use :py:func:`~QgsMapLayer.serverProperties`->:py:func:`~QgsMapLayer.setDataUrl` instead.
%End

QString dataUrl() const;
QString dataUrl() const /Deprecated/;
%Docstring
Returns the DataUrl of the layer
used by QGIS Server in GetCapabilities request.
DataUrl is a a link to the underlying data represented by a particular layer.

:return: the layer DataUrl
Returns the DataUrl of the layer used by QGIS Server in GetCapabilities request.

.. seealso:: :py:func:`setDataUrl`
.. deprecated:: QGIS 3.38
use :py:func:`~QgsMapLayer.serverProperties`->:py:func:`~QgsMapLayer.dataUrl` instead.
%End

void setDataUrlFormat( const QString &dataUrlFormat );
void setDataUrlFormat( const QString &dataUrlFormat ) /Deprecated/;
%Docstring
Sets the DataUrl format of the layer
used by QGIS Server in GetCapabilities request.
DataUrl is a a link to the underlying data represented by a particular layer.
Sets the DataUrl format of the layer used by QGIS Server in GetCapabilities request.

.. seealso:: :py:func:`dataUrlFormat`
.. deprecated:: QGIS 3.38
use :py:func:`~QgsMapLayer.serverProperties`->:py:func:`~QgsMapLayer.setDataUrlFormat` instead.
%End

QString dataUrlFormat() const;
QString dataUrlFormat() const /Deprecated/;
%Docstring
Returns the DataUrl format of the layer
used by QGIS Server in GetCapabilities request.
DataUrl is a a link to the underlying data represented by a particular layer.

:return: the layer DataUrl format
Returns the DataUrl format of the layer used by QGIS Server in GetCapabilities request.

.. seealso:: :py:func:`setDataUrlFormat`
.. deprecated:: QGIS 3.38
use :py:func:`~QgsMapLayer.serverProperties`->:py:func:`~QgsMapLayer.dataUrlFormat` instead.
%End


void setAttribution( const QString &attrib );
void setAttribution( const QString &attrib ) /Deprecated/;
%Docstring
Sets the attribution of the layer
used by QGIS Server in GetCapabilities request.
Attribution indicates the provider of a layer or collection of layers.
Sets the attribution of the layerused by QGIS Server in GetCapabilities request.

.. seealso:: :py:func:`attribution`
.. deprecated:: QGIS 3.38
use :py:func:`~QgsMapLayer.serverProperties`->:py:func:`~QgsMapLayer.setAttribution` instead.
%End

QString attribution() const;
QString attribution() const /Deprecated/;
%Docstring
Returns the attribution of the layer
used by QGIS Server in GetCapabilities request.
Attribution indicates the provider of a layer or collection of layers.

:return: the layer attribution
Returns the attribution of the layer used by QGIS Server in GetCapabilities request.

.. seealso:: :py:func:`setAttribution`
.. deprecated:: QGIS 3.38
use :py:func:`~QgsMapLayer.serverProperties`->:py:func:`~QgsMapLayer.attribution` instead.
%End

void setAttributionUrl( const QString &attribUrl );
void setAttributionUrl( const QString &attribUrl ) /Deprecated/;
%Docstring
Sets the attribution URL of the layer
used by QGIS Server in GetCapabilities request.
Attribution indicates the provider of a layer or collection of layers.
Sets the attribution URL of the layer used by QGIS Server in GetCapabilities request.

.. seealso:: :py:func:`attributionUrl`
.. deprecated:: QGIS 3.38
use :py:func:`~QgsMapLayer.serverProperties`->:py:func:`~QgsMapLayer.setAttributionUrl` instead.
%End

QString attributionUrl() const;
QString attributionUrl() const /Deprecated/;
%Docstring
Returns the attribution URL of the layer
used by QGIS Server in GetCapabilities request.
Attribution indicates the provider of a layer or collection of layers.

:return: the layer attribution URL
Returns the attribution URL of the layer used by QGIS Server in GetCapabilities request.

.. seealso:: :py:func:`setAttributionUrl`
.. deprecated:: QGIS 3.38
use :py:func:`~QgsMapLayer.serverProperties`->:py:func:`~QgsMapLayer.attributionUrl` instead.
%End


Expand Down Expand Up @@ -2134,10 +2110,6 @@ happens.







bool hasDependencyCycle( const QSet<QgsMapLayerDependency> & ) const;
%Docstring
Checks whether a new set of dependencies will introduce a cycle
Expand Down
160 changes: 160 additions & 0 deletions python/PyQt6/core/auto_generated/qgsmaplayerserverproperties.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,166 @@ Reads server properties from project file.
Reset properties to default

.. versionadded:: 3.22
%End

void setShortName( const QString &name );
%Docstring
Sets the short ``name`` of the layer used by QGIS Server to identify the layer.

.. seealso:: :py:func:`shortName`

.. versionadded:: 3.38
%End

QString shortName() const;
%Docstring
Returns the short name of the layer used by QGIS Server to identify the layer.

.. seealso:: :py:func:`setShortName`

.. versionadded:: 3.38
%End

void setTitle( const QString &title );
%Docstring
Sets the ``title`` of the layer used by QGIS Server in GetCapabilities request.

.. seealso:: :py:func:`title`

.. versionadded:: 3.38
%End

QString title() const;
%Docstring
Returns the title of the layer used by QGIS Server in GetCapabilities request.

.. seealso:: :py:func:`setTitle`

.. versionadded:: 3.38
%End

void setAbstract( const QString &abstract );
%Docstring
Sets the ``abstract`` of the layer used by QGIS Server in GetCapabilities request.

.. seealso:: :py:func:`abstract`

.. versionadded:: 3.38
%End

QString abstract() const;
%Docstring
Returns the abstract of the layerused by QGIS Server in GetCapabilities request.

.. seealso:: :py:func:`setAbstract`

.. versionadded:: 3.38
%End

void setKeywordList( const QString &keywords );
%Docstring
Sets the ``keywords`` list of the layerused by QGIS Server in GetCapabilities request.

.. seealso:: :py:func:`keywordList`

.. versionadded:: 3.38
%End

QString keywordList() const;
%Docstring
Returns the keyword list of the layerused by QGIS Server in GetCapabilities request.

.. seealso:: :py:func:`setKeywordList`

.. versionadded:: 3.38
%End

void setDataUrl( const QString &dataUrl );
%Docstring
Sets the DataUrl of the layer used by QGIS Server in GetCapabilities request.

DataUrl is a a link to the underlying data represented by a particular layer.

.. seealso:: :py:func:`dataUrl`

.. versionadded:: 3.38
%End

QString dataUrl() const;
%Docstring
Returns the DataUrl of the layer used by QGIS Server in GetCapabilities request.

DataUrl is a a link to the underlying data represented by a particular layer.

.. seealso:: :py:func:`setDataUrl`

.. versionadded:: 3.38
%End

void setDataUrlFormat( const QString &dataUrlFormat );
%Docstring
Sets the DataUrl ``format`` of the layerused by QGIS Server in GetCapabilities request.

DataUrl is a a link to the underlying data represented by a particular layer.

.. seealso:: :py:func:`dataUrlFormat`

.. versionadded:: 3.38
%End

QString dataUrlFormat() const;
%Docstring
Returns the DataUrl format of the layer used by QGIS Server in GetCapabilities request.

DataUrl is a a link to the underlying data represented by a particular layer.

.. seealso:: :py:func:`setDataUrlFormat`

.. versionadded:: 3.38
%End

void setAttribution( const QString &attrib );
%Docstring
Sets the ``attribution`` of the layer used by QGIS Server in GetCapabilities request.

Attribution indicates the provider of a layer or collection of layers.

.. seealso:: :py:func:`attribution`

.. versionadded:: 3.38
%End

QString attribution() const;
%Docstring
Returns the attribution of the layer used by QGIS Server in GetCapabilities request.

Attribution indicates the provider of a layer or collection of layers.

.. seealso:: :py:func:`setAttribution`

.. versionadded:: 3.38
%End

void setAttributionUrl( const QString &url );
%Docstring
Sets the attribution ``url`` of the layer used by QGIS Server in GetCapabilities request.

Attribution indicates the provider of a layer or collection of layers.

.. seealso:: :py:func:`attributionUrl`

.. versionadded:: 3.38
%End

QString attributionUrl() const;
%Docstring
Returns the attribution URL of the layer used by QGIS Server in GetCapabilities request.

Attribution indicates the provider of a layer or collection of layers.

.. seealso:: :py:func:`setAttributionUrl`

.. versionadded:: 3.38
%End

virtual const QgsMapLayer *layer() const;
Expand Down
Loading

0 comments on commit 3d59b88

Please sign in to comment.