QGIS API Documentation  3.4.15-Madeira (e83d02e274)
qgsmaplayer.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsmaplayer.h - description
3  -------------------
4  begin : Fri Jun 28 2002
5  copyright : (C) 2002 by Gary E.Sherman
6  email : sherman at mrcc.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 QGSMAPLAYER_H
19 #define QGSMAPLAYER_H
20 
21 #include "qgis_core.h"
22 #include <QDateTime>
23 #include <QDomNode>
24 #include <QImage>
25 #include <QObject>
26 #include <QPainter>
27 #include <QUndoStack>
28 #include <QVariant>
29 #include <QIcon>
30 
31 #include "qgis.h"
32 #include "qgserror.h"
34 #include "qgsrectangle.h"
36 #include "qgsrendercontext.h"
37 #include "qgsmaplayerdependency.h"
38 #include "qgslayermetadata.h"
39 #include "qgsmaplayerstyle.h"
40 #include "qgsreadwritecontext.h"
41 
43 class QgsDataProvider;
44 class QgsMapLayerLegend;
47 class QgsProject;
48 
49 class QDomDocument;
50 class QKeyEvent;
51 class QPainter;
52 
53 /*
54  * Constants used to describe copy-paste MIME types
55  */
56 #define QGSCLIPBOARD_MAPLAYER_MIME "application/qgis.maplayer"
57 
63 class CORE_EXPORT QgsMapLayer : public QObject
64 {
65  Q_OBJECT
66 
67  Q_PROPERTY( QString name READ name WRITE setName NOTIFY nameChanged )
68  Q_PROPERTY( int autoRefreshInterval READ autoRefreshInterval WRITE setAutoRefreshInterval NOTIFY autoRefreshIntervalChanged )
69  Q_PROPERTY( QgsLayerMetadata metadata READ metadata WRITE setMetadata NOTIFY metadataChanged )
70  Q_PROPERTY( QgsCoordinateReferenceSystem crs READ crs WRITE setCrs NOTIFY crsChanged )
71 
72 #ifdef SIP_RUN
74  QgsMapLayer *layer = qobject_cast<QgsMapLayer *>( sipCpp );
75 
76  sipType = 0;
77 
78  if ( layer )
79  {
80  switch ( layer->type() )
81  {
83  sipType = sipType_QgsVectorLayer;
84  break;
86  sipType = sipType_QgsRasterLayer;
87  break;
89  sipType = sipType_QgsPluginLayer;
90  break;
92  sipType = sipType_QgsMeshLayer;
93  break;
94  default:
95  sipType = nullptr;
96  break;
97  }
98  }
99  SIP_END
100 #endif
101 
102  public:
103 
106  {
110  MeshLayer
111  };
112 
118  {
119  Style = 0,
121  };
122 
129  {
130  Identifiable = 1 << 0,
131  Removable = 1 << 1,
132  Searchable = 1 << 2,
133  };
134  Q_ENUM( LayerFlag )
135  Q_DECLARE_FLAGS( LayerFlags, LayerFlag )
136  Q_FLAG( LayerFlags )
137 
143  {
144  LayerConfiguration = 1 << 0,
145  Symbology = 1 << 1,
146  Symbology3D = 1 << 2,
147  Labeling = 1 << 3,
148  Fields = 1 << 4,
149  Forms = 1 << 5,
150  Actions = 1 << 6,
151  MapTips = 1 << 7,
152  Diagrams = 1 << 8,
153  AttributeTable = 1 << 9,
154  Rendering = 1 << 10,
155  CustomProperties = 1 << 11,
156  GeometryOptions = 1 << 12,
157  AllStyleCategories = LayerConfiguration | Symbology | Symbology3D | Labeling | Fields | Forms | Actions |
158  MapTips | Diagrams | AttributeTable | Rendering | CustomProperties | GeometryOptions,
159  };
160  Q_ENUM( StyleCategory )
161  Q_DECLARE_FLAGS( StyleCategories, StyleCategory )
162  Q_FLAG( StyleCategories )
163 
170  QgsMapLayer( QgsMapLayer::LayerType type = VectorLayer, const QString &name = QString(), const QString &source = QString() );
171 
172  ~QgsMapLayer() override;
173 
175  QgsMapLayer( QgsMapLayer const & ) = delete;
177  QgsMapLayer &operator=( QgsMapLayer const & ) = delete;
178 
185  virtual QgsMapLayer *clone() const = 0;
186 
190  QgsMapLayer::LayerType type() const;
191 
199  QgsMapLayer::LayerFlags flags() const;
200 
208  void setFlags( QgsMapLayer::LayerFlags flags );
209 
215  static QString extensionPropertyType( PropertyType type );
216 
218  QString id() const;
219 
225  void setName( const QString &name );
226 
231  QString name() const;
232 
236  virtual QgsDataProvider *dataProvider();
237 
242  virtual const QgsDataProvider *dataProvider() const SIP_SKIP;
243 
250  void setShortName( const QString &shortName ) { mShortName = shortName; }
251 
257  QString shortName() const { return mShortName; }
258 
264  void setTitle( const QString &title ) { mTitle = title; }
265 
272  QString title() const { return mTitle; }
273 
280  void setAbstract( const QString &abstract ) { mAbstract = abstract; }
281 
288  QString abstract() const { return mAbstract; }
289 
296  void setKeywordList( const QString &keywords ) { mKeywordList = keywords; }
297 
304  QString keywordList() const { return mKeywordList; }
305 
306  /* Layer dataUrl information */
307 
315  void setDataUrl( const QString &dataUrl ) { mDataUrl = dataUrl; }
316 
324  QString dataUrl() const { return mDataUrl; }
325 
333  void setDataUrlFormat( const QString &dataUrlFormat ) { mDataUrlFormat = dataUrlFormat; }
334 
342  QString dataUrlFormat() const { return mDataUrlFormat; }
343 
344  /* Layer attribution information */
345 
353  void setAttribution( const QString &attrib ) { mAttribution = attrib; }
354 
362  QString attribution() const { return mAttribution; }
363 
371  void setAttributionUrl( const QString &attribUrl ) { mAttributionUrl = attribUrl; }
372 
380  QString attributionUrl() const { return mAttributionUrl; }
381 
382  /* Layer metadataUrl information */
383 
391  void setMetadataUrl( const QString &metaUrl ) { mMetadataUrl = metaUrl; }
392 
400  QString metadataUrl() const { return mMetadataUrl; }
401 
409  void setMetadataUrlType( const QString &metaUrlType ) { mMetadataUrlType = metaUrlType; }
410 
418  QString metadataUrlType() const { return mMetadataUrlType; }
419 
427  void setMetadataUrlFormat( const QString &metaUrlFormat ) { mMetadataUrlFormat = metaUrlFormat; }
428 
436  QString metadataUrlFormat() const { return mMetadataUrlFormat; }
437 
443  void setBlendMode( QPainter::CompositionMode blendMode );
444 
449  QPainter::CompositionMode blendMode() const;
450 
452  bool readOnly() const { return isReadOnly(); }
453 
457  virtual void reload() {}
458 
463  virtual QgsMapLayerRenderer *createMapRenderer( QgsRenderContext &rendererContext ) = 0 SIP_FACTORY;
464 
466  virtual QgsRectangle extent() const;
467 
473  bool isValid() const;
474 
481  QString publicSource() const;
482 
488  QString source() const;
489 
494  virtual QStringList subLayers() const;
495 
500  virtual void setLayerOrder( const QStringList &layers );
501 
507  virtual void setSubLayerVisibility( const QString &name, bool visible );
508 
510  virtual bool isEditable() const;
511 
516  virtual bool isSpatial() const;
517 
534  bool readLayerXml( const QDomElement &layerElement, QgsReadWriteContext &context );
535 
553  bool writeLayerXml( QDomElement &layerElement, QDomDocument &document, const QgsReadWriteContext &context ) const;
554 
559  virtual void resolveReferences( QgsProject *project );
560 
566  QStringList customPropertyKeys() const;
567 
573  void setCustomProperty( const QString &key, const QVariant &value );
574 
579  QVariant customProperty( const QString &value, const QVariant &defaultValue = QVariant() ) const;
580 
585  void setCustomProperties( const QgsObjectCustomProperties &properties );
586 
591  void removeCustomProperty( const QString &key );
592 
598  virtual QgsError error() const;
599 
605 
607  void setCrs( const QgsCoordinateReferenceSystem &srs, bool emitSignal = true );
608 
614  static QString formatLayerName( const QString &name );
615 
623  virtual QString metadataUri() const;
624 
631  void exportNamedMetadata( QDomDocument &doc, QString &errorMsg ) const;
632 
642  virtual QString saveDefaultMetadata( bool &resultFlag SIP_OUT );
643 
658  QString saveNamedMetadata( const QString &uri, bool &resultFlag );
659 
674  virtual QString loadNamedMetadata( const QString &uri, bool &resultFlag SIP_OUT );
675 
685  QString loadDefaultMetadata( bool &resultFlag );
686 
695  bool loadNamedMetadataFromDatabase( const QString &db, const QString &uri, QString &qmd );
696 
704  bool importNamedMetadata( QDomDocument &document, QString &errorMessage );
705 
713  virtual QString styleURI() const;
714 
724  virtual QString loadDefaultStyle( bool &resultFlag SIP_OUT );
725 
741  virtual QString loadNamedStyle( const QString &uri, bool &resultFlag SIP_OUT, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories );
742 
750  virtual bool loadNamedStyleFromDatabase( const QString &db, const QString &uri, QString &qml SIP_OUT );
751 
761  virtual bool importNamedStyle( QDomDocument &doc, QString &errorMsg SIP_OUT,
762  QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories );
763 
772  virtual void exportNamedStyle( QDomDocument &doc, QString &errorMsg SIP_OUT, const QgsReadWriteContext &context = QgsReadWriteContext(),
773  QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) const;
774 
775 
782  virtual void exportSldStyle( QDomDocument &doc, QString &errorMsg ) const;
783 
793  virtual QString saveDefaultStyle( bool &resultFlag SIP_OUT );
794 
810  virtual QString saveNamedStyle( const QString &uri, bool &resultFlag SIP_OUT, StyleCategories categories = AllStyleCategories );
811 
820  virtual QString saveSldStyle( const QString &uri, bool &resultFlag ) const;
821 
830  virtual QString loadSldStyle( const QString &uri, bool &resultFlag );
831 
832  virtual bool readSld( const QDomNode &node, QString &errorMessage )
833  { Q_UNUSED( node ); errorMessage = QStringLiteral( "Layer type %1 not supported" ).arg( type() ); return false; }
834 
835 
836 
845  virtual bool readSymbology( const QDomNode &node, QString &errorMessage,
846  QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) = 0;
847 
858  virtual bool readStyle( const QDomNode &node, QString &errorMessage,
859  QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories );
860 
871  virtual bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context,
872  StyleCategories categories = AllStyleCategories ) const = 0;
873 
886  virtual bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context,
887  StyleCategories categories = AllStyleCategories ) const;
888 
890  QUndoStack *undoStack();
891 
896  QUndoStack *undoStackStyles();
897 
901  void setLegendUrl( const QString &legendUrl ) { mLegendUrl = legendUrl; }
902 
906  QString legendUrl() const { return mLegendUrl; }
907 
911  void setLegendUrlFormat( const QString &legendUrlFormat ) { mLegendUrlFormat = legendUrlFormat; }
912 
916  QString legendUrlFormat() const { return mLegendUrlFormat; }
917 
923  void setLegend( QgsMapLayerLegend *legend SIP_TRANSFER );
924 
929  QgsMapLayerLegend *legend() const;
930 
935  QgsMapLayerStyleManager *styleManager() const;
936 
941  void setRenderer3D( QgsAbstract3DRenderer *renderer SIP_TRANSFER );
942 
947  QgsAbstract3DRenderer *renderer3D() const;
948 
958  bool isInScaleRange( double scale ) const;
959 
970  double minimumScale() const;
971 
982  double maximumScale() const;
983 
992  bool hasScaleBasedVisibility() const;
993 
1000  bool hasAutoRefreshEnabled() const;
1001 
1009  int autoRefreshInterval() const;
1010 
1022  void setAutoRefreshInterval( int interval );
1023 
1030  void setAutoRefreshEnabled( bool enabled );
1031 
1038  virtual const QgsLayerMetadata &metadata() const;
1039 
1046  virtual void setMetadata( const QgsLayerMetadata &metadata );
1047 
1052  virtual QString htmlMetadata() const;
1053 
1055  virtual QDateTime timestamp() const;
1056 
1064  virtual QSet<QgsMapLayerDependency> dependencies() const;
1065 
1071  QString refreshOnNotifyMessage() const { return mRefreshOnNofifyMessage; }
1072 
1078  bool isRefreshOnNotifyEnabled() const { return mIsRefreshOnNofifyEnabled; }
1079 
1080  public slots:
1081 
1091  void setMinimumScale( double scale );
1092 
1102  void setMaximumScale( double scale );
1103 
1111  void setScaleBasedVisibility( bool enabled );
1112 
1121  void triggerRepaint( bool deferredUpdate = false );
1122 
1127  void emitStyleChanged();
1128 
1137  virtual bool setDependencies( const QSet<QgsMapLayerDependency> &layers );
1138 
1144  void setRefreshOnNotifyEnabled( bool enabled );
1145 
1153  void setRefreshOnNofifyMessage( const QString &message ) { mRefreshOnNofifyMessage = message; }
1154 
1155  signals:
1156 
1158  void statusChanged( const QString &status );
1159 
1165  void nameChanged();
1166 
1168  void crsChanged();
1169 
1176  void repaintRequested( bool deferredUpdate = false );
1177 
1179  void recalculateExtents() const;
1180 
1182  void dataChanged();
1183 
1185  void blendModeChanged( QPainter::CompositionMode blendMode );
1186 
1191  void rendererChanged();
1192 
1200  void styleChanged();
1201 
1206  void legendChanged();
1207 
1212  void renderer3DChanged();
1213 
1218  void configChanged();
1219 
1223  void dependenciesChanged();
1224 
1231  void willBeDeleted();
1232 
1238  void autoRefreshIntervalChanged( int interval );
1239 
1246  void metadataChanged();
1247 
1254  void flagsChanged();
1255 
1256  private slots:
1257 
1258  void onNotifiedTriggerRepaint( const QString &message );
1259 
1260  protected:
1261 
1267  void clone( QgsMapLayer *layer ) const;
1268 
1270  virtual void setExtent( const QgsRectangle &rect );
1271 
1273  void setValid( bool valid );
1274 
1279  virtual bool readXml( const QDomNode &layer_node, QgsReadWriteContext &context );
1280 
1285  virtual bool writeXml( QDomNode &layer_node, QDomDocument &document, const QgsReadWriteContext &context ) const;
1286 
1298  virtual QString encodedSource( const QString &source, const QgsReadWriteContext &context ) const;
1299 
1312  virtual QString decodedSource( const QString &source, const QString &dataProvider, const QgsReadWriteContext &context ) const;
1313 
1318  void readCustomProperties( const QDomNode &layerNode, const QString &keyStartsWith = QString() );
1319 
1321  void writeCustomProperties( QDomNode &layerNode, QDomDocument &doc ) const;
1322 
1324  void readStyleManager( const QDomNode &layerNode );
1326  void writeStyleManager( QDomNode &layerNode, QDomDocument &doc ) const;
1327 
1332  void writeCommonStyle( QDomElement &layerElement, QDomDocument &document,
1333  const QgsReadWriteContext &context,
1334  StyleCategories categories = AllStyleCategories ) const;
1335 
1340  void readCommonStyle( const QDomElement &layerElement, const QgsReadWriteContext &context,
1341  StyleCategories categories = AllStyleCategories );
1342 
1343 #ifndef SIP_RUN
1344 #if 0
1345  void connectNotify( const char *signal ) override;
1347 #endif
1348 #endif
1349 
1351  void appendError( const QgsErrorMessage &error ) { mError.append( error );}
1353  void setError( const QgsError &error ) { mError = error;}
1354 
1357 
1359  bool mValid = false;
1360 
1362  QString mDataSource;
1363 
1365  QString mLayerName;
1366 
1367  QString mShortName;
1368  QString mTitle;
1369 
1371  QString mAbstract;
1372  QString mKeywordList;
1373 
1375  QString mDataUrl;
1377 
1379  QString mAttribution;
1381 
1383  QString mMetadataUrl;
1386 
1388  QString mLegendUrl;
1390 
1393 
1395  QSet<QgsMapLayerDependency> mDependencies;
1396 
1398  bool hasDependencyCycle( const QSet<QgsMapLayerDependency> &layers ) const;
1399 
1400  bool mIsRefreshOnNofifyEnabled = false;
1402 
1403  private:
1404 
1405  virtual QString baseURI( PropertyType type ) const;
1406  QString saveNamedProperty( const QString &uri, QgsMapLayer::PropertyType type,
1407  bool &resultFlag, StyleCategories categories = AllStyleCategories );
1408  QString loadNamedProperty( const QString &uri, QgsMapLayer::PropertyType type,
1409  bool &resultFlag, StyleCategories categories = AllStyleCategories );
1410  bool loadNamedPropertyFromDatabase( const QString &db, const QString &uri, QString &xml, QgsMapLayer::PropertyType type );
1411 
1416  virtual bool isReadOnly() const;
1417 
1422 
1424  QString mID;
1425 
1427  QgsMapLayer::LayerType mLayerType;
1428 
1429  LayerFlags mFlags = LayerFlags( Identifiable | Removable | Searchable );
1430 
1432  QPainter::CompositionMode mBlendMode = QPainter::CompositionMode_SourceOver;
1433 
1435  QString mTag;
1436 
1437  //set some generous defaults for scale based visibility
1438 
1440  double mMinScale = 0;
1442  double mMaxScale = 100000000;
1444  bool mScaleBasedVisibility = false;
1445 
1447  QUndoStack *mUndoStack = nullptr;
1448 
1449  QUndoStack *mUndoStackStyles = nullptr;
1450 
1452  QgsObjectCustomProperties mCustomProperties;
1453 
1455  QgsMapLayerLegend *mLegend = nullptr;
1456 
1458  QgsMapLayerStyleManager *mStyleManager = nullptr;
1459 
1461  QTimer *mRefreshTimer = nullptr;
1462 
1463  QgsLayerMetadata mMetadata;
1464 
1466  QgsAbstract3DRenderer *m3DRenderer = nullptr;
1467 
1468 };
1469 
1471 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsMapLayer::LayerFlags )
1472 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsMapLayer::StyleCategories )
1473 
1474 
1475 #ifndef SIP_RUN
1476 
1482 typedef QPointer< QgsMapLayer > QgsWeakMapLayerPointer;
1483 
1489 typedef QList< QgsWeakMapLayerPointer > QgsWeakMapLayerPointerList;
1490 #endif
1491 
1492 #endif
QString mShortName
Definition: qgsmaplayer.h:1367
void setMetadataUrl(const QString &metaUrl)
Sets the metadata URL of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:391
The class is used as a container of context for various read/write operations on other objects...
A rectangle specified with double values.
Definition: qgsrectangle.h:40
Base class for all map layer types.
Definition: qgsmaplayer.h:63
QString shortName() const
Returns the short name of the layer used by QGIS Server to identify the layer.
Definition: qgsmaplayer.h:257
Base class for all renderers that may to participate in 3D view.
QString mAttributionUrl
Definition: qgsmaplayer.h:1380
QString mKeywordList
Definition: qgsmaplayer.h:1372
bool isRefreshOnNotifyEnabled() const
Returns true if the refresh on provider nofification is enabled.
Definition: qgsmaplayer.h:1078
QString refreshOnNotifyMessage() const
Returns the message that should be notified by the provider to triggerRepaint.
Definition: qgsmaplayer.h:1071
QString mDataUrlFormat
Definition: qgsmaplayer.h:1376
PropertyType
Maplayer has a style and a metadata property.
Definition: qgsmaplayer.h:117
QString mLegendUrlFormat
Definition: qgsmaplayer.h:1389
virtual void reload()
Synchronises with changes in the datasource.
Definition: qgsmaplayer.h:457
QString title() const
Returns the title of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:272
void setMetadataUrlType(const QString &metaUrlType)
Set the metadata type of the layer used by QGIS Server in GetCapabilities request MetadataUrlType ind...
Definition: qgsmaplayer.h:409
Abstract base class for spatial data provider implementations.
QString dataUrl() const
Returns the DataUrl of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:324
const QgsCoordinateReferenceSystem & crs
QPointer< QgsMapLayer > QgsWeakMapLayerPointer
Weak pointer for QgsMapLayer.
Definition: qgsmaplayer.h:1482
Q_DECLARE_METATYPE(QModelIndex)
QString mLayerName
Name of the layer - used for display.
Definition: qgsmaplayer.h:1365
bool readOnly() const
Returns if this layer is read only.
Definition: qgsmaplayer.h:452
QgsError mError
Error.
Definition: qgsmaplayer.h:1392
Added in 3.2.
Definition: qgsmaplayer.h:110
QgsRectangle mExtent
Extent of the layer.
Definition: qgsmaplayer.h:1356
QString mMetadataUrl
MetadataUrl of the layer.
Definition: qgsmaplayer.h:1383
void setLegendUrlFormat(const QString &legendUrlFormat)
Sets the format for a URL based layer legend.
Definition: qgsmaplayer.h:911
void setKeywordList(const QString &keywords)
Sets the keyword list of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:296
void setTitle(const QString &title)
Sets the title of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:264
#define SIP_SKIP
Definition: qgis_sip.h:119
LayerType
Types of layers that can be added to a map.
Definition: qgsmaplayer.h:105
QSet< QgsMapLayerDependency > mDependencies
List of layers that may modify this layer on modification.
Definition: qgsmaplayer.h:1395
QString mDataUrl
DataUrl of the layer.
Definition: qgsmaplayer.h:1375
#define SIP_TRANSFER
Definition: qgis_sip.h:36
The QgsMapLayerLegend class is abstract interface for implementations of legends for one map layer...
#define SIP_END
Definition: qgis_sip.h:182
Reads and writes project states.
Definition: qgsproject.h:89
QString attributionUrl() const
Returns the attribution URL of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:380
QString dataUrlFormat() const
Returns the DataUrl format of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:342
QgsErrorMessage represents single error message.
Definition: qgserror.h:32
#define SIP_FACTORY
Definition: qgis_sip.h:69
void setDataUrlFormat(const QString &dataUrlFormat)
Sets the DataUrl format of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:333
QString mTitle
Definition: qgsmaplayer.h:1368
virtual bool readSld(const QDomNode &node, QString &errorMessage)
Definition: qgsmaplayer.h:832
QString mMetadataUrlFormat
Definition: qgsmaplayer.h:1385
void setLegendUrl(const QString &legendUrl)
Sets the URL for the layer&#39;s legend.
Definition: qgsmaplayer.h:901
void setMetadataUrlFormat(const QString &metaUrlFormat)
Sets the metadata format of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:427
LayerFlag
Flags for the map layer.
Definition: qgsmaplayer.h:128
StyleCategory
Categories of style to distinguish appropriate sections for import/export.
Definition: qgsmaplayer.h:142
QString mAttribution
Attribution of the layer.
Definition: qgsmaplayer.h:1379
QString mAbstract
Description of the layer.
Definition: qgsmaplayer.h:1371
QString metadataUrl() const
Returns the metadata URL of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:400
A structured metadata store for a map layer.
QString mRefreshOnNofifyMessage
Definition: qgsmaplayer.h:1401
Contains information about the context of a rendering operation.
QString legendUrlFormat() const
Returns the format for a URL based layer legend.
Definition: qgsmaplayer.h:916
QString mDataSource
Data source description string, varies by layer type.
Definition: qgsmaplayer.h:1362
QString legendUrl() const
Returns the URL for the layer&#39;s legend.
Definition: qgsmaplayer.h:906
QgsError is container for error messages (report).
Definition: qgserror.h:80
QList< QgsWeakMapLayerPointer > QgsWeakMapLayerPointerList
A list of weak pointers to QgsMapLayers.
Definition: qgsmaplayer.h:1489
#define SIP_OUT
Definition: qgis_sip.h:51
QString mLegendUrl
WMS legend.
Definition: qgsmaplayer.h:1388
This class represents a coordinate reference system (CRS).
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition: qgis_sip.h:165
QString metadataUrlType() const
Returns the metadata type of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:418
Simple key-value store (keys = strings, values = variants) that supports loading/saving to/from XML i...
void setAttributionUrl(const QString &attribUrl)
Sets the attribution URL of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:371
void appendError(const QgsErrorMessage &error)
Add error message.
Definition: qgsmaplayer.h:1351
Base class for utility classes that encapsulate information necessary for rendering of map layers...
void setAttribution(const QString &attrib)
Sets the attribution of the layer used by QGIS Server in GetCapabilities request. ...
Definition: qgsmaplayer.h:353
QString keywordList() const
Returns the keyword list of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:304
void setRefreshOnNofifyMessage(const QString &message)
Set the notification message that triggers repaine If refresh on notification is enabled, the notification will triggerRepaint only if the notification message is equal to.
Definition: qgsmaplayer.h:1153
Management of styles for use with one map layer.
QString attribution() const
Returns the attribution of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:362
void setDataUrl(const QString &dataUrl)
Sets the DataUrl of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:315
QString mMetadataUrlType
Definition: qgsmaplayer.h:1384
QString metadataUrlFormat() const
Returns the metadata format of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:436
void setError(const QgsError &error)
Sets error message.
Definition: qgsmaplayer.h:1353
void setAbstract(const QString &abstract)
Sets the abstract of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:280