31 const QVariant::Type type,
32 const QVariant defaultValue )
61 const QString msg = QString(
"%1 ('%2') cannot be converted into a list of geometries" ).arg(
name(
mName ),
toString(),
typeName() );
75 const QString msg = QString(
"%1 ('%2') cannot be converted into a rectangle" ).arg(
name(
mName ),
toString(),
typeName() );
98 const QUrl url =
toUrl();
105 const QString msg = QString(
"%1 request error for %2" ).arg(
name(
mName ), url.toString() );
145 const QString msg = QString(
"%1 ('%2') cannot be converted into a list of colors" ).arg(
name(
mName ),
toString(),
typeName() );
159 const QString msg = QString(
"%1 ('%2') cannot be converted into a list of int" ).arg(
name(
mName ),
toString(),
typeName() );
173 const QString msg = QString(
"%1 ('%2') cannot be converted into a list of float" ).arg(
name(
mName ),
toString(),
typeName() );
200 const QMetaEnum metaEnum( QMetaEnum::fromType<QgsWmsParameter::Name>() );
201 return metaEnum.valueToKey( name );
206 const QMetaEnum metaEnum( QMetaEnum::fromType<QgsWmsParameter::Name>() );
259 save( pIcLabelSpace );
262 save( pItFontFamily );
272 save( pItFontItalic );
281 QVariant(
"black" ) );
282 save( pItFontColor );
285 save( pHighlightGeom );
290 save( pShowFeatureCount );
293 save( pHighlightSymbol );
296 save( pHighlightLabel );
300 QVariant(
"black" ) );
301 save( pHighlightColor );
304 save( pHighlightFontSize );
307 save( pHighlightFontWeight );
310 save( pHighlightFont );
314 QVariant(
"black" ) );
315 save( pHighlightBufferColor );
318 save( pHighlightBufferSize );
403 save( pQueryLayers );
408 save( pFeatureCount );
416 save( pLayerFtFamily );
421 save( pLayerFtBold );
426 save( pLayerFtItalic );
431 save( pLayerFtSize );
435 QVariant(
"black" ) );
436 save( pLayerFtColor );
474 save( pWmsPrecision );
479 save( pTransparent );
483 QVariant(
"white" ) );
515 save( pWithGeometry );
526 QVariant::StringList );
540 if ( !sld.isEmpty() )
543 if ( !sldBody.isEmpty() )
552 return mWmsParameters[name];
557 mWmsParameters[name].mValue =
value;
560 bool QgsWmsParameters::loadParameter(
const QString &key,
const QString &
value )
564 const QRegExp composerParamRegExp( QStringLiteral(
"^MAP\\d+:" ), Qt::CaseInsensitive );
565 if ( key.contains( composerParamRegExp ) )
567 const int mapId = key.midRef( 3, key.indexOf(
':' ) - 3 ).toInt();
568 const QString theKey = key.mid( key.indexOf(
':' ) + 1 );
591 mWmsParameters[name].mValue =
value;
592 if ( ! mWmsParameters[name].isValid() )
594 mWmsParameters[name].raiseError();
601 int separator = key.indexOf( QStringLiteral(
":" ) );
602 if ( separator >= 1 )
604 QString
id = key.left( separator );
605 QString param = key.right( key.length() - separator - 1 );
606 mExternalWMSParameters[id].insert( param, value );
618 log( QStringLiteral(
"WMS Request parameters:" ) );
619 for (
auto parameter : mWmsParameters.toStdMap() )
621 const QString value = parameter.second.toString();
623 if ( ! value.isEmpty() )
627 if ( parameter.second.mId >= 0 )
629 name = QStringLiteral(
"%1:%2" ).arg( QString::number( parameter.second.mId ), name );
632 log( QStringLiteral(
" - %1 : %2" ).arg( name, value ) );
637 log( QStringLiteral(
" - VERSION : %1" ).arg(
version() ) );
640 void QgsWmsParameters::save(
const QgsWmsParameter ¶meter,
bool multi )
644 mWmsParameters.insertMulti( parameter.
mName, parameter );
648 mWmsParameters[ parameter.
mName ] = parameter;
675 if ( !srs.isEmpty() && crs.isEmpty() )
677 else if ( srs.isEmpty() && !crs.isEmpty() )
679 else if ( !srs.isEmpty() && !crs.isEmpty() )
752 const QString vStr =
version();
756 if ( vStr.isEmpty() )
780 const QMetaEnum metaEnum( QMetaEnum::fromType<QgsWmsParameters::Format>() );
781 return metaEnum.valueToKey( format );
789 if ( fStr.compare( QLatin1String(
"image/png" ), Qt::CaseInsensitive ) == 0 ||
790 fStr.compare( QLatin1String(
"png" ), Qt::CaseInsensitive ) == 0 )
794 else if ( fStr.compare( QLatin1String(
"jpg" ), Qt::CaseInsensitive ) == 0
795 || fStr.compare( QLatin1String(
"jpeg" ), Qt::CaseInsensitive ) == 0
796 || fStr.compare( QLatin1String(
"image/jpeg" ), Qt::CaseInsensitive ) == 0 )
800 else if ( fStr.compare( QLatin1String(
"image/svg" ), Qt::CaseInsensitive ) == 0 ||
801 fStr.compare( QLatin1String(
"image/svg+xml" ), Qt::CaseInsensitive ) == 0 ||
802 fStr.compare( QLatin1String(
"svg" ), Qt::CaseInsensitive ) == 0 )
806 else if ( fStr.compare( QLatin1String(
"application/pdf" ), Qt::CaseInsensitive ) == 0 ||
807 fStr.compare( QLatin1String(
"pdf" ), Qt::CaseInsensitive ) == 0 )
830 if ( fStr.isEmpty() )
833 if ( fStr.startsWith( QLatin1String(
"text/xml" ), Qt::CaseInsensitive ) )
835 else if ( fStr.startsWith( QLatin1String(
"text/html" ), Qt::CaseInsensitive ) )
837 else if ( fStr.startsWith( QLatin1String(
"text/plain" ), Qt::CaseInsensitive ) )
839 else if ( fStr.startsWith( QLatin1String(
"application/vnd.ogc.gml" ), Qt::CaseInsensitive ) )
841 else if ( fStr.startsWith( QLatin1String(
"application/json" ), Qt::CaseInsensitive )
842 || fStr.startsWith( QLatin1String(
"application/geo+json" ), Qt::CaseInsensitive ) )
856 if ( fStr.startsWith( QLatin1String(
"application/vnd.ogc.gml/3" ), Qt::CaseInsensitive ) )
1160 font.fromString(
"" );
1176 font.fromString(
"" );
1327 QStringList results;
1329 while ( pos < filter.size() )
1331 if ( pos + 1 < filter.size() && filter[pos] ==
'(' && filter[pos + 1] ==
'<' )
1334 int posEnd = filter.indexOf(
"Filter>)", pos );
1337 posEnd = filter.size();
1339 results.append( filter.mid( pos + 1, posEnd - pos + 6 ) );
1342 else if ( pos + 1 < filter.size() && filter[pos] ==
'(' && filter[pos + 1] ==
')' )
1345 results.append(
"" );
1348 else if ( filter[pos] ==
'<' )
1351 results.append( filter.mid( pos ) );
1357 int posEnd = filter.indexOf(
';', pos + 1 );
1360 posEnd = filter.size();
1362 results.append( filter.mid( pos, posEnd - pos ) );
1393 return layer << layers;
1405 return style << styles;
1408 QMultiMap<QString, QgsWmsParametersFilter> QgsWmsParameters::layerFilters(
const QStringList &layers )
const 1410 const QString nsWfs2 = QStringLiteral(
"http://www.opengis.net/fes/2.0" );
1411 const QString prefixWfs2 = QStringLiteral(
"<fes:" );
1413 const QStringList rawFilters =
filters();
1414 QMultiMap<QString, QgsWmsParametersFilter>
filters;
1415 for (
int i = 0;
i < rawFilters.size();
i++ )
1417 const QString f = rawFilters[
i];
1418 if ( f.startsWith( QLatin1String(
"<" ) ) \
1419 && f.endsWith( QLatin1String(
"Filter>" ) ) \
1420 &&
i < layers.size() )
1427 if ( filter.
mFilter.contains( nsWfs2 ) \
1428 || filter.
mFilter.contains( prefixWfs2 ) )
1433 filters.insert( layers[
i], filter );
1435 else if ( !f.isEmpty() )
1439 const int colonIndex = f.indexOf(
':' );
1440 if ( colonIndex != -1 )
1442 const QString layers = f.section(
':', 0, 0 );
1443 const QString filter = f.section(
':', 1 );
1444 const QStringList layersList = layers.split(
',' );
1445 for (
const QString &layer : layersList )
1448 parametersFilter.
mFilter = filter;
1450 filters.insert( layer, parametersFilter );
1456 raiseError( QStringLiteral(
"FILTER ('" ) + filterStr + QStringLiteral(
"') is not properly formatted" ) );
1469 const QMultiMap<QString, QgsWmsParametersFilter>
filters = layerFilters( layers );
1473 QMultiMap<QString, QString> layerSelections;
1474 for (
const QString &s : selection )
1476 const QStringList splits = s.split(
':' );
1477 if ( splits.size() == 2 )
1479 layerSelections.insert( splits[0], splits[1] );
1484 raiseError( QStringLiteral(
"SELECTION ('" ) + selStr + QStringLiteral(
"') is not properly formatted" ) );
1488 QList<QgsWmsParametersLayer> parameters;
1489 for (
int i = 0;
i < layers.size();
i++ )
1491 QString layer = layers[
i];
1493 if ( isExternalLayer( layer ) )
1499 if (
i < styles.count() )
1502 if (
i < opacities.count() )
1505 if ( filters.contains( layer ) )
1507 auto it = filters.find( layer );
1508 while ( it != filters.end() && it.key() == layer )
1510 param.
mFilter.append( it.value() );
1515 if ( layerSelections.contains( layer ) )
1517 QMultiMap<QString, QString>::const_iterator it;
1518 it = layerSelections.constFind( layer );
1519 while ( it != layerSelections.constEnd() && it.key() == layer )
1526 parameters.append( param );
1534 QList<QgsWmsParametersHighlightLayer> params;
1545 int nLayers = std::min( geoms.size(), slds.size() );
1546 for (
int i = 0;
i < nLayers;
i++ )
1549 param.
mName = QStringLiteral(
"highlight_" ) + QString::number(
i );
1551 param.
mSld = slds[
i];
1553 if (
i < labels.count() )
1556 if (
i < colors.count() )
1559 if (
i < sizes.count() )
1562 if (
i < weights.count() )
1565 if (
i < fonts.count() )
1566 param.
mFont = fonts[
i ];
1568 if (
i < bufferColors.count() )
1571 if (
i < bufferSizes.count() )
1574 params.append( param );
1582 auto notExternalLayer = [](
const QString & name ) {
return ! QgsWmsParameters::isExternalLayer( name ); };
1584 QList<QgsWmsParametersExternalLayer> externalLayers;
1587 QStringList::iterator rit = std::remove_if( layers.begin(), layers.end(), notExternalLayer );
1589 for ( QStringList::iterator it = layers.begin(); it != rit; ++it )
1591 externalLayers << externalLayerParameter( *it );
1594 return externalLayers;
1626 if ( extentStr.isEmpty() )
1631 QString pMapId = QStringLiteral(
"MAP" ) + QString::number( mapId );
1661 double gridx( -1 ), gridy( -1 );
1675 if ( gridx != -1 && gridy != -1 )
1682 QStringList allLayers;
1691 QList<QgsWmsParametersExternalLayer> eParams;
1693 for (
const auto &layer : qgis::as_const( allLayers ) )
1695 if ( isExternalLayer( layer ) )
1697 eParams << externalLayerParameter( layer );
1713 QList<QgsWmsParametersLayer> lParams;
1714 for (
int i = 0;
i < layers.size();
i++ )
1716 QString layer = layers[
i];
1720 if (
i < styles.count() )
1723 lParams.append( lParam );
1728 QList<QgsWmsParametersHighlightLayer> hParams;
1730 QList<QgsGeometry> geoms;
1758 QList<QColor> colors;
1779 QList<QColor> bufferColors;
1786 QList<double> bufferSizes;
1793 int nHLayers = std::min( geoms.size(), slds.size() );
1794 for (
int i = 0;
i < nHLayers;
i++ )
1797 hParam.
mName = pMapId + QStringLiteral(
"_highlight_" ) + QString::number(
i );
1799 hParam.
mSld = slds[
i];
1801 if (
i < labels.count() )
1804 if (
i < colors.count() )
1807 if (
i < sizes.count() )
1810 if (
i < weights.count() )
1813 if (
i < fonts.count() )
1814 hParam.
mFont = fonts[
i ];
1816 if (
i < bufferColors.count() )
1819 if (
i < bufferSizes.count() )
1822 hParams.append( hParam );
1831 if ( !mExternalWMSParameters.contains(
id ) )
1837 const QMap<QString, QString> ¶mMap = mExternalWMSParameters[ id ];
1838 QMap<QString, QString>::const_iterator paramIt = paramMap.constBegin();
1839 for ( ; paramIt != paramMap.constEnd(); ++paramIt )
1841 wmsUri.
setParam( paramIt.key().toLower(), paramIt.value() );
1861 void QgsWmsParameters::log(
const QString &msg )
const 1866 void QgsWmsParameters::raiseError(
const QString &msg )
const 1875 for (
const auto ¶m : mWmsParameters.values( name ) )
1877 if ( param.mId ==
id )
1897 bool QgsWmsParameters::isExternalLayer(
const QString &name )
1904 QStringList attributes;
1907 if ( options.contains( DxfFormatOption::LAYERATTRIBUTES ) )
1909 attributes = options[ DxfFormatOption::LAYERATTRIBUTES ].split(
',' );
1920 if ( options.contains( DxfFormatOption::USE_TITLE_AS_LAYERNAME ) )
1922 use = QVariant( options[ DxfFormatOption::USE_TITLE_AS_LAYERNAME ] ).toBool();
1933 if ( options.contains( DxfFormatOption::SCALE ) )
1935 scale = options[ DxfFormatOption::SCALE ].toDouble();
1947 if ( ! options.contains( DxfFormatOption::MODE ) )
1952 const QString mode = options[ DxfFormatOption::MODE ];
1953 if ( mode.compare( QLatin1String(
"SymbolLayerSymbology" ), Qt::CaseInsensitive ) == 0 )
1957 else if ( mode.compare( QLatin1String(
"FeatureSymbology" ), Qt::CaseInsensitive ) == 0 )
1967 QString codec = QStringLiteral(
"ISO-8859-1" );
1979 QMap<QgsWmsParameters::DxfFormatOption, QString> options;
1981 const QMetaEnum metaEnum( QMetaEnum::fromType<QgsWmsParameters::DxfFormatOption>() );
1984 for (
auto it = opts.constBegin(); it != opts.constEnd(); ++it )
1986 const int equalIdx = it->indexOf(
':' );
1987 if ( equalIdx > 0 && equalIdx < ( it->length() - 1 ) )
1989 const QString name = it->left( equalIdx ).toUpper();
1992 const QString value = it->right( it->length() - equalIdx - 1 );
1993 options.insert( option, value );
bool versionIsValid(const QString version) const
Returns true if version is valid, false otherwise.
QList< QgsWmsParametersHighlightLayer > highlightLayersParameters() const
Returns parameters for each highlight layer.
int srcHeightAsInt() const
Returns SRCHEIGHT parameter as an int or its default value if not defined.
QFont layerFont() const
Returns the layer font (built thanks to the LAYERFONTFAMILY, LAYERFONTSIZE, LAYERFONTBOLD, ...
QString layerFontSize() const
Returns LAYERFONTSIZE parameter or an empty string if not defined.
A rectangle specified with double values.
void dump() const
Dumps parameters.
int imageQualityAsInt() const
Returns IMAGE_QUALITY parameter as an integer.
QStringList highlightLabelWeight() const
Returns HIGHLIGHT_LABELWEIGHT as a list of string.
void setBoxSpace(double s)
QgsRectangle toRectangle() const
Converts the parameter into a rectangle.
QList< double > highlightLabelBufferSizeAsFloat() const
Returns HIGHLIGHT_LABELBUFFERSIZE as a list of float.
QString typeName() const
Returns the type of the parameter as a string.
double symbolHeightAsDouble() const
Returns SYMBOLHEIGHT as a double or its default value if not defined.
QUrl toUrl() const
Converts the parameter into an url.
QString transparent() const
Returns TRANSPARENT parameter or an empty string if not defined.
QString i() const
Returns I parameter or an empty string if not defined.
QList< QColor > highlightLabelColorAsColor() const
Returns HIGHLIGHT_LABELCOLOR as a list of color.
QMap< QString, QString > mUnmanagedParameters
const QString EXTERNAL_LAYER_PREFIX
int featureCountAsInt() const
Returns FEATURE_COUNT as an integer.
QStringList filters() const
Returns the list of filters found in FILTER parameter.
QString itemFontSize() const
Returns ITEMFONTSIZE parameter or an empty string if not defined.
QgsRectangle bboxAsRectangle() const
Returns BBOX as a rectangle if defined and valid.
QString j() const
Returns J parameter or an empty string if not defined.
QStringList highlightLabelBufferSize() const
Returns HIGHLIGHT_LABELBUFFERSIZE.
QString backgroundColor() const
Returns BGCOLOR parameter or an empty string if not defined.
QgsWmsParameter::Name mName
QList< QgsWmsParametersLayer > mLayers
QString srcWidth() const
Returns SRCWIDTH parameter or an empty string if not defined.
QString dxfCodec() const
Returns the DXF CODEC parameter.
int toInt() const
Converts the parameter into an integer.
QString scale() const
Returns SCALE parameter or an empty string if none is defined.
void setSymbolSize(QSizeF s)
QList< QColor > toColorList(const char delimiter=',') const
Converts the parameter into a list of colors.
QString layerFontBold() const
Returns LAYERFONTBOLD parameter or an empty string if not defined.
QString value(const QString &key) const
Returns the value of a parameter.
QgsLegendSettings legendSettings() const
Returns legend settings.
QList< QgsGeometry > toGeomList(const char delimiter=',') const
Converts the parameter into a list of geometries.
QString sldBody() const
Returns SLD_body if defined or an empty string.
QgsDxfExport::SymbologyExport dxfMode() const
Returns the DXF MODE parameter.
static void raiseError(const QString &msg)
Raises an exception in case of an invalid parameters.
int yAsInt() const
Returns Y parameter as an int or its default value if not defined.
double symbolSpaceAsDouble() const
Returns SYMBOLSPACE as a double or its default value if not defined.
double dpiAsDouble() const
Returns DPI parameter as an int or its default value if not defined.
double toDouble() const
Converts the parameter into a double.
QString loadUrl(bool &ok) const
Loads the data associated to the parameter converted into an url.
bool dxfUseLayerTitleAsName() const
Returns the DXF USE_TITLE_AS_LAYERNAME parameter.
bool isValid() const override
Returns true if the parameter is valid, false otherwise.
Format
Output format for the response.
QList< int > highlightLabelWeightAsInt() const
Returns HIGHLIGHT_LABELWEIGHT as a list of int.
int widthAsInt() const
Returns WIDTH parameter as an int or its default value if not defined.
void load(const QUrlQuery &query)
Loads new parameters.
double layerTitleSpaceAsDouble() const
Returns LAYERTITLESPACE as a double.
QString layerTitle() const
Returns LAYERTITLE parameter or an empty string if not defined.
QString symbolSpace() const
Returns SYMBOLSPACE parameter or an empty string if not defined.
QString layerFontColor() const
Returns LAYERFONTCOLOR parameter or an empty string if not defined.
Exception thrown in case of malformed request.
Format infoFormat() const
Returns infoFormat.
double layerSpaceAsDouble() const
Returns LAYERSPACE as a double or its default value if not defined.
QString featureCount() const
Returns FEATURE_COUNT parameter or an empty string if none is defined.
bool transparentAsBool() const
Returns TRANSPARENT parameter as a bool or its default value if not defined.
QString layerFontFamily() const
Returns LAYERFONTFAMILY parameter or an empty string if not defined.
DxfFormatOption
Options for DXF format.
QString symbolWidth() const
Returns SYMBOLWIDTH parameter or an empty string if not defined.
QStringList selections() const
Returns the list of feature selection found in SELECTION parameter.
bool withMapTip() const
withMapTip
QString bbox() const
Returns BBOX if defined or an empty string.
double iconLabelSpaceAsDouble() const
Returns ICONLABELSPACE as a double or its default value if not defined.
bool ruleLabelAsBool() const
Returns RULELABEL as a bool.
void raiseError() const
Raises an error in case of an invalid conversion.
bool showFeatureCountAsBool() const
Returns SHOWFEATURECOUNT as a bool.
QStringList highlightSymbol() const
Returns HIGHLIGHT_SYMBOL as a list of string.
QList< int > highlightLabelSizeAsInt() const
Returns HIGHLIGHT_LABELSIZE as a list of int An exception is raised if an invalid size is found...
double itemFontSizeAsDouble() const
Returns ITEMFONTSIZE as a double.
double toDouble(bool &ok) const
Converts the parameter into a double.
QStringList allLayersNickname() const
Returns nickname of layers found in LAYER and LAYERS parameters.
int lineToleranceAsInt() const
Returns FI_LINE_TOLERANCE parameter as an integer.
QUrl toUrl(bool &ok) const
Converts the parameter into an url.
void setFont(const QFont &font)
The font for this style.
QStringList opacities() const
Returns the list of opacities found in OPACITIES parameter.
QString x() const
Returns X parameter or an empty string if not defined.
QString layoutParameter(const QString &id, bool &ok) const
Returns a layout parameter thanks to its id.
QList< double > toDoubleList(bool &ok, char delimiter=',') const
Converts the parameter into a list of doubles.
QString itemFontColor() const
Returns ITEMFONTCOLOR parameter or an empty string if not defined.
QString itemFontItalic() const
Returns ITEMFONTITALIC parameter or an empty string if not defined.
QStringList highlightLabelString() const
Returns HIGHLIGHT_LABELSTRING as a list of string.
QString crs() const
Returns CRS or an empty string if none is defined.
bool isEmpty() const
Returns true if the rectangle is empty.
QList< int > toIntList(bool &ok, char delimiter=',') const
Converts the parameter into a list of integers.
QgsRectangle toRectangle(bool &ok) const
Converts the parameter into a rectangle.
QString filterGeom() const
Returns the filter geometry found in FILTER_GEOM parameter.
QString layerSpace() const
Returns LAYERSPACE parameter or an empty string if not defined.
A class to describe the version of a project.
QStringList highlightLabelSize() const
Returns HIGHLIGHT_LABELSIZE as a list of string.
Provides an interface to retrieve and manipulate WMS parameters received from the client...
int infoFormatVersion() const
Returns the infoFormat version for GML.
static void logMessage(const QString &message, const QString &tag=QString(), Qgis::MessageLevel level=Qgis::Warning, bool notifyUser=true)
Adds a message to the log instance (and creates it if necessary).
QStringList highlightLabelBufferColor() const
Returns HIGHLIGHT_LABELBUFFERCOLOR as a list of string.
QString version() const
Returns VERSION parameter as a string or an empty string if not defined.
The QgsLegendSettings class stores the appearance and layout settings for legend drawing with QgsLege...
QUrlQuery urlQuery() const
Returns a url query with underlying parameters.
QString imageQuality() const
Returns IMAGE_QUALITY parameter or an empty string if not defined.
QList< QgsWmsParametersHighlightLayer > mHighlightLayers
QString loadUrl() const
Loads the data associated to the parameter converted into an url.
void setTitle(const QString &t)
QString composerTemplate() const
Returns TEMPLATE parameter or an empty string if not defined.
QgsProjectVersion versionAsNumber() const
Returns VERSION parameter if defined or its default value.
QgsWmsParameters()
Constructor for WMS parameters with default values only.
void setMargin(Side side, double margin)
void setParam(const QString &key, const QString &value)
Sets a generic parameter value on the URI.
QColor toColor(bool &ok) const
Converts the parameter into a color.
QStringList toStringList(char delimiter=',', bool skipEmptyParts=true) const
Converts the parameter into a list of strings.
QStringList queryLayersNickname() const
Returns nickname of layers found in QUERY_LAYERS parameter.
void setFontColor(const QColor &c)
QgsWmsParametersFilter::Type mType
int pointToleranceAsInt() const
Returns FI_POINT_TOLERANCE parameter as an integer.
Format format() const
Returns format.
Keeps the number of features and export symbology per feature (using the first symbol level) ...
QgsOgcUtils::FilterVersion mVersion
void set(QgsWmsParameter::Name name, const QVariant &value)
Sets a parameter value thanks to its name.
bool itemFontItalicAsBool() const
Returns ITEMFONTITALIC as a boolean or its default value if not defined.
int polygonToleranceAsInt() const
Returns FI_POLYGON_TOLERANCE parameter as an integer.
QList< double > toDoubleList(const char delimiter=',') const
Converts the parameter into a list of doubles.
bool layerTitleAsBool() const
Returns LAYERTITLE as a bool or its default value if not defined.
Median cut implementation.
bool withGeometry() const
Returns if the client wants the feature info response with geometry information.
double symbolWidthAsDouble() const
Returns SYMBOLWIDTH as a double or its default value if not defined.
void setLayerFontColor(const QColor &fontColor)
Sets layer font color to fontColor Overrides fontColor()
int heightAsInt() const
Returns HEIGHT parameter as an int or its default value if not defined.
QString layerTitleSpace() const
Returns LAYERTITLESPACE parameter or an empty string if not defined.
int wmsPrecisionAsInt() const
Returns WMS_PRECISION parameter as an int or its default value if not defined.
double boxSpaceAsDouble() const
Returns BOXSPACE as a double or its default value if not defined.
QgsLegendStyle & rstyle(QgsLegendStyle::Style s)
Returns reference to modifiable style.
int toInt(bool &ok) const
Converts the parameter into an integer.
QList< QgsWmsParametersExternalLayer > mExternalLayers
QStringList allStyles() const
Returns styles found in STYLE and STYLES parameters.
int jAsInt() const
Returns J parameter as an int or its default value if not defined.
double scaleAsDouble() const
Returns SCALE as a double.
QFont itemFont() const
Returns the item font (built thanks to the ITEMFONTFAMILY, ITEMFONTSIZE, ITEMFONTBOLD, ...
QColor layerFontColorAsColor() const
Returns LAYERFONTCOLOR as a color or its defined value if not defined.
QgsWmsParameter operator[](QgsWmsParameter::Name name) const
Returns the parameter corresponding to name.
QString name() const
Returns the name of the parameter.
QString pointTolerance() const
Returns FI_POINT_TOLERANCE parameter or an empty string if not defined.
QgsServerParameters provides an interface to retrieve and manipulate global parameters received from ...
QByteArray encodedUri() const
Returns the complete encoded URI as a byte array.
QString toString(bool defaultValue=false) const
Converts the parameter into a string.
double dxfScale() const
Returns the DXF SCALE parameter.
QString boxSpace() const
Returns BOXSPACE parameter or an empty string if not defined.
QString width() const
Returns WIDTH parameter or an empty string if not defined.
virtual bool isValid() const
Returns true if the parameter is valid, false otherwise.
bool itemFontBoldAsBool() const
Returns ITEMFONTBOLD as a boolean or its default value if not defined.
QgsWmsParameter(const QgsWmsParameter::Name name=QgsWmsParameter::UNKNOWN, const QVariant::Type type=QVariant::String, const QVariant defaultValue=QVariant(""))
Constructor for QgsWmsParameter.
QString polygonTolerance() const
Returns FI_POLYGON_TOLERANCE parameter or an empty string if not defined.
QString symbolHeight() const
Returns SYMBOLHEIGHT parameter or an empty string if not defined.
QStringList atlasPk() const
Returns the ATLAS_PK parameter.
QList< int > opacitiesAsInt() const
Returns the list of opacities found in OPACITIES parameter as integers.
QList< int > toIntList(const char delimiter=',') const
Converts the parameter into a list of integers.
QColor itemFontColorAsColor() const
Returns ITEMFONTCOLOR as a color.
QString formatAsString() const
Returns FORMAT parameter as a string.
QStringList dxfLayerAttributes() const
Returns the DXF LAYERATTRIBUTES parameter.
bool layerFontBoldAsBool() const
Returns LAYERFONTBOLD as a boolean or its default value if not defined.
QString lineTolerance() const
Returns FI_LINE_TOLERANCE parameter or an empty string if not defined.
QString height() const
Returns HEIGHT parameter or an empty string if not defined.
QString rule() const
Returns RULE parameter or an empty string if none is defined.
QStringList toStyleList(const char delimiter=',') const
Converts the parameter into a list of strings and keeps empty parts Default style value is an empty s...
QString y() const
Returns Y parameter or an empty string if not defined.
int srcWidthAsInt() const
Returns SRCWIDTH parameter as an int or its default value if not defined.
QColor backgroundColorAsColor() const
Returns BGCOLOR parameter as a QColor or its default value if not defined.
QList< QgsGeometry > toGeomList(bool &ok, char delimiter=',') const
Converts the parameter into a list of geometries.
QString layerFontItalic() const
Returns LAYERFONTITALIC parameter or an empty string if not defined.
QString wmtver() const
Returns WMTVER parameter or an empty string if not defined.
QMap< DxfFormatOption, QString > dxfFormatOptions() const
Returns a map of DXF options defined within FORMAT_OPTIONS parameter.
QString showFeatureCount() const
Returns SHOWFEATURECOUNT parameter or an empty string if none is defined.
QString srcHeight() const
Returns SRCHEIGHT parameter or an empty string if not defined.
Class for storing the component parts of a RDBMS data source URI (e.g.
QList< QgsWmsParametersExternalLayer > externalLayersParameters() const
Returns parameters for each external layer.
QString dpi() const
Returns DPI parameter or an empty string if not defined.
QString infoFormatAsString() const
Returns INFO_FORMAT parameter as a string.
int iAsInt() const
Returns I parameter as an int or its default value if not defined.
bool layerFontItalicAsBool() const
Returns LAYERFONTITALIC as a boolean or its default value if not defined.
QList< QgsWmsParametersLayer > layersParameters() const
Returns parameters for each layer found in LAYER/LAYERS.
bool infoFormatIsImage() const
Checks if INFO_FORMAT parameter is one of the image formats (PNG, JPG).
QString itemFontBold() const
Returns ITEMFONTBOLD parameter or an empty string if not defined.
QgsWmsParametersComposerMap composerMapParameters(int mapId) const
Returns the requested parameters for a composer map parameter.
QString iconLabelSpace() const
Returns ICONLABELSPACE parameter or an empty string if not defined.
QList< QColor > toColorList(bool &ok, char delimiter=',') const
Converts the parameter into a list of colors.
QList< QgsWmsParametersFilter > mFilter
QStringList highlightLabelColor() const
Returns HIGHLIGHT_LABELCOLOR as a list of string.
QColor toColor() const
Converts the parameter into a color.
WMS parameter received from the client.
double layerFontSizeAsDouble() const
Returns LAYERFONTSIZE as a double.
QStringList highlightGeom() const
Returns HIGHLIGHT_GEOM as a list of string in WKT.
QList< QgsGeometry > highlightGeomAsGeom() const
Returns HIGHLIGHT_GEOM as a list of geometries.
QList< QColor > highlightLabelBufferColorAsColor() const
Returns HIGHLIGHT_LABELBUFFERCOLOR as a list of colors.
QString ruleLabel() const
Returns RULELABEL parameter or an empty string if none is defined.
QString externalWMSUri(const QString &id) const
Returns the external WMS uri.
QString itemFontFamily() const
Returns ITEMFONTFAMILY parameter or an empty string if not defined.
QString wmsPrecision() const
Returns WMS_PRECISION parameter or an empty string if not defined.
int xAsInt() const
Returns X parameter as an int or its default value if not defined.
QStringList highlightLabelFont() const
Returns HIGHLIGHT_LABELFONT.
Name
Available parameters for WMS requests.
Exports one feature per symbol layer (considering symbol levels)
Definition of a parameter with basic conversion methods.