18#ifndef QGSWMSRENDERCONTEXT_H
19#define QGSWMSRENDERCONTEXT_H
100 QList<QgsMapLayer *>
layers()
const;
212#ifdef HAVE_SERVER_PYTHON_PLUGINS
224 QMap<QString, QList<QgsMapLayer *>>
layerGroups()
const;
237 QSize
mapSize(
bool aspectRatio =
true )
const;
283 void initNicknameLayers();
284 void initRestrictedLayers();
285 void initLayerGroupsRecursive(
const QgsLayerTreeGroup *group,
const QString &groupName );
287 void searchLayersToRender();
288 void searchLayersToRenderSld();
289 void searchLayersToRenderStyle();
290 void removeUnwantedLayers();
304 bool layerScaleVisibility(
const QString &name )
const;
310 double mScaleDenominator = -1.0;
313 QMultiMap<QString, QgsMapLayer *> mNicknameLayers;
316 QList<QgsMapLayer *> mLayersToRender;
319 QStringList mRestrictedLayers;
321 QMap<QString, QList<QgsMapLayer *>> mLayerGroups;
323 QMap<QString, QDomElement> mSlds;
324 QMap<QString, QString> mStyles;
327 QList<QgsMapLayer *> mExternalLayers;
A helper class that centralizes restrictions given by all the access control filter plugins.
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Layer tree group node serves as a container for layers and further groups.
Base class for all map layer types.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
QgsServerInterface Class defining interfaces exposed by QGIS Server and made available to plugins.
Provides a way to retrieve settings by prioritizing according to environment variables,...
Provides an interface to retrieve and manipulate WMS parameters received from the client.
Rendering context for the WMS renderer.
QSize mapSize(bool aspectRatio=true) const
Returns the size (in pixels) of the map to render, according to width and height WMS parameters as we...
bool isExternalLayer(const QString &name) const
Returns true if the layer is an external layer, false otherwise.
bool isValidGroup(const QString &name) const
Returns true if name is a group.
QStringList flattenedQueryLayers(const QStringList &layerNames) const
Returns a list of query layer names where group names are replaced by the names of their layer compon...
QgsFeedback * socketFeedback() const
Returns the response feedback if any.
QList< QgsMapLayer * > layers() const
Returns a list of all layers read from the project.
void setParameters(const QgsWmsParameters ¶meters)
Sets WMS parameters.
QList< QgsMapLayer * > layersToRender() const
Returns a list of all layers to actually render according to the current configuration.
int mapWidth() const
Returns WIDTH or SRCWIDTH according to UseSrcWidthHeight flag.
QgsMapLayer * layer(const QString &nickname) const
Returns the layer corresponding to the nickname, or a nullptr if not found or if the layer do not nee...
int tileBuffer() const
Returns the tile buffer value to use for rendering according to the current configuration.
bool updateExtent() const
Returns true if the extent has to be updated before the rendering, false otherwise.
const QgsServerSettings & settings() const
Returns settings of the server.
void setFlag(Flag flag, bool on=true)
Sets or unsets a rendering flag according to the on value.
bool isValidWidthHeight() const
Returns true if width and height are valid according to the maximum values defined within the project...
QList< QgsMapLayer * > layersFromGroup(const QString &nickname) const
Returns the group's layers list corresponding to the nickname, or an empty list if not found.
QgsWmsParameters parameters() const
Returns WMS parameters.
void setScaleDenominator(double scaleDenominator)
Sets a custom scale denominator.
QString style(const QgsMapLayer &layer) const
Returns a style's name for a specific layer.
QMap< QString, QList< QgsMapLayer * > > layerGroups() const
Returns a map having layer group names as keys and a list of layers as values.
double mapTileBuffer(int mapWidth) const
Returns the tile buffer in geographical units for the given map width in pixels.
QString layerNickname(const QgsMapLayer &layer) const
Returns the nickname (short name, id or name) of the layer according to the current configuration.
void setSocketFeedback(QgsFeedback *feedback)
Sets the response feedback.
double scaleDenominator() const
Returns the scale denominator to use for rendering according to the current configuration.
qreal dotsPerMm() const
Returns default dots per mm according to the current configuration.
bool testFlag(Flag flag) const
Returns the status of a rendering flag.
QDomElement sld(const QgsMapLayer &layer) const
Returns a SLD document for a specific layer.
bool isValidLayer(const QString &nickname) const
Returns true if the layer has to be rendered, false otherwise.
const QgsProject * project() const
Returns the project.
int precision() const
Returns the precision to use according to the current configuration.
int imageQuality() const
Returns the image quality to use for rendering according to the current configuration.
int mapHeight() const
Returns HEIGHT or SRCHEIGHT according to UseSrcWidthHeight flag.
bool renderMapTiles() const
Returns true if WMS requests should use the QgsMapSettings::RenderMapTile flag, so that no visible ar...
Flag
Available rendering options.
@ AddAllLayers
For GetPrint: add layers from LAYER(S) parameter.
Median cut implementation.