QGIS API Documentation  3.6.0-Noosa (5873452)
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 
64 class CORE_EXPORT QgsMapLayer : public QObject
65 {
66  Q_OBJECT
67 
68  Q_PROPERTY( QString name READ name WRITE setName NOTIFY nameChanged )
69  Q_PROPERTY( int autoRefreshInterval READ autoRefreshInterval WRITE setAutoRefreshInterval NOTIFY autoRefreshIntervalChanged )
70  Q_PROPERTY( QgsLayerMetadata metadata READ metadata WRITE setMetadata NOTIFY metadataChanged )
71  Q_PROPERTY( QgsCoordinateReferenceSystem crs READ crs WRITE setCrs NOTIFY crsChanged )
72 
73 #ifdef SIP_RUN
75  QgsMapLayer *layer = qobject_cast<QgsMapLayer *>( sipCpp );
76 
77  sipType = 0;
78 
79  if ( layer )
80  {
81  switch ( layer->type() )
82  {
84  sipType = sipType_QgsVectorLayer;
85  break;
87  sipType = sipType_QgsRasterLayer;
88  break;
90  sipType = sipType_QgsPluginLayer;
91  break;
93  sipType = sipType_QgsMeshLayer;
94  break;
95  default:
96  sipType = nullptr;
97  break;
98  }
99  }
100  SIP_END
101 #endif
102 
103  public:
104 
107  {
111  MeshLayer
112  };
113 
119  {
120  Style = 0,
122  };
123 
130  {
131  Identifiable = 1 << 0,
132  Removable = 1 << 1,
133  Searchable = 1 << 2,
134  };
135  Q_ENUM( LayerFlag )
136  Q_DECLARE_FLAGS( LayerFlags, LayerFlag )
137  Q_FLAG( LayerFlags )
138 
139 
144  {
145  LayerConfiguration = 1 << 0,
146  Symbology = 1 << 1,
147  Symbology3D = 1 << 2,
148  Labeling = 1 << 3,
149  Fields = 1 << 4,
150  Forms = 1 << 5,
151  Actions = 1 << 6,
152  MapTips = 1 << 7,
153  Diagrams = 1 << 8,
154  AttributeTable = 1 << 9,
155  Rendering = 1 << 10,
156  CustomProperties = 1 << 11,
157  GeometryOptions = 1 << 12,
158  AllStyleCategories = LayerConfiguration | Symbology | Symbology3D | Labeling | Fields | Forms | Actions |
159  MapTips | Diagrams | AttributeTable | Rendering | CustomProperties | GeometryOptions,
160  };
161  Q_ENUM( StyleCategory )
162  Q_DECLARE_FLAGS( StyleCategories, StyleCategory )
163  Q_FLAG( StyleCategories )
164 
165 
171  QgsMapLayer( QgsMapLayer::LayerType type = VectorLayer, const QString &name = QString(), const QString &source = QString() );
172 
173  ~QgsMapLayer() override;
174 
176  QgsMapLayer( QgsMapLayer const & ) = delete;
178  QgsMapLayer &operator=( QgsMapLayer const & ) = delete;
179 
186  virtual QgsMapLayer *clone() const = 0;
187 
191  QgsMapLayer::LayerType type() const;
192 
200  QgsMapLayer::LayerFlags flags() const;
201 
209  void setFlags( QgsMapLayer::LayerFlags flags );
210 
216  static QString extensionPropertyType( PropertyType type );
217 
219  QString id() const;
220 
226  void setName( const QString &name );
227 
232  QString name() const;
233 
237  virtual QgsDataProvider *dataProvider();
238 
243  virtual const QgsDataProvider *dataProvider() const SIP_SKIP;
244 
251  void setShortName( const QString &shortName ) { mShortName = shortName; }
252 
258  QString shortName() const { return mShortName; }
259 
265  void setTitle( const QString &title ) { mTitle = title; }
266 
273  QString title() const { return mTitle; }
274 
281  void setAbstract( const QString &abstract ) { mAbstract = abstract; }
282 
289  QString abstract() const { return mAbstract; }
290 
297  void setKeywordList( const QString &keywords ) { mKeywordList = keywords; }
298 
305  QString keywordList() const { return mKeywordList; }
306 
307  /* Layer dataUrl information */
308 
316  void setDataUrl( const QString &dataUrl ) { mDataUrl = dataUrl; }
317 
325  QString dataUrl() const { return mDataUrl; }
326 
334  void setDataUrlFormat( const QString &dataUrlFormat ) { mDataUrlFormat = dataUrlFormat; }
335 
343  QString dataUrlFormat() const { return mDataUrlFormat; }
344 
345  /* Layer attribution information */
346 
354  void setAttribution( const QString &attrib ) { mAttribution = attrib; }
355 
363  QString attribution() const { return mAttribution; }
364 
372  void setAttributionUrl( const QString &attribUrl ) { mAttributionUrl = attribUrl; }
373 
381  QString attributionUrl() const { return mAttributionUrl; }
382 
383  /* Layer metadataUrl information */
384 
392  void setMetadataUrl( const QString &metaUrl ) { mMetadataUrl = metaUrl; }
393 
401  QString metadataUrl() const { return mMetadataUrl; }
402 
410  void setMetadataUrlType( const QString &metaUrlType ) { mMetadataUrlType = metaUrlType; }
411 
419  QString metadataUrlType() const { return mMetadataUrlType; }
420 
428  void setMetadataUrlFormat( const QString &metaUrlFormat ) { mMetadataUrlFormat = metaUrlFormat; }
429 
437  QString metadataUrlFormat() const { return mMetadataUrlFormat; }
438 
444  void setBlendMode( QPainter::CompositionMode blendMode );
445 
450  QPainter::CompositionMode blendMode() const;
451 
453  bool readOnly() const { return isReadOnly(); }
454 
458  virtual void reload() {}
459 
464  virtual QgsMapLayerRenderer *createMapRenderer( QgsRenderContext &rendererContext ) = 0 SIP_FACTORY;
465 
467  virtual QgsRectangle extent() const;
468 
474  bool isValid() const;
475 
482  QString publicSource() const;
483 
489  QString source() const;
490 
495  virtual QStringList subLayers() const;
496 
501  virtual void setLayerOrder( const QStringList &layers );
502 
508  virtual void setSubLayerVisibility( const QString &name, bool visible );
509 
511  virtual bool isEditable() const;
512 
517  virtual bool isSpatial() const;
518 
535  bool readLayerXml( const QDomElement &layerElement, QgsReadWriteContext &context );
536 
554  bool writeLayerXml( QDomElement &layerElement, QDomDocument &document, const QgsReadWriteContext &context ) const;
555 
560  virtual void resolveReferences( QgsProject *project );
561 
567  QStringList customPropertyKeys() const;
568 
574  void setCustomProperty( const QString &key, const QVariant &value );
575 
580  QVariant customProperty( const QString &value, const QVariant &defaultValue = QVariant() ) const;
581 
586  void setCustomProperties( const QgsObjectCustomProperties &properties );
587 
592  void removeCustomProperty( const QString &key );
593 
599  virtual QgsError error() const;
600 
606 
608  void setCrs( const QgsCoordinateReferenceSystem &srs, bool emitSignal = true );
609 
615  static QString formatLayerName( const QString &name );
616 
624  virtual QString metadataUri() const;
625 
632  void exportNamedMetadata( QDomDocument &doc, QString &errorMsg ) const;
633 
643  virtual QString saveDefaultMetadata( bool &resultFlag SIP_OUT );
644 
659  QString saveNamedMetadata( const QString &uri, bool &resultFlag );
660 
675  virtual QString loadNamedMetadata( const QString &uri, bool &resultFlag SIP_OUT );
676 
686  QString loadDefaultMetadata( bool &resultFlag );
687 
696  bool loadNamedMetadataFromDatabase( const QString &db, const QString &uri, QString &qmd );
697 
705  bool importNamedMetadata( QDomDocument &document, QString &errorMessage );
706 
714  virtual QString styleURI() const;
715 
725  virtual QString loadDefaultStyle( bool &resultFlag SIP_OUT );
726 
742  virtual QString loadNamedStyle( const QString &uri, bool &resultFlag SIP_OUT, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories );
743 
751  virtual bool loadNamedStyleFromDatabase( const QString &db, const QString &uri, QString &qml SIP_OUT );
752 
762  virtual bool importNamedStyle( QDomDocument &doc, QString &errorMsg SIP_OUT,
763  QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories );
764 
773  virtual void exportNamedStyle( QDomDocument &doc, QString &errorMsg SIP_OUT, const QgsReadWriteContext &context = QgsReadWriteContext(),
774  QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) const;
775 
776 
783  virtual void exportSldStyle( QDomDocument &doc, QString &errorMsg ) const;
784 
794  virtual QString saveDefaultStyle( bool &resultFlag SIP_OUT );
795 
811  virtual QString saveNamedStyle( const QString &uri, bool &resultFlag SIP_OUT, StyleCategories categories = AllStyleCategories );
812 
821  virtual QString saveSldStyle( const QString &uri, bool &resultFlag ) const;
822 
831  virtual QString loadSldStyle( const QString &uri, bool &resultFlag );
832 
833  virtual bool readSld( const QDomNode &node, QString &errorMessage )
834  { Q_UNUSED( node ); errorMessage = QStringLiteral( "Layer type %1 not supported" ).arg( type() ); return false; }
835 
836 
837 
846  virtual bool readSymbology( const QDomNode &node, QString &errorMessage,
847  QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) = 0;
848 
859  virtual bool readStyle( const QDomNode &node, QString &errorMessage,
860  QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories );
861 
872  virtual bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context,
873  StyleCategories categories = AllStyleCategories ) const = 0;
874 
887  virtual bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context,
888  StyleCategories categories = AllStyleCategories ) const;
889 
890 
906  virtual void setDataSource( const QString &dataSource, const QString &baseName, const QString &provider, const QgsDataProvider::ProviderOptions &options, bool loadDefaultStyleFlag = false );
907 
911  QString providerType() const;
912 
914  QUndoStack *undoStack();
915 
920  QUndoStack *undoStackStyles();
921 
925  void setLegendUrl( const QString &legendUrl ) { mLegendUrl = legendUrl; }
926 
930  QString legendUrl() const { return mLegendUrl; }
931 
935  void setLegendUrlFormat( const QString &legendUrlFormat ) { mLegendUrlFormat = legendUrlFormat; }
936 
940  QString legendUrlFormat() const { return mLegendUrlFormat; }
941 
947  void setLegend( QgsMapLayerLegend *legend SIP_TRANSFER );
948 
953  QgsMapLayerLegend *legend() const;
954 
959  QgsMapLayerStyleManager *styleManager() const;
960 
965  void setRenderer3D( QgsAbstract3DRenderer *renderer SIP_TRANSFER );
966 
971  QgsAbstract3DRenderer *renderer3D() const;
972 
982  bool isInScaleRange( double scale ) const;
983 
994  double minimumScale() const;
995 
1006  double maximumScale() const;
1007 
1016  bool hasScaleBasedVisibility() const;
1017 
1024  bool hasAutoRefreshEnabled() const;
1025 
1033  int autoRefreshInterval() const;
1034 
1046  void setAutoRefreshInterval( int interval );
1047 
1054  void setAutoRefreshEnabled( bool enabled );
1055 
1062  virtual const QgsLayerMetadata &metadata() const;
1063 
1070  virtual void setMetadata( const QgsLayerMetadata &metadata );
1071 
1076  virtual QString htmlMetadata() const;
1077 
1079  virtual QDateTime timestamp() const;
1080 
1088  virtual QSet<QgsMapLayerDependency> dependencies() const;
1089 
1095  QString refreshOnNotifyMessage() const { return mRefreshOnNofifyMessage; }
1096 
1102  bool isRefreshOnNotifyEnabled() const { return mIsRefreshOnNofifyEnabled; }
1103 
1112  QString originalXmlProperties() const;
1113 
1121  void setOriginalXmlProperties( const QString &originalXmlProperties );
1122 
1123  public slots:
1124 
1134  void setMinimumScale( double scale );
1135 
1145  void setMaximumScale( double scale );
1146 
1154  void setScaleBasedVisibility( bool enabled );
1155 
1164  void triggerRepaint( bool deferredUpdate = false );
1165 
1170  void emitStyleChanged();
1171 
1180  virtual bool setDependencies( const QSet<QgsMapLayerDependency> &layers );
1181 
1187  void setRefreshOnNotifyEnabled( bool enabled );
1188 
1196  void setRefreshOnNofifyMessage( const QString &message ) { mRefreshOnNofifyMessage = message; }
1197 
1198  signals:
1199 
1201  void statusChanged( const QString &status );
1202 
1208  void nameChanged();
1209 
1211  void crsChanged();
1212 
1219  void repaintRequested( bool deferredUpdate = false );
1220 
1222  void recalculateExtents() const;
1223 
1225  void dataChanged();
1226 
1228  void blendModeChanged( QPainter::CompositionMode blendMode );
1229 
1234  void rendererChanged();
1235 
1243  void styleChanged();
1244 
1249  void legendChanged();
1250 
1255  void renderer3DChanged();
1256 
1261  void configChanged();
1262 
1266  void dependenciesChanged();
1267 
1274  void willBeDeleted();
1275 
1281  void autoRefreshIntervalChanged( int interval );
1282 
1289  void metadataChanged();
1290 
1297  void flagsChanged();
1298 
1306  void dataSourceChanged();
1307 
1308  private slots:
1309 
1310  void onNotifiedTriggerRepaint( const QString &message );
1311 
1312  protected:
1313 
1319  void clone( QgsMapLayer *layer ) const;
1320 
1322  virtual void setExtent( const QgsRectangle &rect );
1323 
1325  void setValid( bool valid );
1326 
1331  virtual bool readXml( const QDomNode &layer_node, QgsReadWriteContext &context );
1332 
1337  virtual bool writeXml( QDomNode &layer_node, QDomDocument &document, const QgsReadWriteContext &context ) const;
1338 
1350  virtual QString encodedSource( const QString &source, const QgsReadWriteContext &context ) const;
1351 
1364  virtual QString decodedSource( const QString &source, const QString &dataProvider, const QgsReadWriteContext &context ) const;
1365 
1370  void readCustomProperties( const QDomNode &layerNode, const QString &keyStartsWith = QString() );
1371 
1373  void writeCustomProperties( QDomNode &layerNode, QDomDocument &doc ) const;
1374 
1376  void readStyleManager( const QDomNode &layerNode );
1378  void writeStyleManager( QDomNode &layerNode, QDomDocument &doc ) const;
1379 
1384  void writeCommonStyle( QDomElement &layerElement, QDomDocument &document,
1385  const QgsReadWriteContext &context,
1386  StyleCategories categories = AllStyleCategories ) const;
1387 
1392  void readCommonStyle( const QDomElement &layerElement, const QgsReadWriteContext &context,
1393  StyleCategories categories = AllStyleCategories );
1394 
1396  void setProviderType( const QString &providerType );
1397 
1398 #ifndef SIP_RUN
1399 #if 0
1400  void connectNotify( const char *signal ) override;
1402 #endif
1403 #endif
1404 
1406  void appendError( const QgsErrorMessage &error ) { mError.append( error );}
1408  void setError( const QgsError &error ) { mError = error;}
1409 
1412 
1414  bool mValid = false;
1415 
1417  QString mDataSource;
1418 
1420  QString mLayerName;
1421 
1422  QString mShortName;
1423  QString mTitle;
1424 
1426  QString mAbstract;
1427  QString mKeywordList;
1428 
1430  QString mDataUrl;
1432 
1434  QString mAttribution;
1436 
1438  QString mMetadataUrl;
1441 
1443  QString mLegendUrl;
1445 
1448 
1450  QSet<QgsMapLayerDependency> mDependencies;
1451 
1453  bool hasDependencyCycle( const QSet<QgsMapLayerDependency> &layers ) const;
1454 
1455  bool mIsRefreshOnNofifyEnabled = false;
1457 
1459  QString mProviderKey;
1460 
1461 
1462  private:
1463 
1464  virtual QString baseURI( PropertyType type ) const;
1465  QString saveNamedProperty( const QString &uri, QgsMapLayer::PropertyType type,
1466  bool &resultFlag, StyleCategories categories = AllStyleCategories );
1467  QString loadNamedProperty( const QString &uri, QgsMapLayer::PropertyType type,
1468  bool &resultFlag, StyleCategories categories = AllStyleCategories );
1469  bool loadNamedPropertyFromDatabase( const QString &db, const QString &uri, QString &xml, QgsMapLayer::PropertyType type );
1470 
1475  virtual bool isReadOnly() const;
1476 
1481 
1483  QString mID;
1484 
1486  QgsMapLayer::LayerType mLayerType;
1487 
1488  LayerFlags mFlags = LayerFlags( Identifiable | Removable | Searchable );
1489 
1491  QPainter::CompositionMode mBlendMode = QPainter::CompositionMode_SourceOver;
1492 
1494  QString mTag;
1495 
1496  //set some generous defaults for scale based visibility
1497 
1499  double mMinScale = 0;
1501  double mMaxScale = 100000000;
1503  bool mScaleBasedVisibility = false;
1504 
1506  QUndoStack *mUndoStack = nullptr;
1507 
1508  QUndoStack *mUndoStackStyles = nullptr;
1509 
1511  QgsObjectCustomProperties mCustomProperties;
1512 
1514  QgsMapLayerLegend *mLegend = nullptr;
1515 
1517  QgsMapLayerStyleManager *mStyleManager = nullptr;
1518 
1520  QTimer *mRefreshTimer = nullptr;
1521 
1522  QgsLayerMetadata mMetadata;
1523 
1525  QgsAbstract3DRenderer *m3DRenderer = nullptr;
1526 
1532  QString mOriginalXmlProperties;
1533 
1534 };
1535 
1537 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsMapLayer::LayerFlags )
1538 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsMapLayer::StyleCategories )
1539 
1540 
1541 #ifndef SIP_RUN
1542 
1548 typedef QPointer< QgsMapLayer > QgsWeakMapLayerPointer;
1549 
1555 typedef QList< QgsWeakMapLayerPointer > QgsWeakMapLayerPointerList;
1556 #endif
1557 
1558 #endif
QString attributionUrl() const
Returns the attribution URL of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:381
QString mShortName
Definition: qgsmaplayer.h:1422
void setMetadataUrl(const QString &metaUrl)
Sets the metadata URL of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:392
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:343
A rectangle specified with double values.
Definition: qgsrectangle.h:41
Base class for all map layer types.
Definition: qgsmaplayer.h:64
Base class for all renderers that may to participate in 3D view.
QString mAttributionUrl
Definition: qgsmaplayer.h:1435
QString mKeywordList
Definition: qgsmaplayer.h:1427
QString shortName() const
Returns the short name of the layer used by QGIS Server to identify the layer.
Definition: qgsmaplayer.h:258
QString mDataUrlFormat
Definition: qgsmaplayer.h:1431
QString dataUrl() const
Returns the DataUrl of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:325
QString mProviderKey
Data provider key (name of the data provider)
Definition: qgsmaplayer.h:1459
PropertyType
Maplayer has a style and a metadata property.
Definition: qgsmaplayer.h:118
QString mLegendUrlFormat
Definition: qgsmaplayer.h:1444
virtual void reload()
Synchronises with changes in the datasource.
Definition: qgsmaplayer.h:458
void setMetadataUrlType(const QString &metaUrlType)
Set the metadata type of the layer used by QGIS Server in GetCapabilities request MetadataUrlType ind...
Definition: qgsmaplayer.h:410
Abstract base class for spatial data provider implementations.
const QgsCoordinateReferenceSystem & crs
QPointer< QgsMapLayer > QgsWeakMapLayerPointer
Weak pointer for QgsMapLayer.
Definition: qgsmaplayer.h:1548
Q_DECLARE_METATYPE(QModelIndex)
QString mLayerName
Name of the layer - used for display.
Definition: qgsmaplayer.h:1420
bool isRefreshOnNotifyEnabled() const
Returns true if the refresh on provider nofification is enabled.
Definition: qgsmaplayer.h:1102
QgsError mError
Error.
Definition: qgsmaplayer.h:1447
Added in 3.2.
Definition: qgsmaplayer.h:111
QgsRectangle mExtent
Extent of the layer.
Definition: qgsmaplayer.h:1411
QString mMetadataUrl
MetadataUrl of the layer.
Definition: qgsmaplayer.h:1438
void setLegendUrlFormat(const QString &legendUrlFormat)
Sets the format for a URL based layer legend.
Definition: qgsmaplayer.h:935
QString metadataUrlFormat() const
Returns the metadata format of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:437
void setKeywordList(const QString &keywords)
Sets the keyword list of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:297
void setTitle(const QString &title)
Sets the title of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:265
#define SIP_SKIP
Definition: qgis_sip.h:119
LayerType
Types of layers that can be added to a map.
Definition: qgsmaplayer.h:106
QSet< QgsMapLayerDependency > mDependencies
List of layers that may modify this layer on modification.
Definition: qgsmaplayer.h:1450
QString keywordList() const
Returns the keyword list of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:305
QString mDataUrl
DataUrl of the layer.
Definition: qgsmaplayer.h:1430
#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
QString legendUrl() const
Returns the URL for the layer&#39;s legend.
Definition: qgsmaplayer.h:930
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
void setDataUrlFormat(const QString &dataUrlFormat)
Sets the DataUrl format of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:334
QString mTitle
Definition: qgsmaplayer.h:1423
virtual bool readSld(const QDomNode &node, QString &errorMessage)
Definition: qgsmaplayer.h:833
QString legendUrlFormat() const
Returns the format for a URL based layer legend.
Definition: qgsmaplayer.h:940
QString mMetadataUrlFormat
Definition: qgsmaplayer.h:1440
void setLegendUrl(const QString &legendUrl)
Sets the URL for the layer&#39;s legend.
Definition: qgsmaplayer.h:925
void setMetadataUrlFormat(const QString &metaUrlFormat)
Sets the metadata format of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:428
QString title() const
Returns the title of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:273
LayerFlag
Flags for the map layer.
Definition: qgsmaplayer.h:129
StyleCategory
Categories of style to distinguish appropriate sections for import/export.
Definition: qgsmaplayer.h:143
QString mAttribution
Attribution of the layer.
Definition: qgsmaplayer.h:1434
QString mAbstract
Description of the layer.
Definition: qgsmaplayer.h:1426
A structured metadata store for a map layer.
QString mRefreshOnNofifyMessage
Definition: qgsmaplayer.h:1456
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:1417
QgsError is container for error messages (report).
Definition: qgserror.h:80
QList< QgsWeakMapLayerPointer > QgsWeakMapLayerPointerList
A list of weak pointers to QgsMapLayers.
Definition: qgsmaplayer.h:1555
#define SIP_OUT
Definition: qgis_sip.h:51
QString mLegendUrl
WMS legend.
Definition: qgsmaplayer.h:1443
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:372
void appendError(const QgsErrorMessage &error)
Add error message.
Definition: qgsmaplayer.h:1406
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:453
QString metadataUrl() const
Returns the metadata URL of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:401
void setAttribution(const QString &attrib)
Sets the attribution of the layer used by QGIS Server in GetCapabilities request. ...
Definition: qgsmaplayer.h:354
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:1196
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:1095
void setDataUrl(const QString &dataUrl)
Sets the DataUrl of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:316
QString mMetadataUrlType
Definition: qgsmaplayer.h:1439
void setError(const QgsError &error)
Sets error message.
Definition: qgsmaplayer.h:1408
void setAbstract(const QString &abstract)
Sets the abstract of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:281
QString attribution() const
Returns the attribution of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:363
QString metadataUrlType() const
Returns the metadata type of the layer used by QGIS Server in GetCapabilities request.
Definition: qgsmaplayer.h:419