32                                     const QVariant::Type type,
 
   33                                     const QVariant defaultValue )
 
   62       const QString msg = QString( 
"%1 ('%2') cannot be converted into a list of geometries" ).arg( 
name( 
mName ), 
toString() );
 
   76       const QString msg = QString( 
"%1 ('%2') cannot be converted into a rectangle" ).arg( 
name( 
mName ), 
toString() );
 
   99     const QUrl url = 
toUrl();
 
  106       const QString msg = QString( 
"%1 request error for %2" ).arg( 
name( 
mName ), url.toString() );
 
  146       const QString msg = QString( 
"%1 ('%2') cannot be converted into a list of colors" ).arg( 
name( 
mName ), 
toString() );
 
  160       const QString msg = QString( 
"%1 ('%2') cannot be converted into a list of int" ).arg( 
name( 
mName ), 
toString() );
 
  174       const QString msg = QString( 
"%1 ('%2') cannot be converted into a list of float" ).arg( 
name( 
mName ), 
toString() );
 
  201     const QMetaEnum metaEnum( QMetaEnum::fromType<QgsWmsParameter::Name>() );
 
  202     return metaEnum.valueToKey( 
name );
 
  207     const QMetaEnum metaEnum( QMetaEnum::fromType<QgsWmsParameter::Name>() );
 
  265     save( pIcLabelSpace );
 
  268     save( pItFontFamily );
 
  278     save( pItFontItalic );
 
  287                                         QVariant( 
"black" ) );
 
  288     save( pItFontColor );
 
  291     save( pHighlightGeom );
 
  296     save( pShowFeatureCount );
 
  299     save( pHighlightSymbol );
 
  302     save( pHighlightLabel );
 
  306                                            QVariant( 
"black" ) );
 
  307     save( pHighlightColor );
 
  310     save( pHighlightFontSize );
 
  313     save( pHighlightFontWeight );
 
  316     save( pHighlightFont );
 
  320         QVariant( 
"black" ) );
 
  321     save( pHighlightBufferColor );
 
  324     save( pHighlightBufferSize );
 
  409     save( pQueryLayers );
 
  414     save( pFeatureCount );
 
  422     save( pLayerFtFamily );
 
  427     save( pLayerFtBold );
 
  432     save( pLayerFtItalic );
 
  437     save( pLayerFtSize );
 
  441                                          QVariant( 
"black" ) );
 
  442     save( pLayerFtColor );
 
  480     save( pWmsPrecision );
 
  485     save( pTransparent );
 
  489                                     QVariant( 
"white" ) );
 
  521     save( pWithGeometry );
 
  532                                     QVariant::StringList );
 
  546     if ( !sld.isEmpty() )
 
  558     return mWmsParameters[name];
 
  563     mWmsParameters[name].mValue = 
value;
 
  566   bool QgsWmsParameters::loadParameter( 
const QString &key, 
const QString &value )
 
  570     const QRegExp composerParamRegExp( QStringLiteral( 
"^MAP\\d+:" ), Qt::CaseInsensitive );
 
  571     if ( key.contains( composerParamRegExp ) )
 
  573 #if QT_VERSION < QT_VERSION_CHECK(5, 15, 2) 
  574       const int mapId = key.midRef( 3, key.indexOf( 
':' ) - 3 ).toInt();
 
  576       const int mapId = QStringView {key}.mid( 3, key.indexOf( 
':' ) - 3 ).toInt();
 
  578       const QString theKey = key.mid( key.indexOf( 
':' ) + 1 );
 
  583         QgsWmsParameter param = mWmsParameters[name];
 
  584         param.mValue = 
value;
 
  587         if ( ! param.isValid() )
 
  601         mWmsParameters[name].mValue = 
value;
 
  602         if ( ! mWmsParameters[name].isValid() )
 
  604           mWmsParameters[name].raiseError();
 
  611         int separator = key.indexOf( QLatin1Char( 
':' ) );
 
  612         if ( separator >= 1 )
 
  614           QString 
id = key.left( separator );
 
  615           QString param = key.right( key.length() - separator - 1 );
 
  616           mExternalWMSParameters[id].insert( param, 
value );
 
  628     log( QStringLiteral( 
"WMS Request parameters:" ) );
 
  629     for ( 
auto parameter : mWmsParameters.toStdMap() )
 
  631       const QString 
value = parameter.second.toString();
 
  633       if ( ! 
value.isEmpty() )
 
  637         if ( parameter.second.mId >= 0 )
 
  639           name = QStringLiteral( 
"%1:%2" ).arg( QString::number( parameter.second.mId ), name );
 
  642         log( QStringLiteral( 
" - %1 : %2" ).arg( name, 
value ) );
 
  647       log( QStringLiteral( 
" - VERSION : %1" ).arg( 
version() ) );
 
  650   void QgsWmsParameters::save( 
const QgsWmsParameter ¶meter, 
bool multi )
 
  654       mWmsParameters.insertMulti( parameter.
mName, parameter );
 
  658       mWmsParameters[ parameter.
mName ] = parameter;
 
  685     if ( !srs.isEmpty() && 
crs.isEmpty() )
 
  687     else if ( srs.isEmpty() && !
crs.isEmpty() )
 
  689     else if ( !srs.isEmpty() && !
crs.isEmpty() )
 
  766       version = QStringLiteral( 
"1.3.0" );
 
  770       if ( ! 
wmtver().isEmpty() )
 
  776         version = QStringLiteral( 
"1.3.0" );
 
  786         version = QStringLiteral( 
"1.1.1" );
 
  790         version = QStringLiteral( 
"1.3.0" );
 
  801     if ( 
version().compare( QLatin1String( 
"1.1.1" ) ) == 0
 
  802          && req.compare( QLatin1String( 
"capabilities" ), Qt::CaseInsensitive ) == 0 )
 
  804       req = QStringLiteral( 
"GetCapabilities" );
 
  827     const QMetaEnum metaEnum( QMetaEnum::fromType<QgsWmsParameters::Format>() );
 
  828     return metaEnum.valueToKey( 
format );
 
  836     if ( fStr.compare( QLatin1String( 
"image/png" ), Qt::CaseInsensitive ) == 0 ||
 
  837          fStr.compare( QLatin1String( 
"png" ), Qt::CaseInsensitive ) == 0 )
 
  841     else if ( fStr.compare( QLatin1String( 
"jpg" ), Qt::CaseInsensitive ) == 0
 
  842               || fStr.compare( QLatin1String( 
"jpeg" ), Qt::CaseInsensitive ) == 0
 
  843               || fStr.compare( QLatin1String( 
"image/jpeg" ), Qt::CaseInsensitive ) == 0 )
 
  847     else if ( fStr.compare( QLatin1String( 
"image/svg" ), Qt::CaseInsensitive ) == 0 ||
 
  848               fStr.compare( QLatin1String( 
"image/svg+xml" ), Qt::CaseInsensitive ) == 0 ||
 
  849               fStr.compare( QLatin1String( 
"svg" ), Qt::CaseInsensitive ) == 0 )
 
  853     else if ( fStr.compare( QLatin1String( 
"application/pdf" ), Qt::CaseInsensitive ) == 0 ||
 
  854               fStr.compare( QLatin1String( 
"pdf" ), Qt::CaseInsensitive ) == 0 )
 
  858     else if ( fStr.compare( QLatin1String( 
"application/json" ), Qt::CaseInsensitive ) == 0 ||
 
  859               fStr.compare( QLatin1String( 
"json" ), Qt::CaseInsensitive ) == 0 )
 
  881     if ( fStr.isEmpty() )
 
  884     if ( fStr.startsWith( QLatin1String( 
"text/xml" ), Qt::CaseInsensitive ) )
 
  886     else if ( fStr.startsWith( QLatin1String( 
"text/html" ), Qt::CaseInsensitive ) )
 
  888     else if ( fStr.startsWith( QLatin1String( 
"text/plain" ), Qt::CaseInsensitive ) )
 
  890     else if ( fStr.startsWith( QLatin1String( 
"application/vnd.ogc.gml" ), Qt::CaseInsensitive ) )
 
  892     else if ( fStr.startsWith( QLatin1String( 
"application/json" ), Qt::CaseInsensitive )
 
  893               || fStr.startsWith( QLatin1String( 
"application/geo+json" ), Qt::CaseInsensitive ) )
 
  907     if ( fStr.startsWith( QLatin1String( 
"application/vnd.ogc.gml/3" ), Qt::CaseInsensitive ) )
 
 1221     font.fromString( 
"" );
 
 1237     font.fromString( 
"" );
 
 1388     QStringList results;
 
 1390     while ( pos < filter.size() )
 
 1392       if ( pos + 1 < filter.size() && filter[pos] == 
'(' && filter[pos + 1] == 
'<' )
 
 1395         int posEnd = filter.indexOf( 
"Filter>)", pos );
 
 1398           posEnd = filter.size();
 
 1400         results.append( filter.mid( pos + 1, posEnd - pos + 6 ) );
 
 1403       else if ( pos + 1 < filter.size() && filter[pos] == 
'(' && filter[pos + 1] == 
')' )
 
 1406         results.append( 
"" );
 
 1409       else if ( filter[pos] == 
'<' )
 
 1412         results.append( filter.mid( pos ) );
 
 1418         int posEnd = filter.indexOf( 
';', pos + 1 );
 
 1421           posEnd = filter.size();
 
 1423         results.append( filter.mid( pos, posEnd - pos ) );
 
 1454     return layer << layers;
 
 1466     return style << styles;
 
 1469   QMultiMap<QString, QgsWmsParametersFilter> QgsWmsParameters::layerFilters( 
const QStringList &layers )
 const 
 1471     const QString nsWfs2 = QStringLiteral( 
"http://www.opengis.net/fes/2.0" );
 
 1472     const QString prefixWfs2 = QStringLiteral( 
"<fes:" );
 
 1474     const QStringList rawFilters = 
filters();
 
 1475     QMultiMap<QString, QgsWmsParametersFilter> 
filters;
 
 1476     for ( 
int i = 0; 
i < rawFilters.size(); 
i++ )
 
 1478       const QString f = rawFilters[
i];
 
 1479       if ( f.startsWith( QLatin1Char( 
'<' ) ) \
 
 1480            && f.endsWith( QLatin1String( 
"Filter>" ) ) \
 
 1481            &&  
i < layers.size() )
 
 1488         if ( filter.
mFilter.contains( nsWfs2 ) \
 
 1489              || filter.
mFilter.contains( prefixWfs2 ) )
 
 1494         filters.insert( layers[
i], filter );
 
 1496       else if ( !f.isEmpty() )
 
 1500         const int colonIndex = f.indexOf( 
':' );
 
 1501         if ( colonIndex != -1 )
 
 1503           const QString layers = f.section( 
':', 0, 0 );
 
 1504           const QString filter = f.section( 
':', 1 );
 
 1505           const QStringList layersList = layers.split( 
',' );
 
 1506           for ( 
const QString &layer : layersList )
 
 1508             QgsWmsParametersFilter parametersFilter;
 
 1509             parametersFilter.
mFilter = filter;
 
 1511             filters.insert( layer, parametersFilter );
 
 1517           raiseError( QStringLiteral( 
"FILTER ('" ) + filterStr + QStringLiteral( 
"') is not properly formatted" ) );
 
 1526     bool force2D = 
false;
 
 1529     if ( options.contains( DxfFormatOption::FORCE_2D ) )
 
 1531       force2D = QVariant( options[ DxfFormatOption::FORCE_2D ] ).toBool();
 
 1542     if ( options.contains( DxfFormatOption::NO_MTEXT ) )
 
 1544       noMText = QVariant( options[ DxfFormatOption::NO_MTEXT ] ).toBool();
 
 1556     const QMultiMap<QString, QgsWmsParametersFilter> 
filters = layerFilters( layers );
 
 1560     QMultiMap<QString, QString> layerSelections;
 
 1561     for ( 
const QString &s : selection )
 
 1563       const QStringList splits = s.split( 
':' );
 
 1564       if ( splits.size() == 2 )
 
 1566         layerSelections.insert( splits[0], splits[1] );
 
 1571         raiseError( QStringLiteral( 
"SELECTION ('" ) + selStr + QStringLiteral( 
"') is not properly formatted" ) );
 
 1575     QList<QgsWmsParametersLayer> parameters;
 
 1576     for ( 
int i = 0; 
i < layers.size(); 
i++ )
 
 1578       QString layer = layers[
i];
 
 1586       if ( isExternalLayer( layer ) )
 
 1594         if ( 
i < styles.count() )
 
 1597         if ( 
filters.contains( layer ) )
 
 1599           auto it = 
filters.find( layer );
 
 1600           while ( it != 
filters.end() && it.key() == layer )
 
 1602             param.
mFilter.append( it.value() );
 
 1607         if ( layerSelections.contains( layer ) )
 
 1609           QMultiMap<QString, QString>::const_iterator it;
 
 1610           it = layerSelections.constFind( layer );
 
 1611           while ( it != layerSelections.constEnd() && it.key() == layer )
 
 1619       parameters.append( param );
 
 1627     QList<QgsWmsParametersHighlightLayer> params;
 
 1638     int nLayers = std::min( geoms.size(), slds.size() );
 
 1639     for ( 
int i = 0; 
i < nLayers; 
i++ )
 
 1642       param.
mName = QStringLiteral( 
"highlight_" ) + QString::number( 
i );
 
 1644       param.
mSld = slds[
i];
 
 1646       if ( 
i < labels.count() )
 
 1649       if ( 
i < colors.count() )
 
 1652       if ( 
i < sizes.count() )
 
 1655       if ( 
i < weights.count() )
 
 1658       if ( 
i < fonts.count() )
 
 1659         param.
mFont = fonts[ 
i ];
 
 1661       if ( 
i < bufferColors.count() )
 
 1664       if ( 
i < bufferSizes.count() )
 
 1667       params.append( param );
 
 1675     auto notExternalLayer = []( 
const QString & name ) { 
return ! QgsWmsParameters::isExternalLayer( name ); };
 
 1677     QList<QgsWmsParametersExternalLayer> externalLayers;
 
 1680     QStringList::iterator rit = std::remove_if( layers.begin(), layers.end(), notExternalLayer );
 
 1682     for ( QStringList::iterator it = layers.begin(); it != rit; ++it )
 
 1684       externalLayers << externalLayerParameter( *it );
 
 1687     return externalLayers;
 
 1719     if ( extentStr.isEmpty() )
 
 1724     QString pMapId = QStringLiteral( 
"MAP" ) + QString::number( mapId );
 
 1754     double gridx( -1 ), gridy( -1 );
 
 1768     if ( gridx != -1 && gridy != -1 )
 
 1775     QStringList allLayers;
 
 1784     QList<QgsWmsParametersExternalLayer> eParams;
 
 1786     for ( 
const auto &layer : std::as_const( allLayers ) )
 
 1788       if ( isExternalLayer( layer ) )
 
 1791         layers << extParam.
mName;
 
 1806     QList<QgsWmsParametersLayer> lParams;
 
 1807     for ( 
int i = 0; 
i < layers.size(); 
i++ )
 
 1809       QString layer = layers[
i];
 
 1813       if ( 
i < styles.count() )
 
 1816       lParams.append( lParam );
 
 1821     QList<QgsWmsParametersHighlightLayer> hParams;
 
 1823     QList<QgsGeometry> geoms;
 
 1851     QList<QColor> colors;
 
 1872     QList<QColor> bufferColors;
 
 1879     QList<double> bufferSizes;
 
 1886     int nHLayers = std::min( geoms.size(), slds.size() );
 
 1887     for ( 
int i = 0; 
i < nHLayers; 
i++ )
 
 1890       hParam.
mName = pMapId + QStringLiteral( 
"_highlight_" ) + QString::number( 
i );
 
 1892       hParam.
mSld = slds[
i];
 
 1894       if ( 
i < labels.count() )
 
 1897       if ( 
i < colors.count() )
 
 1900       if ( 
i < sizes.count() )
 
 1903       if ( 
i < weights.count() )
 
 1906       if ( 
i < fonts.count() )
 
 1907         hParam.
mFont = fonts[ 
i ];
 
 1909       if ( 
i < bufferColors.count() )
 
 1912       if ( 
i < bufferSizes.count() )
 
 1915       hParams.append( hParam );
 
 1924     if ( !mExternalWMSParameters.contains( 
id ) )
 
 1930     const QMap<QString, QString> ¶mMap = mExternalWMSParameters[ id ];
 
 1931     QMap<QString, QString>::const_iterator paramIt = paramMap.constBegin();
 
 1932     for ( ; paramIt != paramMap.constEnd(); ++paramIt )
 
 1934       QString paramName = paramIt.key().toLower();
 
 1935       if ( paramName == QLatin1String( 
"layers" ) || paramName == QLatin1String( 
"styles" ) || paramName == QLatin1String( 
"opacities" ) )
 
 1937         const QStringList values = paramIt.value().split( 
',' );
 
 1938         for ( 
const QString &
value : values )
 
 1943         wmsUri.
setParam( paramName, paramIt.value() );
 
 1964   void QgsWmsParameters::log( 
const QString &msg )
 const 
 1969   void QgsWmsParameters::raiseError( 
const QString &msg )
 const 
 1974   QgsWmsParameter QgsWmsParameters::idParameter( 
const QgsWmsParameter::Name name, 
const int id )
 const 
 1978     for ( 
const auto ¶m : mWmsParameters.values( name ) )
 
 1980       if ( param.mId == 
id )
 
 1989   QgsWmsParametersExternalLayer QgsWmsParameters::externalLayerParameter( 
const QString &name )
 const 
 1991     QgsWmsParametersExternalLayer param;
 
 2000   bool QgsWmsParameters::isExternalLayer( 
const QString &name )
 
 2007     QStringList attributes;
 
 2010     if ( options.contains( DxfFormatOption::LAYERATTRIBUTES ) )
 
 2012       attributes = options[ DxfFormatOption::LAYERATTRIBUTES ].split( 
',' );
 
 2023     if ( options.contains( DxfFormatOption::USE_TITLE_AS_LAYERNAME ) )
 
 2025       use = QVariant( options[ DxfFormatOption::USE_TITLE_AS_LAYERNAME ] ).toBool();
 
 2036     if ( options.contains( DxfFormatOption::SCALE ) )
 
 2038       scale = options[ DxfFormatOption::SCALE ].toDouble();
 
 2050     if ( ! options.contains( DxfFormatOption::MODE ) )
 
 2055     const QString mode = options[ DxfFormatOption::MODE ];
 
 2056     if ( mode.compare( QLatin1String( 
"SymbolLayerSymbology" ), Qt::CaseInsensitive ) == 0 )
 
 2060     else if ( mode.compare( QLatin1String( 
"FeatureSymbology" ), Qt::CaseInsensitive ) == 0 )
 
 2070     QString codec = QStringLiteral( 
"ISO-8859-1" );
 
 2082     QMap<QgsWmsParameters::DxfFormatOption, QString> options;
 
 2084     const QMetaEnum metaEnum( QMetaEnum::fromType<QgsWmsParameters::DxfFormatOption>() );
 
 2087     for ( 
auto it = opts.constBegin(); it != opts.constEnd(); ++it )
 
 2089       const int equalIdx = it->indexOf( 
':' );
 
 2090       if ( equalIdx > 0 && equalIdx < ( it->length() - 1 ) )
 
 2092         const QString name = it->left( equalIdx ).toUpper();
 
 2095         const QString 
value = it->right( it->length() - equalIdx - 1 );
 
 2096         options.insert( option, 
value );
 
 2105     QMap<QString, QString> dimValues;
 
 2106     const QMetaEnum pnMetaEnum( QMetaEnum::fromType<QgsVectorLayerServerProperties::PredefinedWmsDimensionName>() );
 
 2108     for ( 
const QString &key : unmanagedNames )
 
 2110       if ( key.startsWith( QLatin1String( 
"DIM_" ) ) )
 
 2114       else if ( pnMetaEnum.keyToValue( key.toUpper().toStdString().c_str() ) != -1 )
 
Exception thrown in case of malformed request.
Class for storing the component parts of a RDBMS data source URI (e.g.
QByteArray encodedUri() const
Returns the complete encoded URI as a byte array.
void setParam(const QString &key, const QString &value)
Sets a generic parameter value on the URI.
@ FeatureSymbology
Keeps the number of features and export symbology per feature (using the first symbol level)
@ SymbolLayerSymbology
Exports one feature per symbol layer (considering symbol levels)
@ NoSymbology
Export only data.
The QgsLegendSettings class stores the appearance and layout settings for legend drawing with QgsLege...
void setFontColor(const QColor &c)
Sets the font color used for legend items.
void setLayerFontColor(const QColor &fontColor)
Sets layer font color to fontColor Overrides fontColor()
void setTitle(const QString &t)
Sets the title for the legend, which will be rendered above all legend items.
QgsLegendStyle & rstyle(QgsLegendStyle::Style s)
Returns modifiable reference to the style for a legend component.
void setBoxSpace(double s)
Sets the legend box space (in millimeters), which is the empty margin around the inside of the legend...
void setSymbolSize(QSizeF s)
Sets the default symbol size (in millimeters) used for legend items.
void setMargin(Side side, double margin)
Sets the margin (in mm) for the specified side of the component.
void setFont(const QFont &font)
Sets the font used for rendering this legend component.
static void logMessage(const QString &message, const QString &tag=QString(), Qgis::MessageLevel level=Qgis::MessageLevel::Warning, bool notifyUser=true)
Adds a message to the log instance (and creates it if necessary).
A class to describe the version of a project.
A rectangle specified with double values.
bool isEmpty() const
Returns true if the rectangle is empty.
Definition of a parameter with basic conversion methods.
QList< QgsGeometry > toGeomList(bool &ok, char delimiter=',') const
Converts the parameter into a list of geometries.
QString loadUrl(bool &ok) const
Loads the data associated to the parameter converted into an url.
QUrl toUrl(bool &ok) const
Converts the parameter into an url.
QString toString(bool defaultValue=false) const
Converts the parameter into a string.
QList< double > toDoubleList(bool &ok, char delimiter=',') const
Converts the parameter into a list of doubles.
QStringList toStringList(char delimiter=',', bool skipEmptyParts=true) const
Converts the parameter into a list of strings.
virtual bool isValid() const
Returns true if the parameter is valid, false otherwise.
QString typeName() const
Returns the type of the parameter as a string.
static void raiseError(const QString &msg)
Raises an exception in case of an invalid parameters.
int toInt(bool &ok) const
Converts the parameter into an integer.
QList< int > toIntList(bool &ok, char delimiter=',') const
Converts the parameter into a list of integers.
QColor toColor(bool &ok) const
Converts the parameter into a color.
double toDouble(bool &ok) const
Converts the parameter into a double.
QgsRectangle toRectangle(bool &ok) const
Converts the parameter into a rectangle.
QList< QColor > toColorList(bool &ok, char delimiter=',') const
Converts the parameter into a list of colors.
QgsServerParameters provides an interface to retrieve and manipulate global parameters received from ...
virtual QString request() const
Returns REQUEST parameter as a string or an empty string if not defined.
QUrlQuery urlQuery() const
Returns a url query with underlying parameters.
QMap< QString, QString > mUnmanagedParameters
void load(const QUrlQuery &query)
Loads new parameters.
virtual QString version() const
Returns VERSION parameter as a string or an empty string if not defined.
QString value(const QString &key) const
Returns the value of a parameter.
@ QGIS_InvalidParameterValue
WMS parameter received from the client.
int toInt() const
Converts the parameter into an integer.
QList< double > toDoubleList(const char delimiter=',') const
Converts the parameter into a list of doubles.
QList< QColor > toColorList(const char delimiter=',') const
Converts the parameter into a list of colors.
double toDouble() const
Converts the parameter into a double.
void raiseError() const
Raises an error in case of an invalid conversion.
Name
Available parameters for WMS requests.
@ HIGHLIGHT_LABELBUFFERCOLOR
@ HIGHLIGHT_LABELBUFFERSIZE
QUrl toUrl() const
Converts the parameter into an url.
QList< QgsGeometry > toGeomList(const char delimiter=',') const
Converts the parameter into a list of geometries.
bool isValid() const override
Returns true if the parameter is valid, false otherwise.
QString name() const
Returns the name of the parameter.
QgsRectangle toRectangle() const
Converts the parameter into a rectangle.
QgsWmsParameter(const QgsWmsParameter::Name name=QgsWmsParameter::UNKNOWN, const QVariant::Type type=QVariant::String, const QVariant defaultValue=QVariant(""))
Constructor for QgsWmsParameter.
QColor toColor() const
Converts the parameter into a color.
QgsWmsParameter::Name mName
QList< int > toIntList(const char delimiter=',') const
Converts the parameter into a list of integers.
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 loadUrl() const
Loads the data associated to the parameter converted into an url.
Provides an interface to retrieve and manipulate WMS parameters received from the client.
QString rule() const
Returns RULE parameter or an empty string if none is defined.
QString layerTitle() const
Returns LAYERTITLE parameter or an empty string if not defined.
double layerSpaceAsDouble() const
Returns LAYERSPACE as a double or its default value if not defined.
QString boxSpace() const
Returns BOXSPACE parameter or an empty string if not defined.
QString wmsPrecision() const
Returns WMS_PRECISION parameter or an empty string if not defined.
double dxfScale() const
Returns the DXF SCALE parameter.
QString featureCount() const
Returns FEATURE_COUNT parameter or an empty string if none is defined.
QFont layerFont() const
Returns the layer font (built thanks to the LAYERFONTFAMILY, LAYERFONTSIZE, LAYERFONTBOLD,...
QList< int > opacitiesAsInt() const
Returns the list of opacities found in OPACITIES parameter as integers.
bool transparentAsBool() const
Returns TRANSPARENT parameter as a bool or its default value if not defined.
QString transparent() const
Returns TRANSPARENT parameter or an empty string if not defined.
QList< int > highlightLabelWeightAsInt() const
Returns HIGHLIGHT_LABELWEIGHT as a list of int.
QString iconLabelSpace() const
Returns ICONLABELSPACE parameter or an empty string if not defined.
QString layerTitleSpace() const
Returns LAYERTITLESPACE parameter or an empty string if not defined.
QString x() const
Returns X parameter or an empty string if not defined.
QString layerSpace() const
Returns LAYERSPACE 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.
QMap< DxfFormatOption, QString > dxfFormatOptions() const
Returns a map of DXF options defined within FORMAT_OPTIONS parameter.
QStringList highlightLabelBufferSize() const
Returns HIGHLIGHT_LABELBUFFERSIZE.
QStringList allLayersNickname() const
Returns nickname of layers found in LAYER and LAYERS parameters.
QString formatAsString() const
Returns FORMAT parameter as a string.
double layerFontSizeAsDouble() const
Returns LAYERFONTSIZE as a double.
QString externalWMSUri(const QString &id) const
Returns the external WMS uri.
QgsProjectVersion versionAsNumber() const
Returns VERSION parameter if defined or its default value.
QString scale() const
Returns SCALE parameter or an empty string if none is defined.
QString ruleLabel() const
Returns RULELABEL parameter or an empty string if none is defined.
double scaleAsDouble() const
Returns SCALE as a double.
bool layerFontItalicAsBool() const
Returns LAYERFONTITALIC as a boolean or its default value if not defined.
QgsWmsParametersComposerMap composerMapParameters(int mapId) const
Returns the requested parameters for a composer map parameter.
QgsRectangle bboxAsRectangle() const
Returns BBOX as a rectangle if defined and valid.
bool withGeometry() const
Returns if the client wants the feature info response with geometry information.
QStringList highlightLabelString() const
Returns HIGHLIGHT_LABELSTRING as a list of string.
QString tiled() const
Returns TILED parameter or an empty string if not defined.
QString layerFontSize() const
Returns LAYERFONTSIZE parameter or an empty string if not defined.
DxfFormatOption
Options for DXF format.
QList< QColor > highlightLabelColorAsColor() const
Returns HIGHLIGHT_LABELCOLOR as a list of color.
bool itemFontBoldAsBool() const
Returns ITEMFONTBOLD as a boolean or its default value if not defined.
void set(QgsWmsParameter::Name name, const QVariant &value)
Sets a parameter value thanks to its name.
QString pointTolerance() const
Returns FI_POINT_TOLERANCE parameter or an empty string if not defined.
QString filterGeom() const
Returns the filter geometry found in FILTER_GEOM parameter.
QString composerTemplate() const
Returns TEMPLATE parameter or an empty string if not defined.
Format infoFormat() const
Returns infoFormat.
QString dxfCodec() const
Returns the DXF CODEC parameter.
QString y() const
Returns Y parameter or an empty string if not defined.
QString srcHeight() const
Returns SRCHEIGHT parameter or an empty string if not defined.
double dpiAsDouble() const
Returns DPI parameter as an int or its default value if not defined.
void dump() const
Dumps parameters.
int pointToleranceAsInt() const
Returns FI_POINT_TOLERANCE parameter as an integer.
bool withMapTip() const
withMapTip
QString polygonTolerance() const
Returns FI_POLYGON_TOLERANCE parameter or an empty string if not defined.
QStringList highlightGeom() const
Returns HIGHLIGHT_GEOM as a list of string in WKT.
QString i() const
Returns I parameter or an empty string if not defined.
QList< QColor > highlightLabelBufferColorAsColor() const
Returns HIGHLIGHT_LABELBUFFERCOLOR as a list of colors.
QString request() const override
Returns REQUEST parameter as a string or an empty string if not defined.
double layerTitleSpaceAsDouble() const
Returns LAYERTITLESPACE as a double.
QList< QgsWmsParametersLayer > layersParameters() const
Returns parameters for each layer found in LAYER/LAYERS.
int lineToleranceAsInt() const
Returns FI_LINE_TOLERANCE parameter as an integer.
QList< double > highlightLabelBufferSizeAsFloat() const
Returns HIGHLIGHT_LABELBUFFERSIZE as a list of float.
QString lineTolerance() const
Returns FI_LINE_TOLERANCE parameter or an empty string if not defined.
bool showFeatureCountAsBool() const
Returns SHOWFEATURECOUNT as a bool.
QStringList highlightLabelColor() const
Returns HIGHLIGHT_LABELCOLOR as a list of string.
bool versionIsValid(const QString version) const
Returns true if version is valid, false otherwise.
QString j() const
Returns J parameter or an empty string if not defined.
int xAsInt() const
Returns X parameter as an int or its default value if not defined.
QColor layerFontColorAsColor() const
Returns LAYERFONTCOLOR as a color or its defined value if not defined.
QString bbox() const
Returns BBOX if defined or an empty string.
QgsWmsParameters()
Constructor for WMS parameters with default values only.
int heightAsInt() const
Returns HEIGHT parameter as an int or its default value if not defined.
QStringList highlightLabelWeight() const
Returns HIGHLIGHT_LABELWEIGHT as a list of string.
QString backgroundColor() const
Returns BGCOLOR parameter or an empty string if not defined.
QStringList allStyles() const
Returns styles found in STYLE and STYLES parameters.
double symbolWidthAsDouble() const
Returns SYMBOLWIDTH as a double or its default value if not defined.
QColor backgroundColorAsColor() const
Returns BGCOLOR parameter as a QColor or its default value if not defined.
Format format() const
Returns format.
QgsWmsParameter operator[](QgsWmsParameter::Name name) const
Returns the parameter corresponding to name.
QString itemFontSize() const
Returns ITEMFONTSIZE parameter or an empty string if not defined.
QStringList atlasPk() const
Returns the ATLAS_PK parameter.
QList< QgsGeometry > highlightGeomAsGeom() const
Returns HIGHLIGHT_GEOM as a list of geometries.
QString layerFontFamily() const
Returns LAYERFONTFAMILY parameter or an empty string if not defined.
QList< QgsWmsParametersHighlightLayer > highlightLayersParameters() const
Returns parameters for each highlight layer.
int iAsInt() const
Returns I parameter as an int or its default value if not defined.
QStringList highlightLabelBufferColor() const
Returns HIGHLIGHT_LABELBUFFERCOLOR as a list of string.
int polygonToleranceAsInt() const
Returns FI_POLYGON_TOLERANCE parameter as an integer.
QgsDxfExport::SymbologyExport dxfMode() const
Returns the DXF MODE parameter.
bool ruleLabelAsBool() const
Returns RULELABEL as a bool.
QList< int > highlightLabelSizeAsInt() const
Returns HIGHLIGHT_LABELSIZE as a list of int An exception is raised if an invalid size is found.
int widthAsInt() const
Returns WIDTH parameter as an int or its default value if not defined.
QString sldBody() const
Returns SLD_body if defined or an empty string.
bool itemFontItalicAsBool() const
Returns ITEMFONTITALIC as a boolean or its default value if not defined.
QColor itemFontColorAsColor() const
Returns ITEMFONTCOLOR as a color.
double itemFontSizeAsDouble() const
Returns ITEMFONTSIZE as a double.
QString layerFontColor() const
Returns LAYERFONTCOLOR parameter or an empty string if not defined.
QString layoutParameter(const QString &id, bool &ok) const
Returns a layout parameter thanks to its id.
bool dxfUseLayerTitleAsName() const
Returns the DXF USE_TITLE_AS_LAYERNAME parameter.
QString symbolHeight() const
Returns SYMBOLHEIGHT parameter or an empty string if not defined.
int imageQualityAsInt() const
Returns IMAGE_QUALITY parameter as an integer.
QMap< QString, QString > dimensionValues() const
Returns the dimensions parameter.
QList< QgsWmsParametersExternalLayer > externalLayersParameters() const
Returns parameters for each external layer.
int infoFormatVersion() const
Returns the infoFormat version for GML.
QString layerFontBold() const
Returns LAYERFONTBOLD parameter or an empty string if not defined.
QgsLegendSettings legendSettings() const
Returns legend settings.
int srcHeightAsInt() const
Returns SRCHEIGHT parameter as an int or its default value if not defined.
QString symbolSpace() const
Returns SYMBOLSPACE parameter or an empty string if not defined.
QString itemFontBold() const
Returns ITEMFONTBOLD parameter or an empty string if not defined.
double symbolSpaceAsDouble() const
Returns SYMBOLSPACE as a double or its default value if not defined.
QString infoFormatAsString() const
Returns INFO_FORMAT parameter as a string.
QStringList highlightLabelFont() const
Returns HIGHLIGHT_LABELFONT.
QString wmtver() const
Returns WMTVER parameter or an empty string if not defined.
QStringList dxfLayerAttributes() const
Returns the DXF LAYERATTRIBUTES parameter.
QString srcWidth() const
Returns SRCWIDTH parameter or an empty string if not defined.
QStringList highlightLabelSize() const
Returns HIGHLIGHT_LABELSIZE as a list of string.
QString imageQuality() const
Returns IMAGE_QUALITY parameter or an empty string if not defined.
QString height() const
Returns HEIGHT parameter or an empty string if not defined.
QString crs() const
Returns CRS or an empty string if none is defined.
QStringList selections() const
Returns the list of feature selection found in SELECTION parameter.
int featureCountAsInt() const
Returns FEATURE_COUNT as an integer.
int yAsInt() const
Returns Y parameter as an int or its default value if not defined.
bool layerTitleAsBool() const
Returns LAYERTITLE as a bool or its default value if not defined.
QString itemFontColor() const
Returns ITEMFONTCOLOR parameter or an empty string if not defined.
double boxSpaceAsDouble() const
Returns BOXSPACE as a double or its default value if not defined.
QString symbolWidth() const
Returns SYMBOLWIDTH parameter or an empty string if not defined.
bool tiledAsBool() const
Returns TILED parameter as a boolean.
Format
Output format for the response.
QString width() const
Returns WIDTH parameter or an empty string if not defined.
QFont itemFont() const
Returns the item font (built thanks to the ITEMFONTFAMILY, ITEMFONTSIZE, ITEMFONTBOLD,...
QStringList opacities() const
Returns the list of opacities found in OPACITIES parameter.
QString version() const override
Returns VERSION parameter as a string or an empty string if not defined.
QString layerFontItalic() const
Returns LAYERFONTITALIC parameter or an empty string if not defined.
QString itemFontItalic() const
Returns ITEMFONTITALIC parameter or an empty string if not defined.
QStringList filters() const
Returns the list of filters found in FILTER parameter.
QString dpi() const
Returns DPI parameter or an empty string if not defined.
QString itemFontFamily() const
Returns ITEMFONTFAMILY parameter or an empty string if not defined.
int jAsInt() const
Returns J parameter as an int or its default value if not defined.
QString showFeatureCount() const
Returns SHOWFEATURECOUNT parameter or an empty string if none is defined.
bool layerFontBoldAsBool() const
Returns LAYERFONTBOLD as a boolean or its default value if not defined.
double iconLabelSpaceAsDouble() const
Returns ICONLABELSPACE as a double or its default value if not defined.
QStringList highlightSymbol() const
Returns HIGHLIGHT_SYMBOL as a list of string.
QStringList queryLayersNickname() const
Returns nickname of layers found in QUERY_LAYERS parameter.
double symbolHeightAsDouble() const
Returns SYMBOLHEIGHT as a double or its default value if not defined.
bool infoFormatIsImage() const
Checks if INFO_FORMAT parameter is one of the image formats (PNG, JPG).
int srcWidthAsInt() const
Returns SRCWIDTH parameter as an int or its default value if not defined.
Median cut implementation.
const QString EXTERNAL_LAYER_PREFIX
QList< QgsWmsParametersLayer > mLayers
QList< QgsWmsParametersHighlightLayer > mHighlightLayers
QgsWmsParametersFilter::Type mType
QgsOgcUtils::FilterVersion mVersion
QList< QgsWmsParametersFilter > mFilter