65#define QGSCLIPBOARD_MAPLAYER_MIME "application/qgis.maplayer"
77 Q_PROPERTY( QString name READ name WRITE setName NOTIFY nameChanged )
78 Q_PROPERTY(
int autoRefreshInterval READ autoRefreshInterval WRITE setAutoRefreshInterval NOTIFY autoRefreshIntervalChanged )
79 Q_PROPERTY(
QgsLayerMetadata metadata READ metadata WRITE setMetadata NOTIFY metadataChanged )
81 Q_PROPERTY(
Qgis::LayerType type READ type CONSTANT )
82 Q_PROPERTY(
bool isValid READ isValid NOTIFY isValidChanged )
83 Q_PROPERTY(
double opacity READ opacity WRITE setOpacity NOTIFY opacityChanged )
84 Q_PROPERTY( QString mapTipTemplate READ mapTipTemplate WRITE setMapTipTemplate NOTIFY mapTipTemplateChanged )
85 Q_PROPERTY(
bool mapTipsEnabled READ mapTipsEnabled WRITE setMapTipsEnabled NOTIFY mapTipsEnabledChanged )
89 QgsMapLayer *layer = qobject_cast<QgsMapLayer *>( sipCpp );
95 switch ( layer->type() )
98 sipType = sipType_QgsVectorLayer;
101 sipType = sipType_QgsRasterLayer;
104 sipType = sipType_QgsPluginLayer;
107 sipType = sipType_QgsMeshLayer;
110 sipType = sipType_QgsVectorTileLayer;
113 sipType = sipType_QgsAnnotationLayer;
116 sipType = sipType_QgsPointCloudLayer;
119 sipType = sipType_QgsGroupLayer;
122 sipType = sipType_QgsTiledSceneLayer;
151 Identifiable = 1 << 0,
157 Q_DECLARE_FLAGS( LayerFlags, LayerFlag )
166 LayerConfiguration = 1 << 0,
168 Symbology3D = 1 << 2,
175 AttributeTable = 1 << 9,
177 CustomProperties = 1 << 11,
178 GeometryOptions = 1 << 12,
184 AllStyleCategories = LayerConfiguration | Symbology | Symbology3D | Labeling | Fields | Forms | Actions |
185 MapTips | Diagrams | AttributeTable | Rendering | CustomProperties | GeometryOptions | Relations | Temporal | Legend | Elevation | Notes,
187 Q_ENUM( StyleCategory )
188 Q_DECLARE_FLAGS( StyleCategories, StyleCategory )
189 Q_FLAG( StyleCategories )
229 QgsMapLayer::LayerFlags flags()
const;
241 void setFlags( QgsMapLayer::LayerFlags flags );
252 virtual Qgis::MapLayerProperties properties()
const;
259 static QString extensionPropertyType(
PropertyType type );
269 void setName(
const QString &name );
275 QString name()
const;
293 void setShortName( const QString &shortName ) { mShortName = shortName; }
300 QString shortName()
const;
307 void setTitle(
const QString &title ) { mTitle = title; }
315 QString
title()
const {
return mTitle; }
322 void setAbstract(
const QString &abstract ) { mAbstract = abstract; }
355 void setDataUrl(
const QString &dataUrl ) { mDataUrl = dataUrl; }
441 Q_DECL_DEPRECATED
void setMetadataUrl(
const QString &metaUrl )
SIP_DEPRECATED;
462 Q_DECL_DEPRECATED
void setMetadataUrlType( const QString &metaUrlType )
SIP_DEPRECATED;
483 Q_DECL_DEPRECATED
void setMetadataUrlFormat( const QString &metaUrlFormat )
SIP_DEPRECATED;
494 Q_DECL_DEPRECATED QString metadataUrlFormat() const
SIP_DEPRECATED;
501 void setBlendMode( QPainter::CompositionMode blendMode );
507 QPainter::CompositionMode blendMode() const;
517 virtual
void setOpacity(
double opacity );
527 virtual
double opacity() const;
530 bool readOnly()
const {
return isReadOnly(); }
554 QgsRectangle wgs84Extent(
bool forceRecalculate =
false )
const;
561 bool isValid()
const;
570 QString publicSource(
bool hidePassword =
false )
const;
577 QString source()
const;
583 virtual QStringList subLayers()
const;
589 virtual void setLayerOrder(
const QStringList &layers );
596 virtual void setSubLayerVisibility(
const QString &name,
bool visible );
604 virtual bool supportsEditing()
const;
607 virtual bool isEditable()
const;
614 virtual bool isModified()
const;
620 virtual bool isSpatial()
const;
631 virtual bool isTemporary()
const;
639 FlagDontResolveLayers = 1 << 0,
640 FlagTrustLayerMetadata = 1 << 1,
641 FlagReadExtentFromXml = 1 << 2,
642 FlagForceReadOnly = 1 << 3,
644 Q_DECLARE_FLAGS( ReadFlags, ReadFlag )
684 bool writeLayerXml( QDomElement &layerElement, QDomDocument &document,
const QgsReadWriteContext &context )
const;
690 virtual void resolveReferences(
QgsProject *project );
697 Q_INVOKABLE QStringList customPropertyKeys()
const;
704 Q_INVOKABLE
void setCustomProperty(
const QString &key,
const QVariant &value );
710 Q_INVOKABLE QVariant customProperty(
const QString &value,
const QVariant &defaultValue = QVariant() )
const;
734 virtual int listStylesInDatabase( QStringList &ids
SIP_OUT, QStringList &names
SIP_OUT,
740 virtual QString getStyleFromDatabase(
const QString &styleId, QString &msgError
SIP_OUT );
749 virtual bool deleteStyleFromDatabase(
const QString &styleId, QString &msgError
SIP_OUT );
767 virtual void saveStyleToDatabase(
const QString &name,
const QString &description,
768 bool useAsDefault,
const QString &uiFileContent,
779 virtual QString loadNamedStyle(
const QString &theURI,
bool &resultFlag
SIP_OUT,
bool loadFromLocalDb,
797 const QMetaEnum metaEnum = QMetaEnum::fromType<T>();
798 Q_ASSERT( metaEnum.isValid() );
799 if ( !metaEnum.isValid() )
801 QgsDebugError( QStringLiteral(
"Invalid metaenum. Enum probably misses Q_ENUM or Q_FLAG declaration." ) );
807 if ( metaEnum.isValid() )
810 QByteArray ba = customProperty( key, metaEnum.valueToKey(
static_cast<int>( defaultValue ) ) ).toString().toUtf8();
811 const char *vs = ba.data();
812 v =
static_cast<T
>( metaEnum.keyToValue( vs, &ok ) );
820 v =
static_cast<T
>( customProperty( key,
static_cast<int>( defaultValue ) ).toInt( &ok ) );
821 if ( metaEnum.isValid() )
823 if ( !ok || !metaEnum.valueToKey(
static_cast<int>( v ) ) )
831 setCustomEnumProperty( key, v );
849 const QMetaEnum metaEnum = QMetaEnum::fromType<T>();
850 Q_ASSERT( metaEnum.isValid() );
851 if ( metaEnum.isValid() )
853 setCustomProperty( key, metaEnum.valueToKey(
static_cast<int>( value ) ) );
857 QgsDebugError( QStringLiteral(
"Invalid metaenum. Enum probably misses Q_ENUM or Q_FLAG declaration." ) );
875 const QMetaEnum metaEnum = QMetaEnum::fromType<T>();
876 Q_ASSERT( metaEnum.isValid() );
877 if ( !metaEnum.isValid() )
879 QgsDebugError( QStringLiteral(
"Invalid metaenum. Enum probably misses Q_ENUM or Q_FLAG declaration." ) );
885 if ( metaEnum.isValid() )
888 QByteArray ba = customProperty( key, metaEnum.valueToKeys( defaultValue ) ).toString().toUtf8();
889 const char *vs = ba.data();
890 v =
static_cast<T
>( metaEnum.keysToValue( vs, &ok ) );
895 const int intValue = customProperty( key,
static_cast<int>( defaultValue ) ).toInt( &ok );
896 if ( metaEnum.isValid() )
902 const QByteArray keys = metaEnum.valueToKeys( intValue );
903 const int intValueCheck = metaEnum.keysToValue( keys );
904 if ( intValue != intValueCheck )
915 setCustomFlagProperty( key, v );
939 const QMetaEnum metaEnum = QMetaEnum::fromType<T>();
940 Q_ASSERT( metaEnum.isValid() );
941 if ( metaEnum.isValid() )
943 setCustomProperty( key, metaEnum.valueToKeys( value ) );
947 QgsDebugError( QStringLiteral(
"Invalid metaenum. Enum probably misses Q_ENUM or Q_FLAG declaration." ) );
957 void removeCustomProperty(
const QString &key );
988 static QString formatLayerName(
const QString &name );
997 virtual QString metadataUri()
const;
1005 void exportNamedMetadata( QDomDocument &doc, QString &errorMsg )
const;
1016 virtual QString saveDefaultMetadata(
bool &resultFlag
SIP_OUT );
1032 QString saveNamedMetadata(
const QString &uri,
bool &resultFlag );
1048 virtual QString loadNamedMetadata(
const QString &uri,
bool &resultFlag
SIP_OUT );
1059 virtual QString loadDefaultMetadata(
bool &resultFlag );
1069 bool loadNamedMetadataFromDatabase(
const QString &db,
const QString &uri, QString &qmd );
1078 bool importNamedMetadata( QDomDocument &document, QString &errorMessage );
1088 virtual QString styleURI()
const;
1099 virtual QString loadDefaultStyle(
bool &resultFlag
SIP_OUT );
1125 virtual bool loadNamedStyleFromDatabase(
const QString &db,
const QString &uri, QString &qml
SIP_OUT );
1136 virtual bool importNamedStyle( QDomDocument &doc, QString &errorMsg
SIP_OUT,
1158 virtual void exportSldStyle( QDomDocument &doc, QString &errorMsg )
const;
1168 virtual void exportSldStyleV2( QDomDocument &doc, QString &errorMsg,
const QgsSldExportContext &exportContext )
const;
1181 virtual QString saveDefaultStyle(
bool &resultFlag
SIP_OUT, StyleCategories categories );
1211 virtual QString saveNamedStyle(
const QString &uri,
bool &resultFlag
SIP_OUT, StyleCategories categories = AllStyleCategories );
1222 virtual QString saveSldStyle(
const QString &uri,
bool &resultFlag )
const;
1244 virtual QString loadSldStyle(
const QString &uri,
bool &resultFlag );
1246 virtual bool readSld(
const QDomNode &node, QString &errorMessage )
1247 { Q_UNUSED( node ) errorMessage = QStringLiteral(
"Layer type %1 not supported" ).arg(
static_cast<int>( type() ) );
return false; }
1272 virtual bool readStyle(
const QDomNode &node, QString &errorMessage,
1286 StyleCategories categories = AllStyleCategories )
const = 0;
1300 virtual bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage,
const QgsReadWriteContext &context,
1301 StyleCategories categories = AllStyleCategories )
const;
1333 void setDataSource(
const QString &dataSource,
const QString &baseName,
const QString &provider,
bool loadDefaultStyleFlag =
false );
1364 void setDataSource(
const QString &dataSource,
const QString &baseName,
const QString &provider,
const QgsDataProvider::ProviderOptions &options,
bool loadDefaultStyleFlag =
false );
1395 void setDataSource(
const QString &dataSource,
const QString &baseName,
const QString &provider,
const QgsDataProvider::ProviderOptions &options, QgsDataProvider::ReadFlags flags );
1400 QString providerType()
const;
1403 QUndoStack *undoStack();
1409 QUndoStack *undoStackStyles();
1471 bool isInScaleRange(
double scale )
const;
1483 double minimumScale()
const;
1495 double maximumScale()
const;
1505 bool hasScaleBasedVisibility()
const;
1513 Q_DECL_DEPRECATED
bool hasAutoRefreshEnabled() const
SIP_DEPRECATED;
1521 Qgis::AutoRefreshMode autoRefreshMode() const;
1530 int autoRefreshInterval() const;
1543 void setAutoRefreshInterval(
int interval );
1551 Q_DECL_DEPRECATED
void setAutoRefreshEnabled(
bool enabled )
SIP_DEPRECATED;
1559 void setAutoRefreshMode(
Qgis::AutoRefreshMode mode );
1581 virtual QString htmlMetadata() const;
1584 virtual QDateTime timestamp() const;
1600 QString refreshOnNotifyMessage()
const {
return mRefreshOnNofifyMessage; }
1617 QString originalXmlProperties()
const;
1626 void setOriginalXmlProperties(
const QString &originalXmlProperties );
1632 static QString generateId(
const QString &layerName );
1686 virtual bool hasMapTips()
const;
1696 QString mapTipTemplate()
const;
1706 void setMapTipTemplate(
const QString &mapTipTemplate );
1714 void setMapTipsEnabled(
bool enabled );
1720 bool mapTipsEnabled()
const;
1729 static QgsDataProvider::ReadFlags providerReadFlags(
const QDomNode &layerNode, QgsMapLayer::ReadFlags layerReadFlags );
1742 void setMinimumScale(
double scale );
1753 void setMaximumScale(
double scale );
1762 void setScaleBasedVisibility(
bool enabled );
1772 void triggerRepaint(
bool deferredUpdate =
false );
1780 void trigger3DUpdate();
1786 void emitStyleChanged();
1796 virtual bool setDependencies(
const QSet<QgsMapLayerDependency> &layers );
1803 void setRefreshOnNotifyEnabled(
bool enabled );
1822 SIP_PYOBJECT __repr__();
1824 QString
str = QStringLiteral(
"<QgsMapLayer: '%1' (%2)>" ).arg( sipCpp->name(), sipCpp->dataProvider() ? sipCpp->dataProvider()->name() : QStringLiteral(
"Invalid" ) );
1825 sipRes = PyUnicode_FromString(
str.toUtf8().constData() );
2033 void onNotified(
const QString &message );
2050 virtual void setDataSourcePrivate(
const QString &dataSource,
const QString &baseName,
const QString &provider,
const QgsDataProvider::ProviderOptions &options, QgsDataProvider::ReadFlags flags );
2065 void setValid(
bool valid );
2077 virtual bool writeXml( QDomNode &layer_node, QDomDocument &document,
const QgsReadWriteContext &context )
const;
2090 virtual QString encodedSource(
const QString &source,
const QgsReadWriteContext &context )
const;
2104 virtual QString decodedSource(
const QString &source,
const QString &dataProvider,
const QgsReadWriteContext &context )
const;
2111 void readCustomProperties(
const QDomNode &layerNode,
const QString &keyStartsWith = QString() );
2114 void writeCustomProperties( QDomNode &layerNode, QDomDocument &doc )
const;
2117 void readStyleManager(
const QDomNode &layerNode );
2119 void writeStyleManager( QDomNode &layerNode, QDomDocument &doc )
const;
2125 void writeCommonStyle( QDomElement &layerElement, QDomDocument &document,
2127 StyleCategories categories = AllStyleCategories )
const;
2133 void readCommonStyle(
const QDomElement &layerElement,
const QgsReadWriteContext &context,
2134 StyleCategories categories = AllStyleCategories );
2137 void setProviderType(
const QString &providerType );
2142 void connectNotify(
const char *signal )
override;
2157 void invalidateWgs84Extent();
2160 bool mValid =
false;
2200 bool mIsRefreshOnNofifyEnabled =
false;
2209 QgsMapLayer::ReadFlags mReadFlags = QgsMapLayer::ReadFlags();
2216 bool mShouldValidateCrs =
true;
2223 double mLayerOpacity = 1.0;
2230 int mBlockStyleChangedSignal = 0;
2242 QString crsHtmlMetadata()
const;
2255 QString generalHtmlMetadata()
const;
2274 bool &resultFlag, StyleCategories categories = AllStyleCategories );
2276 bool &resultFlag, StyleCategories categories = AllStyleCategories );
2277 bool loadNamedPropertyFromDatabase(
const QString &db,
const QString &uri, QString &xml,
QgsMapLayer::PropertyType type );
2286 virtual bool isReadOnly()
const;
2300 LayerFlags mFlags = LayerFlags( Identifiable | Removable | Searchable );
2303 QPainter::CompositionMode mBlendMode = QPainter::CompositionMode_SourceOver;
2311 double mMinScale = 0;
2313 double mMaxScale = 100000000;
2315 bool mScaleBasedVisibility =
false;
2320 std::unique_ptr< QgsMapLayerServerProperties > mServerProperties;
2323 QUndoStack *mUndoStack =
nullptr;
2325 QUndoStack *mUndoStackStyles =
nullptr;
2339 QTimer *mRefreshTimer =
nullptr;
2357 QString mOriginalXmlProperties;
2360 bool mRepaintRequestedFired =
false;
2363 QString mLegendPlaceholderImage;
2366 QString mMapTipTemplate;
2369 bool mMapTipsEnabled =
true;
2372 friend class TestQgsMapLayer;
The Qgis class provides global constants for use throughout the application.
LayerType
Types of layers that can be added to a map.
@ Group
Composite group layer. Added in QGIS 3.24.
@ Plugin
Plugin based layer.
@ TiledScene
Tiled scene layer. Added in QGIS 3.34.
@ Annotation
Contains freeform, georeferenced annotations. Added in QGIS 3.16.
@ VectorTile
Vector tile layer. Added in QGIS 3.14.
@ Mesh
Mesh layer. Added in QGIS 3.2.
@ PointCloud
Point cloud layer. Added in QGIS 3.18.
AutoRefreshMode
Map layer properties.
@ Disabled
Automatic refreshing is disabled.
Base class for all renderers that may to participate in 3D view.
This class represents a coordinate reference system (CRS).
Contains information about the context in which a coordinate transform is executed.
Abstract base class for spatial data provider implementations.
QgsErrorMessage represents single error message.
QgsError is container for error messages (report).
This class models dependencies with or between map layers.
Base class for storage of map layer elevation properties.
The QgsMapLayerLegend class is abstract interface for implementations of legends for one map layer.
Base class for utility classes that encapsulate information necessary for rendering of map layers.
Base class for storage of map layer selection properties.
Manages QGIS Server properties for a map layer.
Management of styles for use with one map layer.
Base class for storage of map layer temporal properties.
Base class for all map layer types.
virtual bool writeSymbology(QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context, StyleCategories categories=AllStyleCategories) const =0
Write the style for the layer into the document provided.
QString legendUrlFormat() const
Returns the format for a URL based layer legend.
void dependenciesChanged()
Emitted when dependencies are changed.
void setError(const QgsError &error)
Sets error message.
void legendChanged()
Signal emitted when legend of the layer has changed.
void setAbstract(const QString &abstract)
Sets the abstract of the layer used by QGIS Server in GetCapabilities request.
void editingStopped()
Emitted when edited changes have been successfully written to the data provider.
void recalculateExtents() const
This is used to send a request that any mapcanvas using this layer update its extents.
void metadataChanged()
Emitted when the layer's metadata is changed.
void setLegendUrl(const QString &legendUrl)
Sets the URL for the layer's legend.
void request3DUpdate()
Signal emitted when a layer requires an update in any 3D maps.
void configChanged()
Emitted whenever the configuration is changed.
void autoRefreshIntervalChanged(int interval)
Emitted when the auto refresh interval changes.
T customFlagProperty(const QString &key, const T &defaultValue)
Returns the property value for a property based on a flag.
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...
void editingStarted()
Emitted when editing on this layer has started.
void isValidChanged()
Emitted when the validity of this layer changed.
QString legendPlaceholderImage() const
Returns path to the placeholder image or an empty string if a generated legend is shown.
QgsMapLayerServerProperties * serverProperties()
Returns QGIS Server Properties for the map layer.
QString attribution() const
Returns the attribution of the layer used by QGIS Server in GetCapabilities request.
QString mRefreshOnNofifyMessage
QString mLegendUrl
WMS legend.
QString mLayerName
Name of the layer - used for display.
void setCustomFlagProperty(const QString &key, const T &value)
Set the value of a property based on a flag.
void mapTipTemplateChanged()
Emitted when the map tip template changes.
void setAttributionUrl(const QString &attribUrl)
Sets the attribution URL of the layer used by QGIS Server in GetCapabilities request.
void renderer3DChanged()
Signal emitted when 3D renderer associated with the layer has changed.
QString abstract() const
Returns the abstract of the layer used by QGIS Server in GetCapabilities request.
virtual QgsMapLayerSelectionProperties * selectionProperties()
Returns the layer's selection properties.
QString dataUrlFormat() const
Returns the DataUrl format of the layer used by QGIS Server in GetCapabilities request.
void statusChanged(const QString &status)
Emit a signal with status (e.g. to be caught by QgisApp and display a msg on status bar)
void setDataUrl(const QString &dataUrl)
Sets the DataUrl of the layer used by QGIS Server in GetCapabilities request.
QgsMapLayer(QgsMapLayer const &)=delete
QgsMapLayer cannot be copied.
void setKeywordList(const QString &keywords)
Sets the keyword list of the layer used by QGIS Server in GetCapabilities request.
void setAttribution(const QString &attrib)
Sets the attribution of the layer used by QGIS Server in GetCapabilities request.
bool isRefreshOnNotifyEnabled() const
Returns true if the refresh on provider nofification is enabled.
QSet< QgsMapLayerDependency > mDependencies
List of layers that may modify this layer on modification.
void setDataUrlFormat(const QString &dataUrlFormat)
Sets the DataUrl format of the layer used by QGIS Server in GetCapabilities request.
const QgsMapLayerServerProperties * serverProperties() const
Returns QGIS Server Properties const for the map layer.
QString mProviderKey
Data provider key (name of the data provider)
void styleChanged()
Signal emitted whenever a change affects the layer's style.
std::unique_ptr< QgsDataProvider > mPreloadedProvider
Optionally used when loading a project, it is released when the layer is effectively created.
void rendererChanged()
Signal emitted when renderer is changed.
QString title() const
Returns the title of the layer used by QGIS Server in GetCapabilities request.
void crsChanged()
Emit a signal that layer's CRS has been reset.
void dataSourceChanged()
Emitted whenever the layer's data source has been changed.
QString dataUrl() const
Returns the DataUrl of the layer used by QGIS Server in GetCapabilities request.
QgsMapLayer & operator=(QgsMapLayer const &)=delete
QgsMapLayer cannot be copied.
void setRefreshOnNofifyMessage(const QString &message)
Set the notification message that triggers repaint If refresh on notification is enabled,...
void opacityChanged(double opacity)
Emitted when the layer's opacity is changed, where opacity is a value between 0 (transparent) and 1 (...
void styleLoaded(QgsMapLayer::StyleCategories categories)
Emitted when a style has been loaded.
virtual QgsMapLayerTemporalProperties * temporalProperties()
Returns the layer's temporal properties.
void dataChanged()
Data of layer changed.
virtual QgsMapLayerRenderer * createMapRenderer(QgsRenderContext &rendererContext)=0
Returns new instance of QgsMapLayerRenderer that will be used for rendering of given context.
void willBeDeleted()
Emitted in the destructor when the layer is about to be deleted, but it is still in a perfectly valid...
virtual QgsMapLayer * clone() const =0
Returns a new instance equivalent to this one except for the id which is still unique.
void blendModeChanged(QPainter::CompositionMode blendMode)
Signal emitted when the blend mode is changed, through QgsMapLayer::setBlendMode()
virtual bool readSymbology(const QDomNode &node, QString &errorMessage, QgsReadWriteContext &context, StyleCategories categories=AllStyleCategories)=0
Read the symbology for the current layer from the DOM node supplied.
LayerFlag
Flags for the map layer.
void setLegendPlaceholderImage(const QString &imgPath)
Set placeholder image for legend.
void appendError(const QgsErrorMessage &error)
Add error message.
QString mDataSource
Data source description string, varies by layer type.
virtual bool readSld(const QDomNode &node, QString &errorMessage)
ReadFlag
Flags which control project read behavior.
QString attributionUrl() const
Returns the attribution URL of the layer used by QGIS Server in GetCapabilities request.
QString mAbstract
Description of the layer.
void customPropertyChanged(const QString &key)
Emitted when a custom property of the layer has been changed or removed.
QString legendUrl() const
Returns the URL for the layer's legend.
void flagsChanged()
Emitted when layer's flags have been modified.
void repaintRequested(bool deferredUpdate=false)
By emitting this signal the layer tells that either appearance or content have been changed and any v...
void setLegendUrlFormat(const QString &legendUrlFormat)
Sets the format for a URL based layer legend.
void beforeResolveReferences(QgsProject *project)
Emitted when all layers are loaded and references can be resolved, just before the references of this...
virtual QgsMapLayerElevationProperties * elevationProperties()
Returns the layer's elevation properties.
virtual void setTransformContext(const QgsCoordinateTransformContext &transformContext)=0
Sets the coordinate transform context to transformContext.
void nameChanged()
Emitted when the name has been changed.
QString mDataUrl
DataUrl of the layer.
T customEnumProperty(const QString &key, const T &defaultValue)
Returns the property value for a property based on an enum.
StyleCategory
Categories of style to distinguish appropriate sections for import/export.
void layerModified()
Emitted when modifications has been done on layer.
virtual Q_INVOKABLE void reload()
Synchronises with changes in the datasource.
void mapTipsEnabledChanged()
Emitted when map tips are enabled or disabled for the layer.
QString mAttribution
Attribution of the layer.
void setCustomEnumProperty(const QString &key, const T &value)
Set the value of a property based on an enum.
QString keywordList() const
Returns the keyword list of the layer used by QGIS Server in GetCapabilities request.
void setTitle(const QString &title)
Sets the title of the layer used by QGIS Server in GetCapabilities request.
PropertyType
Maplayer has a style and a metadata property.
Simple key-value store (keys = strings, values = variants) that supports loading/saving to/from XML i...
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
The class is used as a container of context for various read/write operations on other objects.
A rectangle specified with double values.
Contains information about the context of a rendering operation.
The QgsSldExportContext class holds SLD export options and other information related to SLD export of...
An interface for classes which can visit style entity (e.g.
Represents a vector layer which manages a vector based data sets.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Q_DECLARE_METATYPE(QgsDatabaseQueryLogEntry)
#define QgsDebugError(str)
QPointer< QgsMapLayer > QgsWeakMapLayerPointer
Weak pointer for QgsMapLayer.
QList< QgsWeakMapLayerPointer > QgsWeakMapLayerPointerList
A list of weak pointers to QgsMapLayers.
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsTextRendererUtils::CurvedTextFlags)
const QgsCoordinateReferenceSystem & crs
Setting options for creating vector data providers.