QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
qgswmsrestorer.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgswmsrestorer.h
3  ----------------
4  begin : April 24, 2017
5  copyright : (C) 2017 by Paul Blottiere
6  email : [email protected]
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 QGSWMSRESTORER_H
19 #define QGSWMSRESTORER_H
20 
21 #include <QList>
22 #include <QDomDocument>
23 #include <QMap>
24 
25 #include "qgsfeatureid.h"
26 #include "qgswmsrendercontext.h"
27 
28 class QgsMapLayer;
29 
37 {
38  public:
39 
44  QgsLayerRestorer( const QList<QgsMapLayer *> &layers );
45 
52 
53  private:
54 
55  struct QgsLayerSettings
56  {
57  QString name;
58  double mOpacity;
59  QString mNamedStyle;
60  QString mFilter;
61  QgsFeatureIds mSelectedFeatureIds;
62  };
63 
64  QMap<QgsMapLayer *, QgsLayerSettings> mLayerSettings;
65 };
66 
67 namespace QgsWms
68 {
69 
76  {
77  public:
78 
83  QgsWmsRestorer( const QgsWmsRenderContext &context );
84 
88  ~QgsWmsRestorer() = default;
89 
90  private:
91 
92  QgsLayerRestorer mLayerRestorer;
93  };
94 };
95 
96 #endif
QgsLayerRestorer
RAII class to restore layer configuration on destruction (opacity, filters, ...)
Definition: qgswmsrestorer.h:36
qgsfeatureid.h
QgsWms::QgsWmsRenderContext
Rendering context for the WMS renderer.
Definition: qgswmsrendercontext.h:47
QgsWms::QgsWmsRestorer::~QgsWmsRestorer
~QgsWmsRestorer()=default
Default destructor.
QgsFeatureIds
QSet< QgsFeatureId > QgsFeatureIds
Definition: qgsfeatureid.h:37
QgsWms
Median cut implementation.
Definition: qgsdxfwriter.cpp:22
QgsWms::QgsWmsRestorer::QgsWmsRestorer
QgsWmsRestorer(const QgsWmsRenderContext &context)
Constructor for QgsWmsRestorer.
Definition: qgswmsrestorer.cpp:129
QgsLayerRestorer::QgsLayerRestorer
QgsLayerRestorer(const QList< QgsMapLayer * > &layers)
Constructor for QgsLayerRestorer.
Definition: qgswmsrestorer.cpp:27
QgsMapLayer
Base class for all map layer types. This is the base class for all map layer types (vector,...
Definition: qgsmaplayer.h:72
QgsLayerRestorer::~QgsLayerRestorer
~QgsLayerRestorer()
Destructor.
Definition: qgswmsrestorer.cpp:74
QgsWms::QgsWmsRestorer
RAII class to restore the rendering context configuration on destruction.
Definition: qgswmsrestorer.h:75
qgswmsrendercontext.h