Skip to content
Permalink
Browse files

Replace getter names

  • Loading branch information
pblottiere committed Jan 10, 2019
1 parent 5d59d66 commit d67875fee86e2357cd4cd26f26433c73a65b347a
@@ -85,7 +85,7 @@ namespace QgsWms

if ( result )
{
writeImage( response, *result, format, renderer.getImageQuality() );
writeImage( response, *result, format, renderer.imageQuality() );
if ( cacheManager )
{
QByteArray content = response.data();
@@ -42,7 +42,7 @@ namespace QgsWms
if ( result )
{
QString format = params.value( QStringLiteral( "FORMAT" ), QStringLiteral( "PNG" ) );
writeImage( response, *result, format, renderer.getImageQuality() );
writeImage( response, *result, format, renderer.imageQuality() );
}
else
{
@@ -1753,10 +1753,10 @@ namespace QgsWms
{
QDomElement bBoxElem = infoDocument.createElement( QStringLiteral( "BoundingBox" ) );
bBoxElem.setAttribute( version == QLatin1String( "1.1.1" ) ? "SRS" : "CRS", outputCrs.authid() );
bBoxElem.setAttribute( QStringLiteral( "minx" ), qgsDoubleToString( box.xMinimum(), getWMSPrecision() ) );
bBoxElem.setAttribute( QStringLiteral( "maxx" ), qgsDoubleToString( box.xMaximum(), getWMSPrecision() ) );
bBoxElem.setAttribute( QStringLiteral( "miny" ), qgsDoubleToString( box.yMinimum(), getWMSPrecision() ) );
bBoxElem.setAttribute( QStringLiteral( "maxy" ), qgsDoubleToString( box.yMaximum(), getWMSPrecision() ) );
bBoxElem.setAttribute( QStringLiteral( "minx" ), qgsDoubleToString( box.xMinimum(), wmsPrecision() ) );
bBoxElem.setAttribute( QStringLiteral( "maxx" ), qgsDoubleToString( box.xMaximum(), wmsPrecision() ) );
bBoxElem.setAttribute( QStringLiteral( "miny" ), qgsDoubleToString( box.yMinimum(), wmsPrecision() ) );
bBoxElem.setAttribute( QStringLiteral( "maxy" ), qgsDoubleToString( box.yMaximum(), wmsPrecision() ) );
featureElement.appendChild( bBoxElem );
}

@@ -1787,7 +1787,7 @@ namespace QgsWms
}
QDomElement geometryElement = infoDocument.createElement( QStringLiteral( "Attribute" ) );
geometryElement.setAttribute( QStringLiteral( "name" ), QStringLiteral( "geometry" ) );
geometryElement.setAttribute( QStringLiteral( "value" ), geom.asWkt( getWMSPrecision() ) );
geometryElement.setAttribute( QStringLiteral( "value" ), geom.asWkt( wmsPrecision() ) );
geometryElement.setAttribute( QStringLiteral( "type" ), QStringLiteral( "derived" ) );
featureElement.appendChild( geometryElement );
}
@@ -2459,11 +2459,11 @@ namespace QgsWms
QDomElement boxElem;
if ( version < 3 )
{
boxElem = QgsOgcUtils::rectangleToGMLBox( &box, doc, getWMSPrecision() );
boxElem = QgsOgcUtils::rectangleToGMLBox( &box, doc, wmsPrecision() );
}
else
{
boxElem = QgsOgcUtils::rectangleToGMLEnvelope( &box, doc, getWMSPrecision() );
boxElem = QgsOgcUtils::rectangleToGMLEnvelope( &box, doc, wmsPrecision() );
}

if ( crs.isValid() )
@@ -2487,11 +2487,11 @@ namespace QgsWms
QDomElement gmlElem;
if ( version < 3 )
{
gmlElem = QgsOgcUtils::geometryToGML( geom, doc, getWMSPrecision() );
gmlElem = QgsOgcUtils::geometryToGML( geom, doc, wmsPrecision() );
}
else
{
gmlElem = QgsOgcUtils::geometryToGML( geom, doc, QStringLiteral( "GML3" ), getWMSPrecision() );
gmlElem = QgsOgcUtils::geometryToGML( geom, doc, QStringLiteral( "GML3" ), wmsPrecision() );
}

if ( !gmlElem.isNull() )
@@ -2564,7 +2564,7 @@ namespace QgsWms
return value;
}

int QgsRenderer::getImageQuality() const
int QgsRenderer::imageQuality() const
{
// First taken from QGIS project
int imageQuality = QgsServerProjectUtils::wmsImageQuality( *mProject );
@@ -2578,7 +2578,7 @@ namespace QgsWms
return imageQuality;
}

int QgsRenderer::getWMSPrecision() const
int QgsRenderer::wmsPrecision() const
{
// First taken from QGIS project and the default value is 6
int WMSPrecision = QgsServerProjectUtils::wmsFeatureInfoPrecision( *mProject );
@@ -309,10 +309,10 @@ namespace QgsWms
public:

//! Returns the image quality to use for getMap request
int getImageQuality() const;
int imageQuality() const;

//! Returns the precision to use for GetFeatureInfo request
int getWMSPrecision() const;
int wmsPrecision() const;

};

0 comments on commit d67875f

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