QGIS API Documentation  3.14.0-Pi (9f7028fd23)
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_sip.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 #include "qgsdataprovider.h"
42 
44 class QgsDataProvider;
45 class QgsMapLayerLegend;
48 class QgsProject;
51 
52 class QDomDocument;
53 class QKeyEvent;
54 class QPainter;
55 
56 /*
57  * Constants used to describe copy-paste MIME types
58  */
59 #define QGSCLIPBOARD_MAPLAYER_MIME "application/qgis.maplayer"
60 
61 
68  {
72  MeshLayer,
74 };
75 
81 class CORE_EXPORT QgsMapLayer : public QObject
82 {
83  Q_OBJECT
84 
85  Q_PROPERTY( QString name READ name WRITE setName NOTIFY nameChanged )
86  Q_PROPERTY( int autoRefreshInterval READ autoRefreshInterval WRITE setAutoRefreshInterval NOTIFY autoRefreshIntervalChanged )
87  Q_PROPERTY( QgsLayerMetadata metadata READ metadata WRITE setMetadata NOTIFY metadataChanged )
88  Q_PROPERTY( QgsCoordinateReferenceSystem crs READ crs WRITE setCrs NOTIFY crsChanged )
89 
90 #ifdef SIP_RUN
92  QgsMapLayer * layer = qobject_cast<QgsMapLayer *>( sipCpp );
93 
94  sipType = 0;
95 
96  if ( layer )
97  {
98  switch ( layer->type() )
99  {
101  sipType = sipType_QgsVectorLayer;
102  break;
104  sipType = sipType_QgsRasterLayer;
105  break;
107  sipType = sipType_QgsPluginLayer;
108  break;
110  sipType = sipType_QgsMeshLayer;
111  break;
113  sipType = sipType_QgsVectorTileLayer;
114  break;
115  default:
116  sipType = nullptr;
117  break;
118  }
119  }
120  SIP_END
121 #endif
122 
123  public:
124 
130  {
131  Style = 0,
133  };
134 
141  {
142  Identifiable = 1 << 0,
143  Removable = 1 << 1,
144  Searchable = 1 << 2,
145  };
146  Q_ENUM( LayerFlag )
147  Q_DECLARE_FLAGS( LayerFlags, LayerFlag )
148  Q_FLAG( LayerFlags )
149 
150 
155  {
156  LayerConfiguration = 1 << 0,
157  Symbology = 1 << 1,
158  Symbology3D = 1 << 2,
159  Labeling = 1 << 3,
160  Fields = 1 << 4,
161  Forms = 1 << 5,
162  Actions = 1 << 6,
163  MapTips = 1 << 7,
164  Diagrams = 1 << 8,
165  AttributeTable = 1 << 9,
166  Rendering = 1 << 10,
167  CustomProperties = 1 << 11,
168  GeometryOptions = 1 << 12,
169  Relations = 1 << 13,
170  Temporal = 1 << 14,
171  AllStyleCategories = LayerConfiguration | Symbology | Symbology3D | Labeling | Fields | Forms | Actions |
172  MapTips | Diagrams | AttributeTable | Rendering | CustomProperties | GeometryOptions | Relations | Temporal,
173  };
174  Q_ENUM( StyleCategory )
175  Q_DECLARE_FLAGS( StyleCategories, StyleCategory )
176  Q_FLAG( StyleCategories )
177 
178 
184  QgsMapLayer( QgsMapLayerType type = QgsMapLayerType::VectorLayer, const QString &name = QString(), const QString &source = QString() );
185 
186  ~QgsMapLayer() override;
187 
189  QgsMapLayer( QgsMapLayer const & ) = delete;
191  QgsMapLayer &operator=( QgsMapLayer const & ) = delete;
192 
199  virtual QgsMapLayer *clone() const = 0;
200 
204  QgsMapLayerType type() const;
205 
213  QgsMapLayer::LayerFlags flags() const;
214 
222  void setFlags( QgsMapLayer::LayerFlags flags );
223 
229  static QString extensionPropertyType( PropertyType type );
230 
232  QString id() const;
233 
239  void setName( const QString &name );
240 
245  QString name() const;
246 
250  virtual QgsDataProvider *dataProvider();
251 
256  virtual const QgsDataProvider *dataProvider() const SIP_SKIP;
257 
264  void setShortName( const QString &shortName ) { mShortName = shortName; }
265 
271  QString shortName() const;
272 
278  void setTitle( const QString &title ) { mTitle = title; }
279 
286  QString title() const { return mTitle; }
287 
294  void setAbstract( const QString &abstract ) { mAbstract = abstract; }
295 
302  QString abstract() const { return mAbstract; }
303 
310  void setKeywordList( const QString &keywords ) { mKeywordList = keywords; }
311 
318  QString keywordList() const { return mKeywordList; }
319 
320  /* Layer dataUrl information */
321 
329  void setDataUrl( const QString &dataUrl ) { mDataUrl = dataUrl; }
330 
338  QString dataUrl() const { return mDataUrl; }
339 
347  void setDataUrlFormat( const QString &dataUrlFormat ) { mDataUrlFormat = dataUrlFormat; }
348 
356  QString dataUrlFormat() const { return mDataUrlFormat; }
357 
358  /* Layer attribution information */
359 
367  void setAttribution( const QString &attrib ) { mAttribution = attrib; }
368 
376  QString attribution() const { return mAttribution; }
377 
385  void setAttributionUrl( const QString &attribUrl ) { mAttributionUrl = attribUrl; }
386 
394  QString attributionUrl() const { return mAttributionUrl; }
395 
396  /* Layer metadataUrl information */
397 
405  void setMetadataUrl( const QString &metaUrl ) { mMetadataUrl = metaUrl; }
406 
414  QString metadataUrl() const { return mMetadataUrl; }
415 
423  void setMetadataUrlType( const QString &metaUrlType ) { mMetadataUrlType = metaUrlType; }
424 
432  QString metadataUrlType() const { return mMetadataUrlType; }
433 
441  void setMetadataUrlFormat( const QString &metaUrlFormat ) { mMetadataUrlFormat = metaUrlFormat; }
442 
450  QString metadataUrlFormat() const { return mMetadataUrlFormat; }
451 
457  void setBlendMode( QPainter::CompositionMode blendMode );
458 
463  QPainter::CompositionMode blendMode() const;
464 
466  bool readOnly() const { return isReadOnly(); }
467 
471  virtual void reload() {}
472 
477  virtual QgsMapLayerRenderer *createMapRenderer( QgsRenderContext &rendererContext ) = 0 SIP_FACTORY;
478 
480  virtual QgsRectangle extent() const;
481 
487  bool isValid() const;
488 
495  QString publicSource() const;
496 
502  QString source() const;
503 
508  virtual QStringList subLayers() const;
509 
514  virtual void setLayerOrder( const QStringList &layers );
515 
521  virtual void setSubLayerVisibility( const QString &name, bool visible );
522 
524  virtual bool isEditable() const;
525 
530  virtual bool isSpatial() const;
531 
540  virtual bool isTemporary() const;
541 
546  enum ReadFlag
547  {
548  FlagDontResolveLayers = 1 << 0,
549  };
550  Q_DECLARE_FLAGS( ReadFlags, ReadFlag )
551 
552 
569  bool readLayerXml( const QDomElement &layerElement, QgsReadWriteContext &context, QgsMapLayer::ReadFlags flags = QgsMapLayer::ReadFlags() );
570 
588  bool writeLayerXml( QDomElement &layerElement, QDomDocument &document, const QgsReadWriteContext &context ) const;
589 
594  virtual void resolveReferences( QgsProject *project );
595 
601  Q_INVOKABLE QStringList customPropertyKeys() const;
602 
608  Q_INVOKABLE void setCustomProperty( const QString &key, const QVariant &value );
609 
614  Q_INVOKABLE QVariant customProperty( const QString &value, const QVariant &defaultValue = QVariant() ) const;
615 
620  void setCustomProperties( const QgsObjectCustomProperties &properties );
621 
627  const QgsObjectCustomProperties &customProperties() const;
628 
633  void removeCustomProperty( const QString &key );
634 
640  virtual QgsError error() const;
641 
647 
649  void setCrs( const QgsCoordinateReferenceSystem &srs, bool emitSignal = true );
650 
656  QgsCoordinateTransformContext transformContext( ) const;
657 
658 
664  static QString formatLayerName( const QString &name );
665 
673  virtual QString metadataUri() const;
674 
681  void exportNamedMetadata( QDomDocument &doc, QString &errorMsg ) const;
682 
692  virtual QString saveDefaultMetadata( bool &resultFlag SIP_OUT );
693 
708  QString saveNamedMetadata( const QString &uri, bool &resultFlag );
709 
724  virtual QString loadNamedMetadata( const QString &uri, bool &resultFlag SIP_OUT );
725 
735  QString loadDefaultMetadata( bool &resultFlag );
736 
745  bool loadNamedMetadataFromDatabase( const QString &db, const QString &uri, QString &qmd );
746 
754  bool importNamedMetadata( QDomDocument &document, QString &errorMessage );
755 
763  virtual QString styleURI() const;
764 
774  virtual QString loadDefaultStyle( bool &resultFlag SIP_OUT );
775 
791  virtual QString loadNamedStyle( const QString &uri, bool &resultFlag SIP_OUT, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories );
792 
800  virtual bool loadNamedStyleFromDatabase( const QString &db, const QString &uri, QString &qml SIP_OUT );
801 
811  virtual bool importNamedStyle( QDomDocument &doc, QString &errorMsg SIP_OUT,
812  QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories );
813 
822  virtual void exportNamedStyle( QDomDocument &doc, QString &errorMsg SIP_OUT, const QgsReadWriteContext &context = QgsReadWriteContext(),
823  QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) const;
824 
825 
832  virtual void exportSldStyle( QDomDocument &doc, QString &errorMsg ) const;
833 
843  virtual QString saveDefaultStyle( bool &resultFlag SIP_OUT );
844 
860  virtual QString saveNamedStyle( const QString &uri, bool &resultFlag SIP_OUT, StyleCategories categories = AllStyleCategories );
861 
870  virtual QString saveSldStyle( const QString &uri, bool &resultFlag ) const;
871 
880  virtual QString loadSldStyle( const QString &uri, bool &resultFlag );
881 
882  virtual bool readSld( const QDomNode &node, QString &errorMessage )
883  { Q_UNUSED( node ) errorMessage = QStringLiteral( "Layer type %1 not supported" ).arg( static_cast<int>( type() ) ); return false; }
884 
885 
886 
895  virtual bool readSymbology( const QDomNode &node, QString &errorMessage,
896  QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) = 0;
897 
908  virtual bool readStyle( const QDomNode &node, QString &errorMessage,
909  QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories );
910 
921  virtual bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context,
922  StyleCategories categories = AllStyleCategories ) const = 0;
923 
936  virtual bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context,
937  StyleCategories categories = AllStyleCategories ) const;
938 
939 
955  virtual void setDataSource( const QString &dataSource, const QString &baseName, const QString &provider, const QgsDataProvider::ProviderOptions &options, bool loadDefaultStyleFlag = false );
956 
960  QString providerType() const;
961 
963  QUndoStack *undoStack();
964 
969  QUndoStack *undoStackStyles();
970 
974  void setLegendUrl( const QString &legendUrl ) { mLegendUrl = legendUrl; }
975 
979  QString legendUrl() const { return mLegendUrl; }
980 
984  void setLegendUrlFormat( const QString &legendUrlFormat ) { mLegendUrlFormat = legendUrlFormat; }
985 
989  QString legendUrlFormat() const { return mLegendUrlFormat; }
990 
996  void setLegend( QgsMapLayerLegend *legend SIP_TRANSFER );
997 
1002  QgsMapLayerLegend *legend() const;
1003 
1008  QgsMapLayerStyleManager *styleManager() const;
1009 
1014  void setRenderer3D( QgsAbstract3DRenderer *renderer SIP_TRANSFER );
1015 
1020  QgsAbstract3DRenderer *renderer3D() const;
1021 
1031  bool isInScaleRange( double scale ) const;
1032 
1043  double minimumScale() const;
1044 
1055  double maximumScale() const;
1056 
1065  bool hasScaleBasedVisibility() const;
1066 
1073  bool hasAutoRefreshEnabled() const;
1074 
1082  int autoRefreshInterval() const;
1083 
1095  void setAutoRefreshInterval( int interval );
1096 
1103  void setAutoRefreshEnabled( bool enabled );
1104 
1111  virtual const QgsLayerMetadata &metadata() const;
1112 
1119  virtual void setMetadata( const QgsLayerMetadata &metadata );
1120 
1125  virtual QString htmlMetadata() const;
1126 
1128  virtual QDateTime timestamp() const;
1129 
1137  virtual QSet<QgsMapLayerDependency> dependencies() const;
1138 
1144  QString refreshOnNotifyMessage() const { return mRefreshOnNofifyMessage; }
1145 
1151  bool isRefreshOnNotifyEnabled() const { return mIsRefreshOnNofifyEnabled; }
1152 
1161  QString originalXmlProperties() const;
1162 
1170  void setOriginalXmlProperties( const QString &originalXmlProperties );
1171 
1176  static QString generateId( const QString &layerName );
1177 
1187  virtual bool accept( QgsStyleEntityVisitorInterface *visitor ) const;
1188 
1194  virtual QgsMapLayerTemporalProperties *temporalProperties() { return nullptr; }
1195 
1196  public slots:
1197 
1207  void setMinimumScale( double scale );
1208 
1218  void setMaximumScale( double scale );
1219 
1227  void setScaleBasedVisibility( bool enabled );
1228 
1237  void triggerRepaint( bool deferredUpdate = false );
1238 
1243  void emitStyleChanged();
1244 
1253  virtual bool setDependencies( const QSet<QgsMapLayerDependency> &layers );
1254 
1260  void setRefreshOnNotifyEnabled( bool enabled );
1261 
1269  void setRefreshOnNofifyMessage( const QString &message ) { mRefreshOnNofifyMessage = message; }
1270 
1276  virtual void setTransformContext( const QgsCoordinateTransformContext &transformContext ) = 0;
1277 
1278 #ifdef SIP_RUN
1279  SIP_PYOBJECT __repr__();
1280  % MethodCode
1281  QString str = QStringLiteral( "<QgsMapLayer: '%1' (%2)>" ).arg( sipCpp->name(), sipCpp->dataProvider() ? sipCpp->dataProvider()->name() : QStringLiteral( "Invalid" ) );
1282  sipRes = PyUnicode_FromString( str.toUtf8().constData() );
1283  % End
1284 #endif
1285 
1286  signals:
1287 
1294  void beforeResolveReferences( QgsProject *project );
1295 
1297  void statusChanged( const QString &status );
1298 
1304  void nameChanged();
1305 
1307  void crsChanged();
1308 
1315  void repaintRequested( bool deferredUpdate = false );
1316 
1318  void recalculateExtents() const;
1319 
1321  void dataChanged();
1322 
1324  void blendModeChanged( QPainter::CompositionMode blendMode );
1325 
1330  void rendererChanged();
1331 
1339  void styleChanged();
1340 
1345  void legendChanged();
1346 
1351  void renderer3DChanged();
1352 
1357  void configChanged();
1358 
1362  void dependenciesChanged();
1363 
1370  void willBeDeleted();
1371 
1377  void autoRefreshIntervalChanged( int interval );
1378 
1385  void metadataChanged();
1386 
1393  void flagsChanged();
1394 
1402  void dataSourceChanged();
1403 
1409  void styleLoaded( QgsMapLayer::StyleCategories categories );
1410 
1411 
1412  private slots:
1413 
1414  void onNotifiedTriggerRepaint( const QString &message );
1415 
1416  protected:
1417 
1423  void clone( QgsMapLayer *layer ) const;
1424 
1426  virtual void setExtent( const QgsRectangle &rect );
1427 
1429  void setValid( bool valid );
1430 
1435  virtual bool readXml( const QDomNode &layer_node, QgsReadWriteContext &context );
1436 
1441  virtual bool writeXml( QDomNode &layer_node, QDomDocument &document, const QgsReadWriteContext &context ) const;
1442 
1454  virtual QString encodedSource( const QString &source, const QgsReadWriteContext &context ) const;
1455 
1468  virtual QString decodedSource( const QString &source, const QString &dataProvider, const QgsReadWriteContext &context ) const;
1469 
1474  void readCustomProperties( const QDomNode &layerNode, const QString &keyStartsWith = QString() );
1475 
1477  void writeCustomProperties( QDomNode &layerNode, QDomDocument &doc ) const;
1478 
1480  void readStyleManager( const QDomNode &layerNode );
1482  void writeStyleManager( QDomNode &layerNode, QDomDocument &doc ) const;
1483 
1488  void writeCommonStyle( QDomElement &layerElement, QDomDocument &document,
1489  const QgsReadWriteContext &context,
1490  StyleCategories categories = AllStyleCategories ) const;
1491 
1496  void readCommonStyle( const QDomElement &layerElement, const QgsReadWriteContext &context,
1497  StyleCategories categories = AllStyleCategories );
1498 
1500  void setProviderType( const QString &providerType );
1501 
1502 #ifndef SIP_RUN
1503 #if 0
1504  void connectNotify( const char *signal ) override;
1506 #endif
1507 #endif
1508 
1510  void appendError( const QgsErrorMessage &error ) { mError.append( error );}
1512  void setError( const QgsError &error ) { mError = error;}
1513 
1516 
1518  bool mValid = false;
1519 
1521  QString mDataSource;
1522 
1524  QString mLayerName;
1525 
1526  QString mShortName;
1527  QString mTitle;
1528 
1530  QString mAbstract;
1531  QString mKeywordList;
1532 
1534  QString mDataUrl;
1536 
1538  QString mAttribution;
1540 
1542  QString mMetadataUrl;
1545 
1547  QString mLegendUrl;
1549 
1552 
1554  QSet<QgsMapLayerDependency> mDependencies;
1555 
1561  Q_DECL_DEPRECATED bool hasDependencyCycle( const QSet<QgsMapLayerDependency> & ) const {return false;}
1562 
1563  bool mIsRefreshOnNofifyEnabled = false;
1565 
1567  QString mProviderKey;
1568 
1569  //TODO QGIS 4 - move to readXml as a new argument (breaks API)
1570 
1572  QgsMapLayer::ReadFlags mReadFlags = QgsMapLayer::ReadFlags();
1573 
1579  bool mShouldValidateCrs = true;
1580 
1581  private:
1582 
1583  virtual QString baseURI( PropertyType type ) const;
1584  QString saveNamedProperty( const QString &uri, QgsMapLayer::PropertyType type,
1585  bool &resultFlag, StyleCategories categories = AllStyleCategories );
1586  QString loadNamedProperty( const QString &uri, QgsMapLayer::PropertyType type,
1587  bool &resultFlag, StyleCategories categories = AllStyleCategories );
1588  bool loadNamedPropertyFromDatabase( const QString &db, const QString &uri, QString &xml, QgsMapLayer::PropertyType type );
1589 
1594  virtual bool isReadOnly() const;
1595 
1600 
1602  QString mID;
1603 
1605  QgsMapLayerType mLayerType;
1606 
1607  LayerFlags mFlags = LayerFlags( Identifiable | Removable | Searchable );
1608 
1610  QPainter::CompositionMode mBlendMode = QPainter::CompositionMode_SourceOver;
1611 
1613  QString mTag;
1614 
1615  //set some generous defaults for scale based visibility
1616 
1618  double mMinScale = 0;
1620  double mMaxScale = 100000000;
1622  bool mScaleBasedVisibility = false;
1623 
1625  QUndoStack *mUndoStack = nullptr;
1626 
1627  QUndoStack *mUndoStackStyles = nullptr;
1628 
1630  QgsObjectCustomProperties mCustomProperties;
1631 
1633  QgsMapLayerLegend *mLegend = nullptr;
1634 
1636  QgsMapLayerStyleManager *mStyleManager = nullptr;
1637 
1639  QTimer *mRefreshTimer = nullptr;
1640 
1641  QgsLayerMetadata mMetadata;
1642 
1644  QgsAbstract3DRenderer *m3DRenderer = nullptr;
1645 
1651  QString mOriginalXmlProperties;
1652 
1654  bool mRepaintRequestedFired = false;
1655 };
1656 
1658 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsMapLayer::LayerFlags )
1659 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsMapLayer::StyleCategories )
1660 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsMapLayer::ReadFlags )
1661 
1662 
1663 #ifndef SIP_RUN
1664 
1670 typedef QPointer< QgsMapLayer > QgsWeakMapLayerPointer;
1671 
1677 typedef QList< QgsWeakMapLayerPointer > QgsWeakMapLayerPointerList;
1678 #endif
1679 
1680 #endif
QgsMapLayer::setError
void setError(const QgsError &error)
Sets error message.
Definition: qgsmaplayer.h:1512
QgsMapLayer::setAbstract
void setAbstract(const QString &abstract)
Sets the abstract of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:294
qgsmaplayerstyle.h
QgsMapLayer::attributionUrl
QString attributionUrl() const
Returns the attribution URL of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:394
QgsCoordinateTransformContext
Definition: qgscoordinatetransformcontext.h:57
QgsMapLayer::refreshOnNotifyMessage
QString refreshOnNotifyMessage() const
Returns the message that should be notified by the provider to triggerRepaint.
Definition: qgsmaplayer.h:1144
QgsMapLayer::setMetadataUrl
void setMetadataUrl(const QString &metaUrl)
Sets the metadata URL of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:405
QgsWeakMapLayerPointerList
QList< QgsWeakMapLayerPointer > QgsWeakMapLayerPointerList
A list of weak pointers to QgsMapLayers.
Definition: qgsmaplayer.h:1677
QgsMapLayer::dataUrlFormat
QString dataUrlFormat() const
Returns the DataUrl format of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:356
QgsDataProvider::ProviderOptions
Setting options for creating vector data providers.
Definition: qgsdataprovider.h:104
QgsMapLayerType::MeshLayer
@ MeshLayer
Added in 3.2.
QgsReadWriteContext
Definition: qgsreadwritecontext.h:34
QgsDataProvider
Definition: qgsdataprovider.h:41
qgsrectangle.h
QgsMapLayerType::VectorLayer
@ VectorLayer
QgsMapLayer::mLegendUrlFormat
QString mLegendUrlFormat
Definition: qgsmaplayer.h:1548
qgsmaplayerdependency.h
QgsAbstract3DRenderer
Definition: qgsabstract3drenderer.h:48
QgsMapLayer::mAttributionUrl
QString mAttributionUrl
Definition: qgsmaplayer.h:1539
qgsreadwritecontext.h
SIP_OUT
#define SIP_OUT
Definition: qgis_sip.h:58
crs
const QgsCoordinateReferenceSystem & crs
Definition: qgswfsgetfeature.cpp:105
QgsMapLayer::isRefreshOnNotifyEnabled
bool isRefreshOnNotifyEnabled() const
Returns true if the refresh on provider nofification is enabled.
Definition: qgsmaplayer.h:1151
QgsLayerMetadata
A structured metadata store for a map layer.
Definition: qgslayermetadata.h:56
QgsMapLayerType
QgsMapLayerType
Definition: qgsmaplayer.h:67
QgsMapLayer::mDataUrlFormat
QString mDataUrlFormat
Definition: qgsmaplayer.h:1535
QgsMapLayer::setMetadataUrlType
void setMetadataUrlType(const QString &metaUrlType)
Set the metadata type of the layer used by QGIS Server in GetCapabilities request MetadataUrlType ind...
Definition: qgsmaplayer.h:423
QgsError
Definition: qgserror.h:80
QgsMapLayerLegend
Definition: qgsmaplayerlegend.h:45
QgsMapLayer::Metadata
@ Metadata
Definition: qgsmaplayer.h:132
QgsRenderContext
Definition: qgsrendercontext.h:57
QgsStyleEntityVisitorInterface
Definition: qgsstyleentityvisitor.h:33
QgsMapLayer::PropertyType
PropertyType
Maplayer has a style and a metadata property.
Definition: qgsmaplayer.h:129
QgsMapLayer::reload
virtual void reload()
Synchronises with changes in the datasource.
Definition: qgsmaplayer.h:471
QgsMapLayer::ReadFlag
ReadFlag
Flags which control project read behavior.
Definition: qgsmaplayer.h:546
QgsMapLayer::mError
QgsError mError
Error.
Definition: qgsmaplayer.h:1551
QgsRectangle
Definition: qgsrectangle.h:41
QgsMapLayer::dataUrl
QString dataUrl() const
Returns the DataUrl of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:338
QgsMapLayer::mProviderKey
QString mProviderKey
Data provider key (name of the data provider)
Definition: qgsmaplayer.h:1567
QgsProject
Definition: qgsproject.h:92
QgsMapLayerRenderer
Definition: qgsmaplayerrenderer.h:50
SIP_FACTORY
#define SIP_FACTORY
Definition: qgis_sip.h:76
QgsMapLayer::setLegendUrlFormat
void setLegendUrlFormat(const QString &legendUrlFormat)
Sets the format for a URL based layer legend.
Definition: qgsmaplayer.h:984
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(QgsMeshTimeSettings)
QgsMapLayer::mLayerName
QString mLayerName
Name of the layer - used for display.
Definition: qgsmaplayer.h:1524
SIP_MONKEYPATCH_SCOPEENUM_UNNEST
#define SIP_MONKEYPATCH_SCOPEENUM_UNNEST(OUTSIDE_CLASS, FORMERNAME)
Definition: qgis_sip.h:252
SIP_CONVERT_TO_SUBCLASS_CODE
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition: qgis_sip.h:172
qgslayermetadata.h
QgsMapLayerStyleManager
Definition: qgsmaplayerstylemanager.h:55
qgsobjectcustomproperties.h
SIP_SKIP
#define SIP_SKIP
Definition: qgis_sip.h:126
qgserror.h
QgsMapLayer::mExtent
QgsRectangle mExtent
Extent of the layer.
Definition: qgsmaplayer.h:1515
QgsMapLayer::keywordList
QString keywordList() const
Returns the keyword list of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:318
QgsMapLayer::readSld
virtual bool readSld(const QDomNode &node, QString &errorMessage)
Definition: qgsmaplayer.h:882
QgsMapLayer::legendUrlFormat
QString legendUrlFormat() const
Returns the format for a URL based layer legend.
Definition: qgsmaplayer.h:989
QgsMapLayer::mMetadataUrl
QString mMetadataUrl
MetadataUrl of the layer.
Definition: qgsmaplayer.h:1542
QgsMapLayer::metadataUrlFormat
QString metadataUrlFormat() const
Returns the metadata format of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:450
QgsMapLayer::mAttribution
QString mAttribution
Attribution of the layer.
Definition: qgsmaplayer.h:1538
QgsMapLayerType::RasterLayer
@ RasterLayer
QgsMapLayer::mDependencies
QSet< QgsMapLayerDependency > mDependencies
List of layers that may modify this layer on modification.
Definition: qgsmaplayer.h:1554
qgis_sip.h
SIP_TRANSFER
#define SIP_TRANSFER
Definition: qgis_sip.h:36
QgsMapLayer::temporalProperties
virtual QgsMapLayerTemporalProperties * temporalProperties()
Returns the layer's temporal properties.
Definition: qgsmaplayer.h:1194
qgsrendercontext.h
QgsMapLayer::mTitle
QString mTitle
Definition: qgsmaplayer.h:1527
QgsMapLayer::mDataUrl
QString mDataUrl
DataUrl of the layer.
Definition: qgsmaplayer.h:1534
QgsMapLayer::mMetadataUrlFormat
QString mMetadataUrlFormat
Definition: qgsmaplayer.h:1544
QgsMapLayer::setKeywordList
void setKeywordList(const QString &keywords)
Sets the keyword list of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:310
QgsMapLayer::title
QString title() const
Returns the title of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:286
QgsMapLayer::setTitle
void setTitle(const QString &title)
Sets the title of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:278
QgsMapLayerTemporalProperties
Definition: qgsmaplayertemporalproperties.h:42
QgsMapLayer::mDataSource
QString mDataSource
Data source description string, varies by layer type.
Definition: qgsmaplayer.h:1521
QgsWeakMapLayerPointer
QPointer< QgsMapLayer > QgsWeakMapLayerPointer
Weak pointer for QgsMapLayer.
Definition: qgsmaplayer.h:1670
QgsErrorMessage
Definition: qgserror.h:32
QgsCoordinateReferenceSystem
Definition: qgscoordinatereferencesystem.h:206
QgsMapLayer::setMetadataUrlFormat
void setMetadataUrlFormat(const QString &metaUrlFormat)
Sets the metadata format of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:441
QgsMapLayer::setAttributionUrl
void setAttributionUrl(const QString &attribUrl)
Sets the attribution URL of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:385
QgsMapLayer::legendUrl
QString legendUrl() const
Returns the URL for the layer's legend.
Definition: qgsmaplayer.h:979
QgsMapLayer::appendError
void appendError(const QgsErrorMessage &error)
Add error message.
Definition: qgsmaplayer.h:1510
QgsMapLayer::LayerFlag
LayerFlag
Flags for the map layer.
Definition: qgsmaplayer.h:140
QgsMapLayer::mAbstract
QString mAbstract
Description of the layer.
Definition: qgsmaplayer.h:1530
QgsMapLayer::setRefreshOnNofifyMessage
void setRefreshOnNofifyMessage(const QString &message)
Set the notification message that triggers repaint If refresh on notification is enabled,...
Definition: qgsmaplayer.h:1269
QgsMapLayer::setDataUrlFormat
void setDataUrlFormat(const QString &dataUrlFormat)
Sets the DataUrl format of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:347
QgsObjectCustomProperties
Definition: qgsobjectcustomproperties.h:35
QgsMapLayer
Definition: qgsmaplayer.h:81
QgsMapLayer::setLegendUrl
void setLegendUrl(const QString &legendUrl)
Sets the URL for the layer's legend.
Definition: qgsmaplayer.h:974
QgsMapLayer::hasDependencyCycle
Q_DECL_DEPRECATED bool hasDependencyCycle(const QSet< QgsMapLayerDependency > &) const
Checks whether a new set of dependencies will introduce a cycle this method is now deprecated and alw...
Definition: qgsmaplayer.h:1561
QgsMapLayer::readOnly
bool readOnly() const
Returns if this layer is read only.
Definition: qgsmaplayer.h:466
QgsMapLayerType::VectorTileLayer
@ VectorTileLayer
Added in 3.14.
QgsMapLayer::metadataUrl
QString metadataUrl() const
Returns the metadata URL of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:414
QgsMapLayer::StyleCategory
StyleCategory
Categories of style to distinguish appropriate sections for import/export.
Definition: qgsmaplayer.h:154
qgsdataprovider.h
QgsMapLayer::setAttribution
void setAttribution(const QString &attrib)
Sets the attribution of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:367
QgsMapLayer::mRefreshOnNofifyMessage
QString mRefreshOnNofifyMessage
Definition: qgsmaplayer.h:1564
QgsMapLayer::mLegendUrl
QString mLegendUrl
WMS legend.
Definition: qgsmaplayer.h:1547
QgsMapLayer::setDataUrl
void setDataUrl(const QString &dataUrl)
Sets the DataUrl of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:329
QgsMapLayer::AllStyleCategories
@ AllStyleCategories
Definition: qgsmaplayer.h:171
QgsMapLayer::attribution
QString attribution() const
Returns the attribution of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:376
QgsMapLayer::metadataUrlType
QString metadataUrlType() const
Returns the metadata type of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:432
SIP_END
#define SIP_END
Definition: qgis_sip.h:189
qgscoordinatereferencesystem.h
QgsMapLayer::mKeywordList
QString mKeywordList
Definition: qgsmaplayer.h:1531
QgsMapLayerType::PluginLayer
@ PluginLayer
QgsMapLayer::mShortName
QString mShortName
Definition: qgsmaplayer.h:1526
QgsMapLayer::mMetadataUrlType
QString mMetadataUrlType
Definition: qgsmaplayer.h:1543