Skip to content
Permalink
Browse files

added missing docstrings

  • Loading branch information
Samweli committed Dec 19, 2019
1 parent 02cf6f3 commit 3e75f92d86b11a6993c9ea20dccc8f291d044c9b
@@ -767,9 +767,9 @@ void QgsWcsCapabilities::parseCoverageOfferingBrief( QDomElement const &e, QgsWc
QgsDebugMsg( QStringLiteral( "coverage orderId = %1 identifier = %2" ).arg( coverageSummary.orderId ).arg( coverageSummary.identifier ) );
}

void QgsWcsCapabilities::parseMetadataLink( QDomElement const &e, QgsWcsMetadataLinkProperty &metadataLink )
void QgsWcsCapabilities::parseMetadataLink( const QDomElement &element, QgsWcsMetadataLinkProperty &metadataLink )
{
QDomElement metadataElement = firstChild( e, QStringLiteral( "metadataLink" ) );
QDomElement metadataElement = firstChild( element, QStringLiteral( "metadataLink" ) );

if ( !metadataElement.isNull() )
{
@@ -34,7 +34,7 @@
class QNetworkAccessManager;
class QNetworkReply;

//! Metadata Link Property structure
//! Metadata link property structure
struct QgsWcsMetadataLinkProperty
{
QString metadataType;
@@ -55,12 +55,14 @@ struct QgsWcsCoverageSummary
QList<double> nullValues;
QgsRectangle wgs84BoundingBox; // almost useless, we need the native
QString nativeCrs;
//Optional metadataLink
//! Optional metadataLink
QgsWcsMetadataLinkProperty metadataLink;
// Map of bounding boxes, key is CRS name (srsName), e.g. EPSG:4326

//! Map of bounding boxes, key is CRS name (srsName), e.g. EPSG:4326
QMap<QString, QgsRectangle> boundingBoxes;
QgsRectangle nativeBoundingBox;
// timePosition or timePeriod (beginPosition/endPosition[/timeResolution] - used in KVP request)

//! timePosition or timePeriod (beginPosition/endPosition[/timeResolution] - used in KVP request)
QStringList times;
QVector<QgsWcsCoverageSummary> coverageSummary;
// non reflecting Capabilities structure:
@@ -123,7 +125,7 @@ class QgsWcsCapabilities : public QObject
*/
void coverageParents( QMap<int, int> &parents, QMap<int, QStringList> &parentNames ) const;

// Parse metadata element from the document
//! Parse metadata element from the document
void parseMetadataLink( QDomElement const &e, QgsWcsMetadataLinkProperty &metadataLink );

//! Gets coverage summary for identifier
@@ -789,7 +789,7 @@ void QgsWmsCapabilities::parseMetadataUrl( QDomElement const &e, QgsWmsMetadataU
QDomNode n1 = e.firstChild();
while ( !n1.isNull() )
{
QDomElement e1 = n1.toElement(); // try to convert the node to an element.
QDomElement e1 = n1.toElement();
if ( !e1.isNull() )
{
QString tagName = e1.tagName();
@@ -807,8 +807,6 @@ void QgsWmsCapabilities::parseMetadataUrl( QDomElement const &e, QgsWmsMetadataU
}
n1 = n1.nextSibling();
}

QgsDebugMsg( QStringLiteral( "exiting." ) );
}

void QgsWmsCapabilities::parseLayer( QDomElement const &e, QgsWmsLayerProperty &layerProperty,
@@ -1813,13 +1813,17 @@ QString QgsWmsProvider::layerMetadata( QgsWmsLayerProperty &layer )
if ( !layer.metadataUrl.isEmpty() )
{
metadata += QStringLiteral( "<tr><th>" ) %
tr( "MetadataURLs" ) %
tr( "Metadata URLs" ) %
QStringLiteral( "</th>"
"<td><table class=\"tabular-view\">"
"<tr><th>Format</th><th>URL</th></tr>" );
for ( int k = 0; k < layer.metadataUrl.size(); k++ )
"<tr><th>" ) %
tr( "Format" ) %
QStringLiteral("</th><th>") %
tr( "URL" ) %
QStringLiteral("</th></tr>" );

for ( const QgsWmsMetadataUrlProperty &l : qgis::as_const( layer.metadataUrl ) )
{
const QgsWmsMetadataUrlProperty &l = layer.metadataUrl[k];
metadata += QStringLiteral( "<tr><td>" ) % l.format % QStringLiteral( "</td><td>" ) % l.onlineResource.xlinkHref % QStringLiteral( "</td></tr>" );
}
metadata += QStringLiteral( "</table>"

0 comments on commit 3e75f92

Please sign in to comment.
You can’t perform that action at this time.