Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Doc] Update QgsMapLayer documentation
Add documentation string to 10 QgsMapLayer methods.
  • Loading branch information
rldhont committed Dec 21, 2015
1 parent 7afa9e3 commit f756671
Show file tree
Hide file tree
Showing 3 changed files with 195 additions and 3 deletions.
98 changes: 97 additions & 1 deletion python/core/qgsmaplayer.sip
Expand Up @@ -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 */
Expand Down
98 changes: 97 additions & 1 deletion src/core/qgsmaplayer.h
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion tests/src/python/test_qgsdoccoverage.py
Expand Up @@ -27,7 +27,7 @@
# DON'T RAISE THIS THRESHOLD!!!
# (changes which lower this threshold are welcomed though!)

ACCEPTABLE_MISSING_DOCS = 3827
ACCEPTABLE_MISSING_DOCS = 3807


class TestQgsDocCoverage(TestCase):
Expand Down

0 comments on commit f756671

Please sign in to comment.