40 auto restorer = std::make_unique<QgsWmsRestorer>( context );
43 std::unique_ptr<QgsDxfExport> dxf = renderer.
getDxf();
44 response.
setHeader(
"Content-Type",
"application/dxf" );
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Defines interfaces exposed by QGIS Server and made available to plugins.
Defines the response interface passed to QgsService.
virtual void setHeader(const QString &key, const QString &value)=0
Set Header entry Add Header entry to the response Note that it is usually an error to set Header afte...
virtual QgsFeedback * feedback() const
Returns the socket feedback if any.
virtual QIODevice * io()=0
Returns the underlying QIODevice.
Map renderer for WMS requests.
std::unique_ptr< QgsDxfExport > getDxf()
Returns the map as DXF data.
QString dxfCodec() const
Returns the DXF CODEC parameter.
Rendering context for the WMS renderer.
void setParameters(const QgsWmsParameters ¶meters)
Sets WMS parameters.
void setFlag(Flag flag, bool on=true)
Sets or unsets a rendering flag according to the on value.
void setSocketFeedback(QgsFeedback *feedback)
Sets the response feedback.
Defines request interfaces passed to WMS service.
const QgsWmsParameters & wmsParameters() const
Returns the parameters interpreted for the WMS service.
RAII class to restore the rendering context configuration on destruction.
Median cut implementation.
void writeAsDxf(QgsServerInterface *serverIface, const QgsProject *project, const QgsWmsRequest &request, QgsServerResponse &response)
Output GetMap response in DXF format.