QGIS API Documentation  3.27.0-Master (0e23467727)
qgswmsparameters.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgswmsparameters.h
3  ------------------
4  begin : March 17, 2017
5  copyright : (C) 2017 by Paul Blottiere
6  email : paul dot blottiere at oslandia dot com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef QGSWMSPARAMETERS_H
19 #define QGSWMSPARAMETERS_H
20 
21 #include <QMap>
22 #include <QMetaEnum>
23 #include <QColor>
24 
25 #include "qgsrectangle.h"
26 #include "qgslegendsettings.h"
27 #include "qgsprojectversion.h"
28 #include "qgsogcutils.h"
29 #include "qgsserverparameters.h"
30 #include "qgsdxfexport.h"
31 
32 namespace QgsWms
33 {
35  {
37  enum Type
38  {
40  SQL,
41  OGC_FE
42  };
43 
44  QString mFilter;
47  };
48 
50  {
51  QString mNickname; // name, id or short name
52  int mOpacity = -1;
53  QList<QgsWmsParametersFilter> mFilter; // list of filter
54  QStringList mSelection; // list of string fid
55  QString mStyle;
56  QString mExternalUri;
57  };
58 
60  {
61  QString mName;
62  QString mUri;
63  };
64 
66  {
67  QString mName;
69  QString mSld;
70  QString mLabel;
71  QColor mColor;
72  int mSize = 0;
73  int mWeight = 0;
74  QString mFont;
75  float mBufferSize = 0;
76  QColor mBufferColor;
77  double mLabelRotation = 0;
78  double mLabelDistance = 2; //label distance from feature in mm
79  QString mHali; //horizontal alignment
80  QString mVali; //vertical alignment
81  };
82 
84  {
85  int mId = 0; // composer map id
86  bool mHasExtent = false; // does the request contains extent for this composer map
87  QgsRectangle mExtent; // the request extent for this composer map
88  float mScale = -1;
89  float mRotation = 0;
90  float mGridX = 0;
91  float mGridY = 0;
92  QList<QgsWmsParametersLayer> mLayers; // list of layers for this composer map
93  QList<QgsWmsParametersHighlightLayer> mHighlightLayers; // list of highlight layers for this composer map
94  };
95 
103  {
104  Q_GADGET
105 
106  public:
108  enum Name
109  {
152  I,
153  J,
154  X,
155  Y,
189  TILED
190  };
191  Q_ENUM( Name )
192 
193 
200  const QVariant::Type type = QVariant::String,
201  const QVariant defaultValue = QVariant( "" ) );
202 
206  virtual ~QgsWmsParameter() override = default;
207 
211  bool isValid() const override;
212 
220  QStringList toStyleList( const char delimiter = ',' ) const;
221 
228  QList<QgsGeometry> toGeomList( const char delimiter = ',' ) const;
229 
236  QList<int> toIntList( const char delimiter = ',' ) const;
237 
244  QList<double> toDoubleList( const char delimiter = ',' ) const;
245 
252  QList<QColor> toColorList( const char delimiter = ',' ) const;
253 
259  QgsRectangle toRectangle() const;
260 
266  int toInt() const;
267 
273  double toDouble() const;
274 
280  QColor toColor() const;
281 
288  QUrl toUrl() const;
289 
296  QString loadUrl() const;
297 
302  void raiseError() const;
303 
308  QString name() const;
309 
313  static QString name( const QgsWmsParameter::Name );
314 
319  static QgsWmsParameter::Name name( const QString &name );
320 
322 
324  int mMapId = -1;
325  };
326 
334  {
335  Q_GADGET
336 
337  public:
338 
340  enum Format
341  {
351  JSON
352  };
353  Q_ENUM( Format )
354 
355 
357  {
364  FORCE_2D
365  };
366  Q_ENUM( DxfFormatOption )
367 
368 
372  QgsWmsParameters( const QgsServerParameters &parameters );
373 
378 
379  virtual ~QgsWmsParameters() override = default;
380 
386 
391  void set( QgsWmsParameter::Name name, const QVariant &value );
392 
396  void dump() const;
397 
402  QString crs() const;
403 
408  QString width() const;
409 
417  int widthAsInt() const;
418 
423  QString height() const;
424 
432  int heightAsInt() const;
433 
439  QString srcWidth() const;
440 
449  int srcWidthAsInt() const;
450 
456  QString srcHeight() const;
457 
466  int srcHeightAsInt() const;
467 
473 
478  bool versionIsValid( const QString version ) const;
479 
484  QString bbox() const;
485 
493 
498  QString sldBody() const;
499 
504  QStringList selections() const;
505 
510  QStringList filters() const;
511 
516  QString filterGeom() const;
517 
522  QStringList opacities() const;
523 
531  QList<int> opacitiesAsInt() const;
532 
537  QStringList allLayersNickname() const;
538 
543  QStringList queryLayersNickname() const;
544 
549  QStringList allStyles() const;
550 
555  QList<QgsWmsParametersLayer> layersParameters() const;
556 
562  QString polygonTolerance() const;
563 
569  QString lineTolerance() const;
570 
576  QString pointTolerance() const;
577 
583  int polygonToleranceAsInt() const;
584 
590  int lineToleranceAsInt() const;
591 
597  int pointToleranceAsInt() const;
598 
603  QString formatAsString() const;
604 
609  static QString formatAsString( Format format );
610 
616  Format format() const;
617 
622  QString infoFormatAsString() const;
623 
628  bool infoFormatIsImage() const;
629 
635  QString imageQuality() const;
636 
642  int imageQualityAsInt() const;
643 
649  QString tiled() const;
650 
656  bool tiledAsBool() const;
657 
663  Format infoFormat() const;
664 
670  int infoFormatVersion() const;
671 
676  QString i() const;
677 
685  int iAsInt() const;
686 
691  QString j() const;
692 
700  int jAsInt() const;
701 
706  QString x() const;
707 
715  int xAsInt() const;
716 
721  QString y() const;
722 
730  int yAsInt() const;
731 
736  QString rule() const;
737 
742  QString ruleLabel() const;
743 
750  bool ruleLabelAsBool() const;
751 
756  QString showFeatureCount() const;
757 
764  bool showFeatureCountAsBool() const;
765 
770  QString featureCount() const;
771 
778  int featureCountAsInt() const;
779 
784  QString scale() const;
785 
792  double scaleAsDouble() const;
793 
798  QString boxSpace() const;
799 
806  double boxSpaceAsDouble() const;
807 
812  QString layerSpace() const;
813 
820  double layerSpaceAsDouble() const;
821 
826  QString layerTitleSpace() const;
827 
834  double layerTitleSpaceAsDouble() const;
835 
840  QString symbolSpace() const;
841 
848  double symbolSpaceAsDouble() const;
849 
854  QString iconLabelSpace() const;
855 
862  double iconLabelSpaceAsDouble() const;
863 
868  QString symbolWidth() const;
869 
876  double symbolWidthAsDouble() const;
877 
882  QString symbolHeight() const;
883 
890  double symbolHeightAsDouble() const;
891 
897  QFont layerFont() const;
898 
903  QString layerFontFamily() const;
904 
909  QString layerFontBold() const;
910 
917  bool layerFontBoldAsBool() const;
918 
923  QString layerFontItalic() const;
924 
931  bool layerFontItalicAsBool() const;
932 
937  QString layerFontSize() const;
938 
945  double layerFontSizeAsDouble() const;
946 
951  QString layerFontColor() const;
952 
959  QColor layerFontColorAsColor() const;
960 
966  QFont itemFont() const;
967 
972  QString itemFontFamily() const;
973 
978  QString itemFontBold() const;
979 
986  bool itemFontBoldAsBool() const;
987 
992  QString itemFontItalic() const;
993 
1000  bool itemFontItalicAsBool() const;
1001 
1006  QString itemFontSize() const;
1007 
1014  double itemFontSizeAsDouble() const;
1015 
1020  QString itemFontColor() const;
1021 
1028  QColor itemFontColorAsColor() const;
1029 
1034  QString layerTitle() const;
1035 
1042  bool layerTitleAsBool() const;
1043 
1049 
1054  QList<QgsWmsParametersHighlightLayer> highlightLayersParameters() const;
1055 
1060  QList<QgsWmsParametersExternalLayer> externalLayersParameters() const;
1061 
1066  QStringList highlightGeom() const;
1067 
1074  QList<QgsGeometry> highlightGeomAsGeom() const;
1075 
1080  QStringList highlightSymbol() const;
1081 
1086  QStringList highlightLabelString() const;
1087 
1092  QStringList highlightLabelColor() const;
1093 
1100  QList<QColor> highlightLabelColorAsColor() const;
1101 
1106  QStringList highlightLabelSize() const;
1107 
1114  QList<int> highlightLabelSizeAsInt() const;
1115 
1120  QStringList highlightLabelWeight() const;
1121 
1128  QList<int> highlightLabelWeightAsInt() const;
1129 
1134  QStringList highlightLabelFont() const;
1135 
1140  QStringList highlightLabelBufferSize() const;
1141 
1148  QList<double> highlightLabelBufferSizeAsFloat() const;
1149 
1154  QStringList highlightLabelBufferColor() const;
1155 
1162  QList<QColor> highlightLabelBufferColorAsColor() const;
1163 
1168  QList<double> highlightLabelRotation() const;
1169 
1174  QList<double> highlightLabelDistance() const;
1175 
1180  QStringList highlightLabelHorizontalAlignment() const;
1181 
1186  QStringList highlightLabelVerticalAlignment() const;
1187 
1192  QString wmsPrecision() const;
1193 
1201  int wmsPrecisionAsInt() const;
1202 
1207  QString transparent() const;
1208 
1216  bool transparentAsBool() const;
1217 
1222  QString backgroundColor() const;
1223 
1231  QColor backgroundColorAsColor() const;
1232 
1237  QString dpi() const;
1238 
1246  double dpiAsDouble() const;
1247 
1252  QString composerTemplate() const;
1253 
1264 
1270  QString externalWMSUri( const QString &id ) const;
1271 
1276  bool withGeometry() const;
1277 
1282  bool withMapTip() const;
1283 
1288  QString wmtver() const;
1289 
1297  QString layoutParameter( const QString &id, bool &ok ) const;
1298 
1304  QStringList atlasPk() const;
1305 
1310  QMap<DxfFormatOption, QString> dxfFormatOptions() const;
1311 
1316  QStringList dxfLayerAttributes() const;
1317 
1322  bool dxfUseLayerTitleAsName() const;
1323 
1328  double dxfScale() const;
1329 
1335 
1340  QString dxfCodec() const;
1341 
1346  QMap<QString, QString> dimensionValues() const;
1347 
1354  bool noMText() const;
1355 
1362  bool isForce2D() const;
1363 
1364  QString version() const override;
1365 
1366  QString request() const override;
1367 
1368  private:
1369  static bool isExternalLayer( const QString &name );
1370 
1371  bool loadParameter( const QString &name, const QString &value ) override;
1372 
1373  void save( const QgsWmsParameter &parameter, bool multi = false );
1374 
1375  QgsWmsParameter idParameter( QgsWmsParameter::Name name, int id ) const;
1376 
1377  void raiseError( const QString &msg ) const;
1378  void log( const QString &msg ) const;
1379 
1380  QgsWmsParametersExternalLayer externalLayerParameter( const QString &name ) const;
1381 
1382  QMultiMap<QString, QgsWmsParametersFilter> layerFilters( const QStringList &layers ) const;
1383 
1384 
1385  QMap<QgsWmsParameter::Name, QgsWmsParameter> mWmsParameters;
1386  QMap<QString, QMap<QString, QString> > mExternalWMSParameters;
1387  QList<QgsProjectVersion> mVersions;
1388  };
1389 }
1390 
1391 #endif
A geometry is the spatial representation of a feature.
Definition: qgsgeometry.h:125
The QgsLegendSettings class stores the appearance and layout settings for legend drawing with QgsLege...
FilterVersion
OGC filter version.
Definition: qgsogcutils.h:179
A class to describe the version of a project.
A rectangle specified with double values.
Definition: qgsrectangle.h:42
Definition of a parameter with basic conversion methods.
QgsServerParameters provides an interface to retrieve and manipulate global parameters received from ...
QString value(const QString &key) const
Returns the value of a parameter.
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.
virtual ~QgsWmsParameter() override=default
Default destructor for QgsWmsParameter.
Name
Available parameters for WMS requests.
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...
int mMapId
Map id for prefixed parameters (e.g. "0" for "map0:LAYERS" in GetPrint requests)
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.
virtual ~QgsWmsParameters() override=default
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.
QStringList highlightLabelHorizontalAlignment() const
Returns HIGHLIGHT_LABEL_HORIZONTAL_ALIGNMENT as a list of string.
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.
QStringList highlightLabelVerticalAlignment() const
Returns HIGHLIGHT_LABEL_VERTICAL_ALIGNMENT as a list of string.
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< double > highlightLabelDistance() const
Returns HIGHLIGHT_LABEL_DISTANCE as a list of double.
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.
QList< double > highlightLabelRotation() const
Returns HIGHLIGHT_LABEL_ROTATION as a list of double.
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.
QList< QgsWmsParametersLayer > mLayers
QList< QgsWmsParametersHighlightLayer > mHighlightLayers
QgsWmsParametersFilter::Type mType
QgsOgcUtils::FilterVersion mVersion
QList< QgsWmsParametersFilter > mFilter