QGIS API Documentation  3.8.0-Zanzibar (11aff65)
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;
49 
50 class QDomDocument;
51 class QKeyEvent;
52 class QPainter;
53 
54 /*
55  * Constants used to describe copy-paste MIME types
56  */
57 #define QGSCLIPBOARD_MAPLAYER_MIME "application/qgis.maplayer"
58 
59 
66  {
70  MeshLayer
71 };
72 
78 class CORE_EXPORT QgsMapLayer : public QObject
79 {
80  Q_OBJECT
81 
82  Q_PROPERTY( QString name READ name WRITE setName NOTIFY nameChanged )
83  Q_PROPERTY( int autoRefreshInterval READ autoRefreshInterval WRITE setAutoRefreshInterval NOTIFY autoRefreshIntervalChanged )
84  Q_PROPERTY( QgsLayerMetadata metadata READ metadata WRITE setMetadata NOTIFY metadataChanged )
85  Q_PROPERTY( QgsCoordinateReferenceSystem crs READ crs WRITE setCrs NOTIFY crsChanged )
86 
87 #ifdef SIP_RUN
89  QgsMapLayer * layer = qobject_cast<QgsMapLayer *>( sipCpp );
90 
91  sipType = 0;
92 
93  if ( layer )
94  {
95  switch ( layer->type() )
96  {
98  sipType = sipType_QgsVectorLayer;
99  break;
101  sipType = sipType_QgsRasterLayer;
102  break;
104  sipType = sipType_QgsPluginLayer;
105  break;
107  sipType = sipType_QgsMeshLayer;
108  break;
109  default:
110  sipType = nullptr;
111  break;
112  }
113  }
114  SIP_END
115 #endif
116 
117  public:
118 
124  {
125  Style = 0,
127  };
128 
135  {
136  Identifiable = 1 << 0,
137  Removable = 1 << 1,
138  Searchable = 1 << 2,
139  };
140  Q_ENUM( LayerFlag )
141  Q_DECLARE_FLAGS( LayerFlags, LayerFlag )
142  Q_FLAG( LayerFlags )
143 
144 
149  {
150  LayerConfiguration = 1 << 0,
151  Symbology = 1 << 1,
152  Symbology3D = 1 << 2,
153  Labeling = 1 << 3,
154  Fields = 1 << 4,
155  Forms = 1 << 5,
156  Actions = 1 << 6,
157  MapTips = 1 << 7,
158  Diagrams = 1 << 8,
159  AttributeTable = 1 << 9,
160  Rendering = 1 << 10,
161  CustomProperties = 1 << 11,
162  GeometryOptions = 1 << 12,
163  AllStyleCategories = LayerConfiguration | Symbology | Symbology3D | Labeling | Fields | Forms | Actions |
164  MapTips | Diagrams | AttributeTable | Rendering | CustomProperties | GeometryOptions,
165  };
166  Q_ENUM( StyleCategory )
167  Q_DECLARE_FLAGS( StyleCategories, StyleCategory )
168  Q_FLAG( StyleCategories )
169 
170 
176  QgsMapLayer( QgsMapLayerType type = QgsMapLayerType::VectorLayer, const QString &name = QString(), const QString &source = QString() );
177 
178  ~QgsMapLayer() override;
179 
181  QgsMapLayer( QgsMapLayer const & ) = delete;
183  QgsMapLayer &operator=( QgsMapLayer const & ) = delete;
184 
191  virtual QgsMapLayer *clone() const = 0;
192 
196  QgsMapLayerType type() const;
197 
205  QgsMapLayer::LayerFlags flags() const;
206 
214  void setFlags( QgsMapLayer::LayerFlags flags );
215 
221  static QString extensionPropertyType( PropertyType type );
222 
224  QString id() const;
225 
231  void setName( const QString &name );
232 
237  QString name() const;
238 
242  virtual QgsDataProvider *dataProvider();
243 
248  virtual const QgsDataProvider *dataProvider() const SIP_SKIP;
249 
256  void setShortName( const QString &shortName ) { mShortName = shortName; }
257 
263  QString shortName() const { return mShortName; }
264 
270  void setTitle( const QString &title ) { mTitle = title; }
271 
278  QString title() const { return mTitle; }
279 
286  void setAbstract( const QString &abstract ) { mAbstract = abstract; }
287 
294  QString abstract() const { return mAbstract; }
295 
302  void setKeywordList( const QString &keywords ) { mKeywordList = keywords; }
303 
310  QString keywordList() const { return mKeywordList; }
311 
312  /* Layer dataUrl information */
313 
321  void setDataUrl( const QString &dataUrl ) { mDataUrl = dataUrl; }
322 
330  QString dataUrl() const { return mDataUrl; }
331 
339  void setDataUrlFormat( const QString &dataUrlFormat ) { mDataUrlFormat = dataUrlFormat; }
340 
348  QString dataUrlFormat() const { return mDataUrlFormat; }
349 
350  /* Layer attribution information */
351 
359  void setAttribution( const QString &attrib ) { mAttribution = attrib; }
360 
368  QString attribution() const { return mAttribution; }
369 
377  void setAttributionUrl( const QString &attribUrl ) { mAttributionUrl = attribUrl; }
378 
386  QString attributionUrl() const { return mAttributionUrl; }
387 
388  /* Layer metadataUrl information */
389 
397  void setMetadataUrl( const QString &metaUrl ) { mMetadataUrl = metaUrl; }
398 
406  QString metadataUrl() const { return mMetadataUrl; }
407 
415  void setMetadataUrlType( const QString &metaUrlType ) { mMetadataUrlType = metaUrlType; }
416 
424  QString metadataUrlType() const { return mMetadataUrlType; }
425 
433  void setMetadataUrlFormat( const QString &metaUrlFormat ) { mMetadataUrlFormat = metaUrlFormat; }
434 
442  QString metadataUrlFormat() const { return mMetadataUrlFormat; }
443 
449  void setBlendMode( QPainter::CompositionMode blendMode );
450 
455  QPainter::CompositionMode blendMode() const;
456 
458  bool readOnly() const { return isReadOnly(); }
459 
463  virtual void reload() {}
464 
469  virtual QgsMapLayerRenderer *createMapRenderer( QgsRenderContext &rendererContext ) = 0 SIP_FACTORY;
470 
472  virtual QgsRectangle extent() const;
473 
479  bool isValid() const;
480 
487  QString publicSource() const;
488 
494  QString source() const;
495 
500  virtual QStringList subLayers() const;
501 
506  virtual void setLayerOrder( const QStringList &layers );
507 
513  virtual void setSubLayerVisibility( const QString &name, bool visible );
514 
516  virtual bool isEditable() const;
517 
522  virtual bool isSpatial() const;
523 
540  bool readLayerXml( const QDomElement &layerElement, QgsReadWriteContext &context );
541 
559  bool writeLayerXml( QDomElement &layerElement, QDomDocument &document, const QgsReadWriteContext &context ) const;
560 
565  virtual void resolveReferences( QgsProject *project );
566 
572  QStringList customPropertyKeys() const;
573 
579  void setCustomProperty( const QString &key, const QVariant &value );
580 
585  QVariant customProperty( const QString &value, const QVariant &defaultValue = QVariant() ) const;
586 
591  void setCustomProperties( const QgsObjectCustomProperties &properties );
592 
597  void removeCustomProperty( const QString &key );
598 
604  virtual QgsError error() const;
605 
611 
613  void setCrs( const QgsCoordinateReferenceSystem &srs, bool emitSignal = true );
614 
620  QgsCoordinateTransformContext transformContext( ) const;
621 
622 
628  static QString formatLayerName( const QString &name );
629 
637  virtual QString metadataUri() const;
638 
645  void exportNamedMetadata( QDomDocument &doc, QString &errorMsg ) const;
646 
656  virtual QString saveDefaultMetadata( bool &resultFlag SIP_OUT );
657 
672  QString saveNamedMetadata( const QString &uri, bool &resultFlag );
673 
688  virtual QString loadNamedMetadata( const QString &uri, bool &resultFlag SIP_OUT );
689 
699  QString loadDefaultMetadata( bool &resultFlag );
700 
709  bool loadNamedMetadataFromDatabase( const QString &db, const QString &uri, QString &qmd );
710 
718  bool importNamedMetadata( QDomDocument &document, QString &errorMessage );
719 
727  virtual QString styleURI() const;
728 
738  virtual QString loadDefaultStyle( bool &resultFlag SIP_OUT );
739 
755  virtual QString loadNamedStyle( const QString &uri, bool &resultFlag SIP_OUT, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories );
756 
764  virtual bool loadNamedStyleFromDatabase( const QString &db, const QString &uri, QString &qml SIP_OUT );
765 
775  virtual bool importNamedStyle( QDomDocument &doc, QString &errorMsg SIP_OUT,
776  QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories );
777 
786  virtual void exportNamedStyle( QDomDocument &doc, QString &errorMsg SIP_OUT, const QgsReadWriteContext &context = QgsReadWriteContext(),
787  QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) const;
788 
789 
796  virtual void exportSldStyle( QDomDocument &doc, QString &errorMsg ) const;
797 
807  virtual QString saveDefaultStyle( bool &resultFlag SIP_OUT );
808 
824  virtual QString saveNamedStyle( const QString &uri, bool &resultFlag SIP_OUT, StyleCategories categories = AllStyleCategories );
825 
834  virtual QString saveSldStyle( const QString &uri, bool &resultFlag ) const;
835 
844  virtual QString loadSldStyle( const QString &uri, bool &resultFlag );
845 
846  virtual bool readSld( const QDomNode &node, QString &errorMessage )
847  { Q_UNUSED( node ) errorMessage = QStringLiteral( "Layer type %1 not supported" ).arg( static_cast<int>( type() ) ); return false; }
848 
849 
850 
859  virtual bool readSymbology( const QDomNode &node, QString &errorMessage,
860  QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) = 0;
861 
872  virtual bool readStyle( const QDomNode &node, QString &errorMessage,
873  QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories );
874 
885  virtual bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context,
886  StyleCategories categories = AllStyleCategories ) const = 0;
887 
900  virtual bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context,
901  StyleCategories categories = AllStyleCategories ) const;
902 
903 
919  virtual void setDataSource( const QString &dataSource, const QString &baseName, const QString &provider, const QgsDataProvider::ProviderOptions &options, bool loadDefaultStyleFlag = false );
920 
924  QString providerType() const;
925 
927  QUndoStack *undoStack();
928 
933  QUndoStack *undoStackStyles();
934 
938  void setLegendUrl( const QString &legendUrl ) { mLegendUrl = legendUrl; }
939 
943  QString legendUrl() const { return mLegendUrl; }
944 
948  void setLegendUrlFormat( const QString &legendUrlFormat ) { mLegendUrlFormat = legendUrlFormat; }
949 
953  QString legendUrlFormat() const { return mLegendUrlFormat; }
954 
960  void setLegend( QgsMapLayerLegend *legend SIP_TRANSFER );
961 
966  QgsMapLayerLegend *legend() const;
967 
972  QgsMapLayerStyleManager *styleManager() const;
973 
978  void setRenderer3D( QgsAbstract3DRenderer *renderer SIP_TRANSFER );
979 
984  QgsAbstract3DRenderer *renderer3D() const;
985 
995  bool isInScaleRange( double scale ) const;
996 
1007  double minimumScale() const;
1008 
1019  double maximumScale() const;
1020 
1029  bool hasScaleBasedVisibility() const;
1030 
1037  bool hasAutoRefreshEnabled() const;
1038 
1046  int autoRefreshInterval() const;
1047 
1059  void setAutoRefreshInterval( int interval );
1060 
1067  void setAutoRefreshEnabled( bool enabled );
1068 
1075  virtual const QgsLayerMetadata &metadata() const;
1076 
1083  virtual void setMetadata( const QgsLayerMetadata &metadata );
1084 
1089  virtual QString htmlMetadata() const;
1090 
1092  virtual QDateTime timestamp() const;
1093 
1101  virtual QSet<QgsMapLayerDependency> dependencies() const;
1102 
1108  QString refreshOnNotifyMessage() const { return mRefreshOnNofifyMessage; }
1109 
1115  bool isRefreshOnNotifyEnabled() const { return mIsRefreshOnNofifyEnabled; }
1116 
1125  QString originalXmlProperties() const;
1126 
1134  void setOriginalXmlProperties( const QString &originalXmlProperties );
1135 
1140  static QString generateId( const QString &layerName );
1141 
1142 
1143  public slots:
1144 
1154  void setMinimumScale( double scale );
1155 
1165  void setMaximumScale( double scale );
1166 
1174  void setScaleBasedVisibility( bool enabled );
1175 
1184  void triggerRepaint( bool deferredUpdate = false );
1185 
1190  void emitStyleChanged();
1191 
1200  virtual bool setDependencies( const QSet<QgsMapLayerDependency> &layers );
1201 
1207  void setRefreshOnNotifyEnabled( bool enabled );
1208 
1216  void setRefreshOnNofifyMessage( const QString &message ) { mRefreshOnNofifyMessage = message; }
1217 
1223  virtual void setTransformContext( const QgsCoordinateTransformContext &transformContext ) = 0;
1224 
1225  signals:
1226 
1228  void statusChanged( const QString &status );
1229 
1235  void nameChanged();
1236 
1238  void crsChanged();
1239 
1246  void repaintRequested( bool deferredUpdate = false );
1247 
1249  void recalculateExtents() const;
1250 
1252  void dataChanged();
1253 
1255  void blendModeChanged( QPainter::CompositionMode blendMode );
1256 
1261  void rendererChanged();
1262 
1270  void styleChanged();
1271 
1276  void legendChanged();
1277 
1282  void renderer3DChanged();
1283 
1288  void configChanged();
1289 
1293  void dependenciesChanged();
1294 
1301  void willBeDeleted();
1302 
1308  void autoRefreshIntervalChanged( int interval );
1309 
1316  void metadataChanged();
1317 
1324  void flagsChanged();
1325 
1333  void dataSourceChanged();
1334 
1335 
1336  private slots:
1337 
1338  void onNotifiedTriggerRepaint( const QString &message );
1339 
1340  protected:
1341 
1347  void clone( QgsMapLayer *layer ) const;
1348 
1350  virtual void setExtent( const QgsRectangle &rect );
1351 
1353  void setValid( bool valid );
1354 
1359  virtual bool readXml( const QDomNode &layer_node, QgsReadWriteContext &context );
1360 
1365  virtual bool writeXml( QDomNode &layer_node, QDomDocument &document, const QgsReadWriteContext &context ) const;
1366 
1378  virtual QString encodedSource( const QString &source, const QgsReadWriteContext &context ) const;
1379 
1392  virtual QString decodedSource( const QString &source, const QString &dataProvider, const QgsReadWriteContext &context ) const;
1393 
1398  void readCustomProperties( const QDomNode &layerNode, const QString &keyStartsWith = QString() );
1399 
1401  void writeCustomProperties( QDomNode &layerNode, QDomDocument &doc ) const;
1402 
1404  void readStyleManager( const QDomNode &layerNode );
1406  void writeStyleManager( QDomNode &layerNode, QDomDocument &doc ) const;
1407 
1412  void writeCommonStyle( QDomElement &layerElement, QDomDocument &document,
1413  const QgsReadWriteContext &context,
1414  StyleCategories categories = AllStyleCategories ) const;
1415 
1420  void readCommonStyle( const QDomElement &layerElement, const QgsReadWriteContext &context,
1421  StyleCategories categories = AllStyleCategories );
1422 
1424  void setProviderType( const QString &providerType );
1425 
1426 #ifndef SIP_RUN
1427 #if 0
1428  void connectNotify( const char *signal ) override;
1430 #endif
1431 #endif
1432 
1434  void appendError( const QgsErrorMessage &error ) { mError.append( error );}
1436  void setError( const QgsError &error ) { mError = error;}
1437 
1440 
1442  bool mValid = false;
1443 
1445  QString mDataSource;
1446 
1448  QString mLayerName;
1449 
1450  QString mShortName;
1451  QString mTitle;
1452 
1454  QString mAbstract;
1455  QString mKeywordList;
1456 
1458  QString mDataUrl;
1460 
1462  QString mAttribution;
1464 
1466  QString mMetadataUrl;
1469 
1471  QString mLegendUrl;
1473 
1476 
1478  QSet<QgsMapLayerDependency> mDependencies;
1479 
1481  bool hasDependencyCycle( const QSet<QgsMapLayerDependency> &layers ) const;
1482 
1483  bool mIsRefreshOnNofifyEnabled = false;
1485 
1487  QString mProviderKey;
1488 
1489 
1490  private:
1491 
1492  virtual QString baseURI( PropertyType type ) const;
1493  QString saveNamedProperty( const QString &uri, QgsMapLayer::PropertyType type,
1494  bool &resultFlag, StyleCategories categories = AllStyleCategories );
1495  QString loadNamedProperty( const QString &uri, QgsMapLayer::PropertyType type,
1496  bool &resultFlag, StyleCategories categories = AllStyleCategories );
1497  bool loadNamedPropertyFromDatabase( const QString &db, const QString &uri, QString &xml, QgsMapLayer::PropertyType type );
1498 
1503  virtual bool isReadOnly() const;
1504 
1509 
1511  QString mID;
1512 
1514  QgsMapLayerType mLayerType;
1515 
1516  LayerFlags mFlags = LayerFlags( Identifiable | Removable | Searchable );
1517 
1519  QPainter::CompositionMode mBlendMode = QPainter::CompositionMode_SourceOver;
1520 
1522  QString mTag;
1523 
1524  //set some generous defaults for scale based visibility
1525 
1527  double mMinScale = 0;
1529  double mMaxScale = 100000000;
1531  bool mScaleBasedVisibility = false;
1532 
1534  QUndoStack *mUndoStack = nullptr;
1535 
1536  QUndoStack *mUndoStackStyles = nullptr;
1537 
1539  QgsObjectCustomProperties mCustomProperties;
1540 
1542  QgsMapLayerLegend *mLegend = nullptr;
1543 
1545  QgsMapLayerStyleManager *mStyleManager = nullptr;
1546 
1548  QTimer *mRefreshTimer = nullptr;
1549 
1550  QgsLayerMetadata mMetadata;
1551 
1553  QgsAbstract3DRenderer *m3DRenderer = nullptr;
1554 
1560  QString mOriginalXmlProperties;
1561 
1562 };
1563 
1565 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsMapLayer::LayerFlags )
1566 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsMapLayer::StyleCategories )
1567 
1568 
1569 #ifndef SIP_RUN
1570 
1576 typedef QPointer< QgsMapLayer > QgsWeakMapLayerPointer;
1577 
1583 typedef QList< QgsWeakMapLayerPointer > QgsWeakMapLayerPointerList;
1584 #endif
1585 
1586 #endif
QString attributionUrl() const
Returns the attribution URL of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:386
QString mShortName
Definition: qgsmaplayer.h:1450
void setMetadataUrl(const QString &metaUrl)
Sets the metadata URL of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:397
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:348
A rectangle specified with double values.
Definition: qgsrectangle.h:41
Base class for all map layer types.
Definition: qgsmaplayer.h:78
Base class for all renderers that may to participate in 3D view.
QString mAttributionUrl
Definition: qgsmaplayer.h:1463
QString mKeywordList
Definition: qgsmaplayer.h:1455
QString shortName() const
Returns the short name of the layer used by QGIS Server to identify the layer.
Definition: qgsmaplayer.h:263
QString mDataUrlFormat
Definition: qgsmaplayer.h:1459
QString dataUrl() const
Returns the DataUrl of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:330
QString mProviderKey
Data provider key (name of the data provider)
Definition: qgsmaplayer.h:1487
PropertyType
Maplayer has a style and a metadata property.
Definition: qgsmaplayer.h:123
QString mLegendUrlFormat
Definition: qgsmaplayer.h:1472
virtual void reload()
Synchronises with changes in the datasource.
Definition: qgsmaplayer.h:463
#define SIP_MONKEYPATCH_SCOPEENUM_UNNEST(OUTSIDE_CLASS, FORMERNAME)
Definition: qgis_sip.h:245
void setMetadataUrlType(const QString &metaUrlType)
Set the metadata type of the layer used by QGIS Server in GetCapabilities request MetadataUrlType ind...
Definition: qgsmaplayer.h:415
Abstract base class for spatial data provider implementations.
const QgsCoordinateReferenceSystem & crs
QPointer< QgsMapLayer > QgsWeakMapLayerPointer
Weak pointer for QgsMapLayer.
Definition: qgsmaplayer.h:1576
QString mLayerName
Name of the layer - used for display.
Definition: qgsmaplayer.h:1448
bool isRefreshOnNotifyEnabled() const
Returns true if the refresh on provider nofification is enabled.
Definition: qgsmaplayer.h:1115
QgsError mError
Error.
Definition: qgsmaplayer.h:1475
QgsRectangle mExtent
Extent of the layer.
Definition: qgsmaplayer.h:1439
QString mMetadataUrl
MetadataUrl of the layer.
Definition: qgsmaplayer.h:1466
void setLegendUrlFormat(const QString &legendUrlFormat)
Sets the format for a URL based layer legend.
Definition: qgsmaplayer.h:948
QString metadataUrlFormat() const
Returns the metadata format of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:442
void setKeywordList(const QString &keywords)
Sets the keyword list of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:302
void setTitle(const QString &title)
Sets the title of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:270
#define SIP_SKIP
Definition: qgis_sip.h:119
QSet< QgsMapLayerDependency > mDependencies
List of layers that may modify this layer on modification.
Definition: qgsmaplayer.h:1478
QString keywordList() const
Returns the keyword list of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:310
QString mDataUrl
DataUrl of the layer.
Definition: qgsmaplayer.h:1458
#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
Q_DECLARE_METATYPE(QgsMeshTimeSettings)
QString legendUrl() const
Returns the URL for the layer&#39;s legend.
Definition: qgsmaplayer.h:943
Reads and writes project states.
Definition: qgsproject.h:89
QgsErrorMessage represents single error message.
Definition: qgserror.h:32
#define SIP_FACTORY
Definition: qgis_sip.h:69
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:339
QString mTitle
Definition: qgsmaplayer.h:1451
virtual bool readSld(const QDomNode &node, QString &errorMessage)
Definition: qgsmaplayer.h:846
QString legendUrlFormat() const
Returns the format for a URL based layer legend.
Definition: qgsmaplayer.h:953
QString mMetadataUrlFormat
Definition: qgsmaplayer.h:1468
void setLegendUrl(const QString &legendUrl)
Sets the URL for the layer&#39;s legend.
Definition: qgsmaplayer.h:938
void setMetadataUrlFormat(const QString &metaUrlFormat)
Sets the metadata format of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:433
QString title() const
Returns the title of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:278
LayerFlag
Flags for the map layer.
Definition: qgsmaplayer.h:134
StyleCategory
Categories of style to distinguish appropriate sections for import/export.
Definition: qgsmaplayer.h:148
QString mAttribution
Attribution of the layer.
Definition: qgsmaplayer.h:1462
QString mAbstract
Description of the layer.
Definition: qgsmaplayer.h:1454
A structured metadata store for a map layer.
QString mRefreshOnNofifyMessage
Definition: qgsmaplayer.h:1484
Contains information about the context of a rendering operation.
Setting options for creating vector data providers.
QString mDataSource
Data source description string, varies by layer type.
Definition: qgsmaplayer.h:1445
QgsError is container for error messages (report).
Definition: qgserror.h:80
QList< QgsWeakMapLayerPointer > QgsWeakMapLayerPointerList
A list of weak pointers to QgsMapLayers.
Definition: qgsmaplayer.h:1583
#define SIP_OUT
Definition: qgis_sip.h:51
QString mLegendUrl
WMS legend.
Definition: qgsmaplayer.h:1471
This class represents a coordinate reference system (CRS).
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition: qgis_sip.h:165
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:377
void appendError(const QgsErrorMessage &error)
Add error message.
Definition: qgsmaplayer.h:1434
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:458
QString metadataUrl() const
Returns the metadata URL of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:406
QgsMapLayerType
Types of layers that can be added to a map.
Definition: qgsmaplayer.h:65
void setAttribution(const QString &attrib)
Sets the attribution of the layer used by QGIS Server in GetCapabilities request. ...
Definition: qgsmaplayer.h:359
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:1216
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:1108
void setDataUrl(const QString &dataUrl)
Sets the DataUrl of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:321
QString mMetadataUrlType
Definition: qgsmaplayer.h:1467
void setError(const QgsError &error)
Sets error message.
Definition: qgsmaplayer.h:1436
void setAbstract(const QString &abstract)
Sets the abstract of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:286
QString attribution() const
Returns the attribution of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:368
QString metadataUrlType() const
Returns the metadata type of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:424