QGIS API Documentation  3.10.0-A Coruña (6c816b4204)
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;
50 
51 class QDomDocument;
52 class QKeyEvent;
53 class QPainter;
54 
55 /*
56  * Constants used to describe copy-paste MIME types
57  */
58 #define QGSCLIPBOARD_MAPLAYER_MIME "application/qgis.maplayer"
59 
60 
67  {
71  MeshLayer
72 };
73 
79 class CORE_EXPORT QgsMapLayer : public QObject
80 {
81  Q_OBJECT
82 
83  Q_PROPERTY( QString name READ name WRITE setName NOTIFY nameChanged )
84  Q_PROPERTY( int autoRefreshInterval READ autoRefreshInterval WRITE setAutoRefreshInterval NOTIFY autoRefreshIntervalChanged )
85  Q_PROPERTY( QgsLayerMetadata metadata READ metadata WRITE setMetadata NOTIFY metadataChanged )
86  Q_PROPERTY( QgsCoordinateReferenceSystem crs READ crs WRITE setCrs NOTIFY crsChanged )
87 
88 #ifdef SIP_RUN
90  QgsMapLayer * layer = qobject_cast<QgsMapLayer *>( sipCpp );
91 
92  sipType = 0;
93 
94  if ( layer )
95  {
96  switch ( layer->type() )
97  {
99  sipType = sipType_QgsVectorLayer;
100  break;
102  sipType = sipType_QgsRasterLayer;
103  break;
105  sipType = sipType_QgsPluginLayer;
106  break;
108  sipType = sipType_QgsMeshLayer;
109  break;
110  default:
111  sipType = nullptr;
112  break;
113  }
114  }
115  SIP_END
116 #endif
117 
118  public:
119 
125  {
126  Style = 0,
128  };
129 
136  {
137  Identifiable = 1 << 0,
138  Removable = 1 << 1,
139  Searchable = 1 << 2,
140  };
141  Q_ENUM( LayerFlag )
142  Q_DECLARE_FLAGS( LayerFlags, LayerFlag )
143  Q_FLAG( LayerFlags )
144 
145 
150  {
151  LayerConfiguration = 1 << 0,
152  Symbology = 1 << 1,
153  Symbology3D = 1 << 2,
154  Labeling = 1 << 3,
155  Fields = 1 << 4,
156  Forms = 1 << 5,
157  Actions = 1 << 6,
158  MapTips = 1 << 7,
159  Diagrams = 1 << 8,
160  AttributeTable = 1 << 9,
161  Rendering = 1 << 10,
162  CustomProperties = 1 << 11,
163  GeometryOptions = 1 << 12,
164  AllStyleCategories = LayerConfiguration | Symbology | Symbology3D | Labeling | Fields | Forms | Actions |
165  MapTips | Diagrams | AttributeTable | Rendering | CustomProperties | GeometryOptions,
166  };
167  Q_ENUM( StyleCategory )
168  Q_DECLARE_FLAGS( StyleCategories, StyleCategory )
169  Q_FLAG( StyleCategories )
170 
171 
177  QgsMapLayer( QgsMapLayerType type = QgsMapLayerType::VectorLayer, const QString &name = QString(), const QString &source = QString() );
178 
179  ~QgsMapLayer() override;
180 
182  QgsMapLayer( QgsMapLayer const & ) = delete;
184  QgsMapLayer &operator=( QgsMapLayer const & ) = delete;
185 
192  virtual QgsMapLayer *clone() const = 0;
193 
197  QgsMapLayerType type() const;
198 
206  QgsMapLayer::LayerFlags flags() const;
207 
215  void setFlags( QgsMapLayer::LayerFlags flags );
216 
222  static QString extensionPropertyType( PropertyType type );
223 
225  QString id() const;
226 
232  void setName( const QString &name );
233 
238  QString name() const;
239 
243  virtual QgsDataProvider *dataProvider();
244 
249  virtual const QgsDataProvider *dataProvider() const SIP_SKIP;
250 
257  void setShortName( const QString &shortName ) { mShortName = shortName; }
258 
264  QString shortName() const;
265 
271  void setTitle( const QString &title ) { mTitle = title; }
272 
279  QString title() const { return mTitle; }
280 
287  void setAbstract( const QString &abstract ) { mAbstract = abstract; }
288 
295  QString abstract() const { return mAbstract; }
296 
303  void setKeywordList( const QString &keywords ) { mKeywordList = keywords; }
304 
311  QString keywordList() const { return mKeywordList; }
312 
313  /* Layer dataUrl information */
314 
322  void setDataUrl( const QString &dataUrl ) { mDataUrl = dataUrl; }
323 
331  QString dataUrl() const { return mDataUrl; }
332 
340  void setDataUrlFormat( const QString &dataUrlFormat ) { mDataUrlFormat = dataUrlFormat; }
341 
349  QString dataUrlFormat() const { return mDataUrlFormat; }
350 
351  /* Layer attribution information */
352 
360  void setAttribution( const QString &attrib ) { mAttribution = attrib; }
361 
369  QString attribution() const { return mAttribution; }
370 
378  void setAttributionUrl( const QString &attribUrl ) { mAttributionUrl = attribUrl; }
379 
387  QString attributionUrl() const { return mAttributionUrl; }
388 
389  /* Layer metadataUrl information */
390 
398  void setMetadataUrl( const QString &metaUrl ) { mMetadataUrl = metaUrl; }
399 
407  QString metadataUrl() const { return mMetadataUrl; }
408 
416  void setMetadataUrlType( const QString &metaUrlType ) { mMetadataUrlType = metaUrlType; }
417 
425  QString metadataUrlType() const { return mMetadataUrlType; }
426 
434  void setMetadataUrlFormat( const QString &metaUrlFormat ) { mMetadataUrlFormat = metaUrlFormat; }
435 
443  QString metadataUrlFormat() const { return mMetadataUrlFormat; }
444 
450  void setBlendMode( QPainter::CompositionMode blendMode );
451 
456  QPainter::CompositionMode blendMode() const;
457 
459  bool readOnly() const { return isReadOnly(); }
460 
464  virtual void reload() {}
465 
470  virtual QgsMapLayerRenderer *createMapRenderer( QgsRenderContext &rendererContext ) = 0 SIP_FACTORY;
471 
473  virtual QgsRectangle extent() const;
474 
480  bool isValid() const;
481 
488  QString publicSource() const;
489 
495  QString source() const;
496 
501  virtual QStringList subLayers() const;
502 
507  virtual void setLayerOrder( const QStringList &layers );
508 
514  virtual void setSubLayerVisibility( const QString &name, bool visible );
515 
517  virtual bool isEditable() const;
518 
523  virtual bool isSpatial() const;
524 
529  enum ReadFlag
530  {
531  FlagDontResolveLayers = 1 << 0,
532  };
533  Q_DECLARE_FLAGS( ReadFlags, ReadFlag )
534 
535 
552  bool readLayerXml( const QDomElement &layerElement, QgsReadWriteContext &context, QgsMapLayer::ReadFlags flags = nullptr );
553 
571  bool writeLayerXml( QDomElement &layerElement, QDomDocument &document, const QgsReadWriteContext &context ) const;
572 
577  virtual void resolveReferences( QgsProject *project );
578 
584  QStringList customPropertyKeys() const;
585 
591  void setCustomProperty( const QString &key, const QVariant &value );
592 
597  QVariant customProperty( const QString &value, const QVariant &defaultValue = QVariant() ) const;
598 
603  void setCustomProperties( const QgsObjectCustomProperties &properties );
604 
609  void removeCustomProperty( const QString &key );
610 
616  virtual QgsError error() const;
617 
623 
625  void setCrs( const QgsCoordinateReferenceSystem &srs, bool emitSignal = true );
626 
632  QgsCoordinateTransformContext transformContext( ) const;
633 
634 
640  static QString formatLayerName( const QString &name );
641 
649  virtual QString metadataUri() const;
650 
657  void exportNamedMetadata( QDomDocument &doc, QString &errorMsg ) const;
658 
668  virtual QString saveDefaultMetadata( bool &resultFlag SIP_OUT );
669 
684  QString saveNamedMetadata( const QString &uri, bool &resultFlag );
685 
700  virtual QString loadNamedMetadata( const QString &uri, bool &resultFlag SIP_OUT );
701 
711  QString loadDefaultMetadata( bool &resultFlag );
712 
721  bool loadNamedMetadataFromDatabase( const QString &db, const QString &uri, QString &qmd );
722 
730  bool importNamedMetadata( QDomDocument &document, QString &errorMessage );
731 
739  virtual QString styleURI() const;
740 
750  virtual QString loadDefaultStyle( bool &resultFlag SIP_OUT );
751 
767  virtual QString loadNamedStyle( const QString &uri, bool &resultFlag SIP_OUT, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories );
768 
776  virtual bool loadNamedStyleFromDatabase( const QString &db, const QString &uri, QString &qml SIP_OUT );
777 
787  virtual bool importNamedStyle( QDomDocument &doc, QString &errorMsg SIP_OUT,
788  QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories );
789 
798  virtual void exportNamedStyle( QDomDocument &doc, QString &errorMsg SIP_OUT, const QgsReadWriteContext &context = QgsReadWriteContext(),
799  QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) const;
800 
801 
808  virtual void exportSldStyle( QDomDocument &doc, QString &errorMsg ) const;
809 
819  virtual QString saveDefaultStyle( bool &resultFlag SIP_OUT );
820 
836  virtual QString saveNamedStyle( const QString &uri, bool &resultFlag SIP_OUT, StyleCategories categories = AllStyleCategories );
837 
846  virtual QString saveSldStyle( const QString &uri, bool &resultFlag ) const;
847 
856  virtual QString loadSldStyle( const QString &uri, bool &resultFlag );
857 
858  virtual bool readSld( const QDomNode &node, QString &errorMessage )
859  { Q_UNUSED( node ) errorMessage = QStringLiteral( "Layer type %1 not supported" ).arg( static_cast<int>( type() ) ); return false; }
860 
861 
862 
871  virtual bool readSymbology( const QDomNode &node, QString &errorMessage,
872  QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) = 0;
873 
884  virtual bool readStyle( const QDomNode &node, QString &errorMessage,
885  QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories );
886 
897  virtual bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context,
898  StyleCategories categories = AllStyleCategories ) const = 0;
899 
912  virtual bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context,
913  StyleCategories categories = AllStyleCategories ) const;
914 
915 
931  virtual void setDataSource( const QString &dataSource, const QString &baseName, const QString &provider, const QgsDataProvider::ProviderOptions &options, bool loadDefaultStyleFlag = false );
932 
936  QString providerType() const;
937 
939  QUndoStack *undoStack();
940 
945  QUndoStack *undoStackStyles();
946 
950  void setLegendUrl( const QString &legendUrl ) { mLegendUrl = legendUrl; }
951 
955  QString legendUrl() const { return mLegendUrl; }
956 
960  void setLegendUrlFormat( const QString &legendUrlFormat ) { mLegendUrlFormat = legendUrlFormat; }
961 
965  QString legendUrlFormat() const { return mLegendUrlFormat; }
966 
972  void setLegend( QgsMapLayerLegend *legend SIP_TRANSFER );
973 
978  QgsMapLayerLegend *legend() const;
979 
984  QgsMapLayerStyleManager *styleManager() const;
985 
990  void setRenderer3D( QgsAbstract3DRenderer *renderer SIP_TRANSFER );
991 
996  QgsAbstract3DRenderer *renderer3D() const;
997 
1007  bool isInScaleRange( double scale ) const;
1008 
1019  double minimumScale() const;
1020 
1031  double maximumScale() const;
1032 
1041  bool hasScaleBasedVisibility() const;
1042 
1049  bool hasAutoRefreshEnabled() const;
1050 
1058  int autoRefreshInterval() const;
1059 
1071  void setAutoRefreshInterval( int interval );
1072 
1079  void setAutoRefreshEnabled( bool enabled );
1080 
1087  virtual const QgsLayerMetadata &metadata() const;
1088 
1095  virtual void setMetadata( const QgsLayerMetadata &metadata );
1096 
1101  virtual QString htmlMetadata() const;
1102 
1104  virtual QDateTime timestamp() const;
1105 
1113  virtual QSet<QgsMapLayerDependency> dependencies() const;
1114 
1120  QString refreshOnNotifyMessage() const { return mRefreshOnNofifyMessage; }
1121 
1127  bool isRefreshOnNotifyEnabled() const { return mIsRefreshOnNofifyEnabled; }
1128 
1137  QString originalXmlProperties() const;
1138 
1146  void setOriginalXmlProperties( const QString &originalXmlProperties );
1147 
1152  static QString generateId( const QString &layerName );
1153 
1163  virtual bool accept( QgsStyleEntityVisitorInterface *visitor ) const;
1164 
1165  public slots:
1166 
1176  void setMinimumScale( double scale );
1177 
1187  void setMaximumScale( double scale );
1188 
1196  void setScaleBasedVisibility( bool enabled );
1197 
1206  void triggerRepaint( bool deferredUpdate = false );
1207 
1212  void emitStyleChanged();
1213 
1222  virtual bool setDependencies( const QSet<QgsMapLayerDependency> &layers );
1223 
1229  void setRefreshOnNotifyEnabled( bool enabled );
1230 
1238  void setRefreshOnNofifyMessage( const QString &message ) { mRefreshOnNofifyMessage = message; }
1239 
1245  virtual void setTransformContext( const QgsCoordinateTransformContext &transformContext ) = 0;
1246 
1247 #ifdef SIP_RUN
1248  SIP_PYOBJECT __repr__();
1249  % MethodCode
1250  QString str = QStringLiteral( "<QgsMapLayer: '%1' (%2)>" ).arg( sipCpp->name(), sipCpp->dataProvider()->name() );
1251  sipRes = PyUnicode_FromString( str.toUtf8().constData() );
1252  % End
1253 #endif
1254 
1255  signals:
1256 
1263  void beforeResolveReferences( QgsProject *project );
1264 
1266  void statusChanged( const QString &status );
1267 
1273  void nameChanged();
1274 
1276  void crsChanged();
1277 
1284  void repaintRequested( bool deferredUpdate = false );
1285 
1287  void recalculateExtents() const;
1288 
1290  void dataChanged();
1291 
1293  void blendModeChanged( QPainter::CompositionMode blendMode );
1294 
1299  void rendererChanged();
1300 
1308  void styleChanged();
1309 
1314  void legendChanged();
1315 
1320  void renderer3DChanged();
1321 
1326  void configChanged();
1327 
1331  void dependenciesChanged();
1332 
1339  void willBeDeleted();
1340 
1346  void autoRefreshIntervalChanged( int interval );
1347 
1354  void metadataChanged();
1355 
1362  void flagsChanged();
1363 
1371  void dataSourceChanged();
1372 
1373 
1374  private slots:
1375 
1376  void onNotifiedTriggerRepaint( const QString &message );
1377 
1378  protected:
1379 
1385  void clone( QgsMapLayer *layer ) const;
1386 
1388  virtual void setExtent( const QgsRectangle &rect );
1389 
1391  void setValid( bool valid );
1392 
1397  virtual bool readXml( const QDomNode &layer_node, QgsReadWriteContext &context );
1398 
1403  virtual bool writeXml( QDomNode &layer_node, QDomDocument &document, const QgsReadWriteContext &context ) const;
1404 
1416  virtual QString encodedSource( const QString &source, const QgsReadWriteContext &context ) const;
1417 
1430  virtual QString decodedSource( const QString &source, const QString &dataProvider, const QgsReadWriteContext &context ) const;
1431 
1436  void readCustomProperties( const QDomNode &layerNode, const QString &keyStartsWith = QString() );
1437 
1439  void writeCustomProperties( QDomNode &layerNode, QDomDocument &doc ) const;
1440 
1442  void readStyleManager( const QDomNode &layerNode );
1444  void writeStyleManager( QDomNode &layerNode, QDomDocument &doc ) const;
1445 
1450  void writeCommonStyle( QDomElement &layerElement, QDomDocument &document,
1451  const QgsReadWriteContext &context,
1452  StyleCategories categories = AllStyleCategories ) const;
1453 
1458  void readCommonStyle( const QDomElement &layerElement, const QgsReadWriteContext &context,
1459  StyleCategories categories = AllStyleCategories );
1460 
1462  void setProviderType( const QString &providerType );
1463 
1464 #ifndef SIP_RUN
1465 #if 0
1466  void connectNotify( const char *signal ) override;
1468 #endif
1469 #endif
1470 
1472  void appendError( const QgsErrorMessage &error ) { mError.append( error );}
1474  void setError( const QgsError &error ) { mError = error;}
1475 
1478 
1480  bool mValid = false;
1481 
1483  QString mDataSource;
1484 
1486  QString mLayerName;
1487 
1488  QString mShortName;
1489  QString mTitle;
1490 
1492  QString mAbstract;
1493  QString mKeywordList;
1494 
1496  QString mDataUrl;
1498 
1500  QString mAttribution;
1502 
1504  QString mMetadataUrl;
1507 
1509  QString mLegendUrl;
1511 
1514 
1516  QSet<QgsMapLayerDependency> mDependencies;
1517 
1523  Q_DECL_DEPRECATED bool hasDependencyCycle( const QSet<QgsMapLayerDependency> & ) const {return false;}
1524 
1525  bool mIsRefreshOnNofifyEnabled = false;
1527 
1529  QString mProviderKey;
1530 
1531  //TODO QGIS 4 - move to readXml as a new argument (breaks API)
1532 
1534  QgsMapLayer::ReadFlags mReadFlags = nullptr;
1535 
1541  bool mShouldValidateCrs = true;
1542 
1543  private:
1544 
1545  virtual QString baseURI( PropertyType type ) const;
1546  QString saveNamedProperty( const QString &uri, QgsMapLayer::PropertyType type,
1547  bool &resultFlag, StyleCategories categories = AllStyleCategories );
1548  QString loadNamedProperty( const QString &uri, QgsMapLayer::PropertyType type,
1549  bool &resultFlag, StyleCategories categories = AllStyleCategories );
1550  bool loadNamedPropertyFromDatabase( const QString &db, const QString &uri, QString &xml, QgsMapLayer::PropertyType type );
1551 
1556  virtual bool isReadOnly() const;
1557 
1562 
1564  QString mID;
1565 
1567  QgsMapLayerType mLayerType;
1568 
1569  LayerFlags mFlags = LayerFlags( Identifiable | Removable | Searchable );
1570 
1572  QPainter::CompositionMode mBlendMode = QPainter::CompositionMode_SourceOver;
1573 
1575  QString mTag;
1576 
1577  //set some generous defaults for scale based visibility
1578 
1580  double mMinScale = 0;
1582  double mMaxScale = 100000000;
1584  bool mScaleBasedVisibility = false;
1585 
1587  QUndoStack *mUndoStack = nullptr;
1588 
1589  QUndoStack *mUndoStackStyles = nullptr;
1590 
1592  QgsObjectCustomProperties mCustomProperties;
1593 
1595  QgsMapLayerLegend *mLegend = nullptr;
1596 
1598  QgsMapLayerStyleManager *mStyleManager = nullptr;
1599 
1601  QTimer *mRefreshTimer = nullptr;
1602 
1603  QgsLayerMetadata mMetadata;
1604 
1606  QgsAbstract3DRenderer *m3DRenderer = nullptr;
1607 
1613  QString mOriginalXmlProperties;
1614 
1616  bool mRepaintRequestedFired = false;
1617 };
1618 
1620 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsMapLayer::LayerFlags )
1621 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsMapLayer::StyleCategories )
1622 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsMapLayer::ReadFlags )
1623 
1624 
1625 #ifndef SIP_RUN
1626 
1632 typedef QPointer< QgsMapLayer > QgsWeakMapLayerPointer;
1633 
1639 typedef QList< QgsWeakMapLayerPointer > QgsWeakMapLayerPointerList;
1640 #endif
1641 
1642 #endif
QString attributionUrl() const
Returns the attribution URL of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:387
QString mShortName
Definition: qgsmaplayer.h:1488
void setMetadataUrl(const QString &metaUrl)
Sets the metadata URL of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:398
The class is used as a container of context for various read/write operations on other objects...
QString dataUrlFormat() const
Returns the DataUrl format of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:349
A rectangle specified with double values.
Definition: qgsrectangle.h:41
Base class for all map layer types.
Definition: qgsmaplayer.h:79
Base class for all renderers that may to participate in 3D view.
QString mAttributionUrl
Definition: qgsmaplayer.h:1501
QString mKeywordList
Definition: qgsmaplayer.h:1493
QString mDataUrlFormat
Definition: qgsmaplayer.h:1497
QString dataUrl() const
Returns the DataUrl of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:331
QString mProviderKey
Data provider key (name of the data provider)
Definition: qgsmaplayer.h:1529
PropertyType
Maplayer has a style and a metadata property.
Definition: qgsmaplayer.h:124
QString mLegendUrlFormat
Definition: qgsmaplayer.h:1510
virtual void reload()
Synchronises with changes in the datasource.
Definition: qgsmaplayer.h:464
#define SIP_MONKEYPATCH_SCOPEENUM_UNNEST(OUTSIDE_CLASS, FORMERNAME)
Definition: qgis_sip.h:252
void setMetadataUrlType(const QString &metaUrlType)
Set the metadata type of the layer used by QGIS Server in GetCapabilities request MetadataUrlType ind...
Definition: qgsmaplayer.h:416
Abstract base class for spatial data provider implementations.
const QgsCoordinateReferenceSystem & crs
An interface for classes which can visit style entity (e.g.
QPointer< QgsMapLayer > QgsWeakMapLayerPointer
Weak pointer for QgsMapLayer.
Definition: qgsmaplayer.h:1632
QString mLayerName
Name of the layer - used for display.
Definition: qgsmaplayer.h:1486
bool isRefreshOnNotifyEnabled() const
Returns true if the refresh on provider nofification is enabled.
Definition: qgsmaplayer.h:1127
QgsError mError
Error.
Definition: qgsmaplayer.h:1513
QgsRectangle mExtent
Extent of the layer.
Definition: qgsmaplayer.h:1477
QString mMetadataUrl
MetadataUrl of the layer.
Definition: qgsmaplayer.h:1504
void setLegendUrlFormat(const QString &legendUrlFormat)
Sets the format for a URL based layer legend.
Definition: qgsmaplayer.h:960
QString metadataUrlFormat() const
Returns the metadata format of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:443
void setKeywordList(const QString &keywords)
Sets the keyword list of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:303
ReadFlag
Flags which control project read behavior.
Definition: qgsmaplayer.h:529
void setTitle(const QString &title)
Sets the title of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:271
#define SIP_SKIP
Definition: qgis_sip.h:126
QSet< QgsMapLayerDependency > mDependencies
List of layers that may modify this layer on modification.
Definition: qgsmaplayer.h:1516
QString keywordList() const
Returns the keyword list of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:311
QString mDataUrl
DataUrl of the layer.
Definition: qgsmaplayer.h:1496
#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:189
Q_DECLARE_METATYPE(QgsMeshTimeSettings)
QString legendUrl() const
Returns the URL for the layer&#39;s legend.
Definition: qgsmaplayer.h:955
Encapsulates a QGIS project, including sets of map layers and their styles, layouts, annotations, canvases, etc.
Definition: qgsproject.h:89
QgsErrorMessage represents single error message.
Definition: qgserror.h:32
#define SIP_FACTORY
Definition: qgis_sip.h:76
Contains information about the context in which a coordinate transform is executed.
void setDataUrlFormat(const QString &dataUrlFormat)
Sets the DataUrl format of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:340
QString mTitle
Definition: qgsmaplayer.h:1489
virtual bool readSld(const QDomNode &node, QString &errorMessage)
Definition: qgsmaplayer.h:858
QString legendUrlFormat() const
Returns the format for a URL based layer legend.
Definition: qgsmaplayer.h:965
QString mMetadataUrlFormat
Definition: qgsmaplayer.h:1506
void setLegendUrl(const QString &legendUrl)
Sets the URL for the layer&#39;s legend.
Definition: qgsmaplayer.h:950
void setMetadataUrlFormat(const QString &metaUrlFormat)
Sets the metadata format of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:434
QString title() const
Returns the title of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:279
LayerFlag
Flags for the map layer.
Definition: qgsmaplayer.h:135
StyleCategory
Categories of style to distinguish appropriate sections for import/export.
Definition: qgsmaplayer.h:149
QString mAttribution
Attribution of the layer.
Definition: qgsmaplayer.h:1500
QString mAbstract
Description of the layer.
Definition: qgsmaplayer.h:1492
A structured metadata store for a map layer.
QString mRefreshOnNofifyMessage
Definition: qgsmaplayer.h:1526
Contains information about the context of a rendering operation.
Setting options for creating vector data providers.
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:1523
QString mDataSource
Data source description string, varies by layer type.
Definition: qgsmaplayer.h:1483
QgsError is container for error messages (report).
Definition: qgserror.h:80
QList< QgsWeakMapLayerPointer > QgsWeakMapLayerPointerList
A list of weak pointers to QgsMapLayers.
Definition: qgsmaplayer.h:1639
#define SIP_OUT
Definition: qgis_sip.h:58
QString mLegendUrl
WMS legend.
Definition: qgsmaplayer.h:1509
This class represents a coordinate reference system (CRS).
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition: qgis_sip.h:172
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:378
void appendError(const QgsErrorMessage &error)
Add error message.
Definition: qgsmaplayer.h:1472
Base class for utility classes that encapsulate information necessary for rendering of map layers...
bool readOnly() const
Returns if this layer is read only.
Definition: qgsmaplayer.h:459
QString metadataUrl() const
Returns the metadata URL of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:407
QgsMapLayerType
Types of layers that can be added to a map.
Definition: qgsmaplayer.h:66
void setAttribution(const QString &attrib)
Sets the attribution of the layer used by QGIS Server in GetCapabilities request. ...
Definition: qgsmaplayer.h:360
void setRefreshOnNofifyMessage(const QString &message)
Set the notification message that triggers repaint If refresh on notification is enabled, the notification will triggerRepaint only if the notification message is equal to.
Definition: qgsmaplayer.h:1238
Management of styles for use with one map layer.
QString refreshOnNotifyMessage() const
Returns the message that should be notified by the provider to triggerRepaint.
Definition: qgsmaplayer.h:1120
void setDataUrl(const QString &dataUrl)
Sets the DataUrl of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:322
QString mMetadataUrlType
Definition: qgsmaplayer.h:1505
void setError(const QgsError &error)
Sets error message.
Definition: qgsmaplayer.h:1474
void setAbstract(const QString &abstract)
Sets the abstract of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:287
QString attribution() const
Returns the attribution of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:369
QString metadataUrlType() const
Returns the metadata type of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:425