QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
18 #ifndef QGSWMSPARAMETERS_H
19 #define QGSWMSPARAMETERS_H
192 const QVariant::Type type = QVariant::String,
193 const QVariant defaultValue = QVariant(
"" ) );
212 QStringList
toStyleList(
const char delimiter =
',' )
const;
220 QList<QgsGeometry>
toGeomList(
const char delimiter =
',' )
const;
228 QList<int>
toIntList(
const char delimiter =
',' )
const;
236 QList<double>
toDoubleList(
const char delimiter =
',' )
const;
244 QList<QColor>
toColorList(
const char delimiter =
',' )
const;
300 QString
name()
const;
398 QString
width()
const;
474 QString
bbox()
const;
639 QString
tiled()
const;
726 QString
rule()
const;
774 QString
scale()
const;
1203 QString
dpi()
const;
1331 static bool isExternalLayer(
const QString &name );
1333 bool loadParameter(
const QString &name,
const QString &
value )
override;
1339 void raiseError(
const QString &msg )
const;
1340 void log(
const QString &msg )
const;
1344 QMultiMap<QString, QgsWmsParametersFilter> layerFilters(
const QStringList &layers )
const;
1347 QMap<QgsWmsParameter::Name, QgsWmsParameter> mWmsParameters;
1348 QMap<QString, QMap<QString, QString> > mExternalWMSParameters;
1349 QList<QgsProjectVersion> mVersions;
QString layerFontBold() const
Returns LAYERFONTBOLD parameter or an empty string if not defined.
QStringList highlightGeom() const
Returns HIGHLIGHT_GEOM as a list of string in WKT.
QString transparent() const
Returns TRANSPARENT parameter or an empty string if not defined.
QgsRectangle toRectangle() const
Converts the parameter into a rectangle.
QString loadUrl() const
Loads the data associated to the parameter converted into an url.
QString srcHeight() const
Returns SRCHEIGHT parameter or an empty string if not defined.
Provides an interface to retrieve and manipulate WMS parameters received from the client.
QgsWmsParameter::Name mName
double layerTitleSpaceAsDouble() const
Returns LAYERTITLESPACE as a double.
QString name() const
Returns the name of the parameter.
void set(QgsWmsParameter::Name name, const QVariant &value)
Sets a parameter value thanks to its name.
bool infoFormatIsImage() const
Checks if INFO_FORMAT parameter is one of the image formats (PNG, JPG).
int wmsPrecisionAsInt() const
Returns WMS_PRECISION parameter as an int or its default value if not defined.
QStringList opacities() const
Returns the list of opacities found in OPACITIES parameter.
QString symbolWidth() const
Returns SYMBOLWIDTH parameter or an empty string if not defined.
int toInt() const
Converts the parameter into an integer.
bool layerFontItalicAsBool() const
Returns LAYERFONTITALIC as a boolean or its default value if not defined.
bool showFeatureCountAsBool() const
Returns SHOWFEATURECOUNT as a bool.
QList< int > toIntList(const char delimiter=',') const
Converts the parameter into a list of integers.
QString wmtver() const
Returns WMTVER parameter or an empty string if not defined.
int heightAsInt() const
Returns HEIGHT parameter as an int or its default value if not defined.
int infoFormatVersion() const
Returns the infoFormat version for GML.
int srcHeightAsInt() const
Returns SRCHEIGHT parameter as an int or its default value if not defined.
QList< QgsWmsParametersLayer > mLayers
QList< QgsWmsParametersHighlightLayer > mHighlightLayers
QString wmsPrecision() const
Returns WMS_PRECISION parameter or an empty string if not defined.
QString crs() const
Returns CRS or an empty string if none is defined.
Format
Output format for the response.
QString layerFontSize() const
Returns LAYERFONTSIZE parameter or an empty string if not defined.
QgsLegendSettings legendSettings() const
Returns legend settings.
QString iconLabelSpace() const
Returns ICONLABELSPACE parameter or an empty string if not defined.
QgsWmsParameter operator[](QgsWmsParameter::Name name) const
Returns the parameter corresponding to name.
QString bbox() const
Returns BBOX if defined or an empty string.
QString infoFormatAsString() const
Returns INFO_FORMAT parameter as a string.
int featureCountAsInt() const
Returns FEATURE_COUNT as an integer.
QString i() const
Returns I parameter or an empty string if not defined.
QStringList highlightLabelWeight() const
Returns HIGHLIGHT_LABELWEIGHT as a list of string.
QString boxSpace() const
Returns BOXSPACE parameter or an empty string if not defined.
bool itemFontBoldAsBool() const
Returns ITEMFONTBOLD as a boolean or its default value if not defined.
QList< double > highlightLabelBufferSizeAsFloat() const
Returns HIGHLIGHT_LABELBUFFERSIZE as a list of float.
bool transparentAsBool() const
Returns TRANSPARENT parameter as a bool or its default value if not defined.
QString layerTitleSpace() const
Returns LAYERTITLESPACE parameter or an empty string if not defined.
QColor itemFontColorAsColor() const
Returns ITEMFONTCOLOR as a color.
QString dpi() const
Returns DPI parameter or an empty string if not defined.
QString featureCount() const
Returns FEATURE_COUNT parameter or an empty string if none is defined.
QString itemFontItalic() const
Returns ITEMFONTITALIC parameter or an empty string if not defined.
QString symbolSpace() const
Returns SYMBOLSPACE parameter or an empty string if not defined.
QString value(const QString &key) const
Returns the value of a parameter.
void raiseError() const
Raises an error in case of an invalid conversion.
A rectangle specified with double values.
QString itemFontSize() const
Returns ITEMFONTSIZE parameter or an empty string if not defined.
QList< int > highlightLabelWeightAsInt() const
Returns HIGHLIGHT_LABELWEIGHT as a list of int.
QString itemFontBold() const
Returns ITEMFONTBOLD parameter or an empty string if not defined.
QStringList highlightLabelFont() const
Returns HIGHLIGHT_LABELFONT.
bool withMapTip() const
withMapTip
QString imageQuality() const
Returns IMAGE_QUALITY parameter or an empty string if not defined.
QList< int > opacitiesAsInt() const
Returns the list of opacities found in OPACITIES parameter as integers.
QStringList highlightLabelBufferSize() const
Returns HIGHLIGHT_LABELBUFFERSIZE.
QStringList highlightLabelBufferColor() const
Returns HIGHLIGHT_LABELBUFFERCOLOR as a list of string.
QString srcWidth() const
Returns SRCWIDTH parameter or an empty string if not defined.
QString version() const
Returns VERSION parameter as a string or an empty string if not defined.
QString height() const
Returns HEIGHT parameter or an empty string if not defined.
QString symbolHeight() const
Returns SYMBOLHEIGHT parameter or an empty string if not defined.
QStringList queryLayersNickname() const
Returns nickname of layers found in QUERY_LAYERS parameter.
QString sldBody() const
Returns SLD_body if defined or an empty string.
int widthAsInt() const
Returns WIDTH parameter as an int or its default value if not defined.
QString layerFontFamily() const
Returns LAYERFONTFAMILY parameter or an empty string if not defined.
@ HIGHLIGHT_LABELBUFFERCOLOR
virtual ~QgsWmsParameters() override=default
QColor toColor() const
Converts the parameter into a color.
int polygonToleranceAsInt() const
Returns FI_POLYGON_TOLERANCE parameter as an integer.
QString itemFontColor() const
Returns ITEMFONTCOLOR parameter or an empty string if not defined.
QString x() const
Returns X parameter or an empty string if not defined.
QgsProjectVersion versionAsNumber() const
Returns VERSION parameter if defined or its default value.
QString lineTolerance() const
Returns FI_LINE_TOLERANCE parameter or an empty string if not defined.
int yAsInt() const
Returns Y 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,...
QStringList highlightLabelColor() const
Returns HIGHLIGHT_LABELCOLOR as a list of string.
Definition of a parameter with basic conversion methods.
QgsWmsParametersFilter::Type mType
QgsWmsParameter(const QgsWmsParameter::Name name=QgsWmsParameter::UNKNOWN, const QVariant::Type type=QVariant::String, const QVariant defaultValue=QVariant(""))
Constructor for QgsWmsParameter.
QList< double > toDoubleList(const char delimiter=',') const
Converts the parameter into a list of doubles.
double layerFontSizeAsDouble() const
Returns LAYERFONTSIZE as a double.
QString backgroundColor() const
Returns BGCOLOR parameter or an empty string if not defined.
double symbolSpaceAsDouble() const
Returns SYMBOLSPACE as a double or its default value if not defined.
bool ruleLabelAsBool() const
Returns RULELABEL as a bool.
QStringList highlightSymbol() const
Returns HIGHLIGHT_SYMBOL as a list of string.
QString tiled() const
Returns TILED parameter or an empty string if not defined.
int lineToleranceAsInt() const
Returns FI_LINE_TOLERANCE parameter as an integer.
double toDouble() const
Converts the parameter into a double.
int xAsInt() const
Returns X parameter as an int or its default value if not defined.
double dpiAsDouble() const
Returns DPI parameter as an int or its default value if not defined.
The QgsLegendSettings class stores the appearance and layout settings for legend drawing with QgsLege...
QgsOgcUtils::FilterVersion mVersion
QList< QgsWmsParametersLayer > layersParameters() const
Returns parameters for each layer found in LAYER/LAYERS.
double itemFontSizeAsDouble() const
Returns ITEMFONTSIZE as a double.
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.
QUrl toUrl() const
Converts the parameter into an url.
int pointToleranceAsInt() const
Returns FI_POINT_TOLERANCE parameter as an integer.
QString filterGeom() const
Returns the filter geometry found in FILTER_GEOM parameter.
QString showFeatureCount() const
Returns SHOWFEATURECOUNT parameter or an empty string if none is defined.
QString layerTitle() const
Returns LAYERTITLE parameter or an empty string if not defined.
bool itemFontItalicAsBool() const
Returns ITEMFONTITALIC as a boolean or its default value if not defined.
Format format() const
Returns format.
QFont itemFont() const
Returns the item font (built thanks to the ITEMFONTFAMILY, ITEMFONTSIZE, ITEMFONTBOLD,...
QList< QgsWmsParametersExternalLayer > externalLayersParameters() const
Returns parameters for each external layer.
QgsWmsParametersComposerMap composerMapParameters(int mapId) const
Returns the requested parameters for a composer map parameter.
FilterVersion
OGC filter version.
double scaleAsDouble() const
Returns SCALE as a double.
QMap< DxfFormatOption, QString > dxfFormatOptions() const
Returns a map of DXF options defined within FORMAT_OPTIONS parameter.
QgsWmsParameters()
Constructor for WMS parameters with default values only.
QString composerTemplate() const
Returns TEMPLATE parameter or an empty string if not defined.
Median cut implementation.
QStringList allStyles() const
Returns styles found in STYLE and STYLES parameters.
QColor backgroundColorAsColor() const
Returns BGCOLOR parameter as a QColor or its default value if not defined.
QList< QgsGeometry > toGeomList(const 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 layerSpace() const
Returns LAYERSPACE parameter or an empty string if not defined.
QList< int > highlightLabelSizeAsInt() const
Returns HIGHLIGHT_LABELSIZE as a list of int An exception is raised if an invalid size is found.
QString layoutParameter(const QString &id, bool &ok) const
Returns a layout parameter thanks to its id.
A geometry is the spatial representation of a feature.
QStringList atlasPk() const
Returns the ATLAS_PK parameter.
bool layerTitleAsBool() const
Returns LAYERTITLE as a bool or its default value if not defined.
QList< QColor > highlightLabelColorAsColor() const
Returns HIGHLIGHT_LABELCOLOR as a list of color.
double iconLabelSpaceAsDouble() const
Returns ICONLABELSPACE as a double or its default value if not defined.
QString scale() const
Returns SCALE parameter or an empty string if none is defined.
QString rule() const
Returns RULE parameter or an empty string if none is defined.
bool layerFontBoldAsBool() const
Returns LAYERFONTBOLD as a boolean or its default value if not defined.
bool isValid() const override
Returns true if the parameter is valid, false otherwise.
QString polygonTolerance() const
Returns FI_POLYGON_TOLERANCE parameter or an empty string if not defined.
@ HIGHLIGHT_LABELBUFFERSIZE
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...
bool withGeometry() const
Returns if the client wants the feature info response with geometry information.
int jAsInt() const
Returns J parameter as an int or its default value if not defined.
QStringList dxfLayerAttributes() const
Returns the DXF LAYERATTRIBUTES parameter.
QString itemFontFamily() const
Returns ITEMFONTFAMILY parameter or an empty string if not defined.
QgsDxfExport::SymbologyExport dxfMode() const
Returns the DXF MODE parameter.
QString y() const
Returns Y parameter or an empty string if not defined.
bool tiledAsBool() const
Returns TILED parameter as a boolean.
virtual ~QgsWmsParameter() override=default
Default destructor for QgsWmsParameter.
QString layerFontColor() const
Returns LAYERFONTCOLOR parameter or an empty string if not defined.
WMS parameter received from the client.
QString externalWMSUri(const QString &id) const
Returns the external WMS uri.
QgsServerParameters provides an interface to retrieve and manipulate global parameters received from ...
QList< QColor > toColorList(const char delimiter=',') const
Converts the parameter into a list of colors.
QString formatAsString() const
Returns FORMAT parameter as a string.
int iAsInt() const
Returns I parameter as an int or its default value if not defined.
Format infoFormat() const
Returns infoFormat.
bool versionIsValid(const QString version) const
Returns true if version is valid, false otherwise.
QList< QgsGeometry > highlightGeomAsGeom() const
Returns HIGHLIGHT_GEOM as a list of geometries.
QStringList filters() const
Returns the list of filters found in FILTER parameter.
bool dxfUseLayerTitleAsName() const
Returns the DXF USE_TITLE_AS_LAYERNAME parameter.
QString pointTolerance() const
Returns FI_POINT_TOLERANCE parameter or an empty string if not defined.
QStringList highlightLabelString() const
Returns HIGHLIGHT_LABELSTRING as a list of string.
void dump() const
Dumps parameters.
int imageQualityAsInt() const
Returns IMAGE_QUALITY parameter as an integer.
QString dxfCodec() const
Returns the DXF CODEC parameter.
QStringList selections() const
Returns the list of feature selection found in SELECTION parameter.
QStringList highlightLabelSize() const
Returns HIGHLIGHT_LABELSIZE as a list of string.
Name
Available parameters for WMS requests.
double layerSpaceAsDouble() const
Returns LAYERSPACE as a double or its default value if not defined.
double symbolHeightAsDouble() const
Returns SYMBOLHEIGHT as a double or its default value if not defined.
double boxSpaceAsDouble() const
Returns BOXSPACE as a double or its default value if not defined.
QList< QgsWmsParametersHighlightLayer > highlightLayersParameters() const
Returns parameters for each highlight layer.
DxfFormatOption
Options for DXF format.
QMap< QString, QString > dimensionValues() const
Returns the dimensions parameter.
QString width() const
Returns WIDTH parameter or an empty string if not defined.
A class to describe the version of a project.
int srcWidthAsInt() const
Returns SRCWIDTH parameter as an int or its default value if not defined.
QStringList allLayersNickname() const
Returns nickname of layers found in LAYER and LAYERS parameters.
QList< QgsWmsParametersFilter > mFilter
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.
double dxfScale() const
Returns the DXF SCALE parameter.
double symbolWidthAsDouble() const
Returns SYMBOLWIDTH as a double or its default value if not defined.
QColor layerFontColorAsColor() const
Returns LAYERFONTCOLOR as a color or its defined value if not defined.