From f7566710af84f80beb9fe707958cfe4c511a20cf Mon Sep 17 00:00:00 2001 From: rldhont Date: Mon, 21 Dec 2015 15:31:39 +0100 Subject: [PATCH] [Doc] Update QgsMapLayer documentation Add documentation string to 10 QgsMapLayer methods. --- python/core/qgsmaplayer.sip | 98 ++++++++++++++++++++++++- src/core/qgsmaplayer.h | 98 ++++++++++++++++++++++++- tests/src/python/test_qgsdoccoverage.py | 2 +- 3 files changed, 195 insertions(+), 3 deletions(-) diff --git a/python/core/qgsmaplayer.sip b/python/core/qgsmaplayer.sip index 947fb952b54..61497073917 100644 --- a/python/core/qgsmaplayer.sip +++ b/python/core/qgsmaplayer.sip @@ -71,36 +71,132 @@ class QgsMapLayer : QObject */ QString name() const; - /** Get the original name of the layer */ + /** Get the original name of the layer + * @return the original layer name + */ QString originalName() const; + /** Set the title of the layer + * used by QGIS Server in GetCapabilities request + * @return the layer title + */ void setTitle( const QString& title ); + /** Get the title of the layer + * used by QGIS Server in GetCapabilities request + * @return the layer title + */ QString title() const; + /** Set the abstract of the layer + * used by QGIS Server in GetCapabilities request + * @return the layer abstract + */ void setAbstract( const QString& abstract ); + /** Get the abstract of the layer + * used by QGIS Server in GetCapabilities request + * @return the layer abstract + */ QString abstract() const; + /** Set the keyword list of the layer + * used by QGIS Server in GetCapabilities request + * @return the layer keyword list + */ void setKeywordList( const QString& keywords ); + /** Get the keyword list of the layer + * used by QGIS Server in GetCapabilities request + * @return the layer keyword list + */ QString keywordList() const; /* Layer dataUrl information */ + /** Set 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 + */ void setDataUrl( const QString& dataUrl ); + /** Get 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 + */ QString dataUrl() const; + /** Set 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 + */ void setDataUrlFormat( const QString& dataUrlFormat ); + /** Get 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 + */ QString dataUrlFormat() const; /* Layer attribution information */ + /** Set 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 + */ void setAttribution( const QString& attrib ); + /** Get 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 + */ QString attribution() const; + /** Set 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 + */ void setAttributionUrl( const QString& attribUrl ); + /** Get 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 + */ QString attributionUrl() const; /* Layer metadataUrl information */ + /** Set the metadata URL of the layer + * used by QGIS Server in GetCapabilities request + * MetadataUrl is a a link to the detailed, standardized metadata about the data. + * @return the layer metadata URL + */ void setMetadataUrl( const QString& metaUrl ); + /** Get the metadata URL of the layer + * used by QGIS Server in GetCapabilities request + * MetadataUrl is a a link to the detailed, standardized metadata about the data. + * @return the layer metadata URL + */ QString metadataUrl() const; + /** Set the metadata type of the layer + * used by QGIS Server in GetCapabilities request + * MetadataUrlType indicates the standard to which the metadata complies. + * @return the layer metadata type + */ void setMetadataUrlType( const QString& metaUrlType ); + /** Get the metadata type of the layer + * used by QGIS Server in GetCapabilities request + * MetadataUrlType indicates the standard to which the metadata complies. + * @return the layer metadata type + */ QString metadataUrlType() const; + /** Set the metadata format of the layer + * used by QGIS Server in GetCapabilities request + * MetadataUrlType indicates how the metadata is structured. + * @return the layer metadata format + */ void setMetadataUrlFormat( const QString& metaUrlFormat ); + /** Get the metadata format of the layer + * used by QGIS Server in GetCapabilities request + * MetadataUrlType indicates how the metadata is structured. + * @return the layer metadata format + */ QString metadataUrlFormat() const; /** Set the blending mode used for rendering a layer */ diff --git a/src/core/qgsmaplayer.h b/src/core/qgsmaplayer.h index 84b3af97419..0c9ea10f6d9 100644 --- a/src/core/qgsmaplayer.h +++ b/src/core/qgsmaplayer.h @@ -87,36 +87,132 @@ class CORE_EXPORT QgsMapLayer : public QObject */ QString name() const; - /** Get the original name of the layer */ + /** Get the original name of the layer + * @return the original layer name + */ QString originalName() const { return mLayerOrigName; } + /** Set the title of the layer + * used by QGIS Server in GetCapabilities request + * @return the layer title + */ void setTitle( const QString& title ) { mTitle = title; } + /** Get the title of the layer + * used by QGIS Server in GetCapabilities request + * @return the layer title + */ QString title() const { return mTitle; } + /** Set the abstract of the layer + * used by QGIS Server in GetCapabilities request + * @return the layer abstract + */ void setAbstract( const QString& abstract ) { mAbstract = abstract; } + /** Get the abstract of the layer + * used by QGIS Server in GetCapabilities request + * @return the layer abstract + */ QString abstract() const { return mAbstract; } + /** Set the keyword list of the layer + * used by QGIS Server in GetCapabilities request + * @return the layer keyword list + */ void setKeywordList( const QString& keywords ) { mKeywordList = keywords; } + /** Get the keyword list of the layer + * used by QGIS Server in GetCapabilities request + * @return the layer keyword list + */ QString keywordList() const { return mKeywordList; } /* Layer dataUrl information */ + /** Set 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 + */ void setDataUrl( const QString& dataUrl ) { mDataUrl = dataUrl; } + /** Get 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 + */ QString dataUrl() const { return mDataUrl; } + /** Set 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 + */ void setDataUrlFormat( const QString& dataUrlFormat ) { mDataUrlFormat = dataUrlFormat; } + /** Get 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 + */ QString dataUrlFormat() const { return mDataUrlFormat; } /* Layer attribution information */ + /** Set 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 + */ void setAttribution( const QString& attrib ) { mAttribution = attrib; } + /** Get 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 + */ QString attribution() const { return mAttribution; } + /** Set 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 + */ void setAttributionUrl( const QString& attribUrl ) { mAttributionUrl = attribUrl; } + /** Get 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 + */ QString attributionUrl() const { return mAttributionUrl; } /* Layer metadataUrl information */ + /** Set the metadata URL of the layer + * used by QGIS Server in GetCapabilities request + * MetadataUrl is a a link to the detailed, standardized metadata about the data. + * @return the layer metadata URL + */ void setMetadataUrl( const QString& metaUrl ) { mMetadataUrl = metaUrl; } + /** Get the metadata URL of the layer + * used by QGIS Server in GetCapabilities request + * MetadataUrl is a a link to the detailed, standardized metadata about the data. + * @return the layer metadata URL + */ QString metadataUrl() const { return mMetadataUrl; } + /** Set the metadata type of the layer + * used by QGIS Server in GetCapabilities request + * MetadataUrlType indicates the standard to which the metadata complies. + * @return the layer metadata type + */ void setMetadataUrlType( const QString& metaUrlType ) { mMetadataUrlType = metaUrlType; } + /** Get the metadata type of the layer + * used by QGIS Server in GetCapabilities request + * MetadataUrlType indicates the standard to which the metadata complies. + * @return the layer metadata type + */ QString metadataUrlType() const { return mMetadataUrlType; } + /** Set the metadata format of the layer + * used by QGIS Server in GetCapabilities request + * MetadataUrlType indicates how the metadata is structured. + * @return the layer metadata format + */ void setMetadataUrlFormat( const QString& metaUrlFormat ) { mMetadataUrlFormat = metaUrlFormat; } + /** Get the metadata format of the layer + * used by QGIS Server in GetCapabilities request + * MetadataUrlType indicates how the metadata is structured. + * @return the layer metadata format + */ QString metadataUrlFormat() const { return mMetadataUrlFormat; } /** Set the blending mode used for rendering a layer */ diff --git a/tests/src/python/test_qgsdoccoverage.py b/tests/src/python/test_qgsdoccoverage.py index 69a82b4d17b..e2ac871c8b2 100644 --- a/tests/src/python/test_qgsdoccoverage.py +++ b/tests/src/python/test_qgsdoccoverage.py @@ -27,7 +27,7 @@ from PyQt4.QtCore import qDebug # DON'T RAISE THIS THRESHOLD!!! # (changes which lower this threshold are welcomed though!) -ACCEPTABLE_MISSING_DOCS = 3827 +ACCEPTABLE_MISSING_DOCS = 3807 class TestQgsDocCoverage(TestCase):