19#ifndef QGSMAPLAYERSTORE_H
20#define QGSMAPLAYERSTORE_H
56 int validCount()
const;
65 sipRes = sipCpp->count();
91 QList<QgsMapLayer *> mapLayersByName(
const QString &name )
const;
99 QMap<QString, QgsMapLayer *> mapLayers()
const;
108 QMap<QString, QgsMapLayer *> validMapLayers()
const;
122 template <
typename T>
126 QMap<QString, QgsMapLayer *>::const_iterator layerIt = mMapLayers.constBegin();
127 for ( ; layerIt != mMapLayers.constEnd(); ++layerIt )
129 T tLayer = qobject_cast<T>( layerIt.value() );
162 QList<QgsMapLayer *> addMapLayers(
const QList<QgsMapLayer *> &layers
SIP_TRANSFER,
203 void removeMapLayers(
const QStringList &layerIds )
SIP_PYNAME( removeMapLayersById );
218 void removeMapLayers(
const QList<QgsMapLayer *> &layers );
232 void removeMapLayer(
const QString &
id );
264 void removeAllMapLayers();
360 void onMapLayerDeleted( QObject *obj );
364 QMap<QString, QgsMapLayer *> mMapLayers;
A storage object for map layers, in which the layers are owned by the store and have their lifetime b...
void layerWillBeRemoved(QgsMapLayer *layer)
Emitted when a layer is about to be removed from the store.
void layersWillBeRemoved(const QList< QgsMapLayer * > &layers)
Emitted when one or more layers are about to be removed from the store.
void layersWillBeRemoved(const QStringList &layerIds)
Emitted when one or more layers are about to be removed from the store.
void layerWillBeRemoved(const QString &layerId)
Emitted when a layer is about to be removed from the store.
QVector< T > layers() const
Returns a list of registered map layers with a specified layer type.
void layersRemoved(const QStringList &layerIds)
Emitted after one or more layers were removed from the store.
void allLayersRemoved()
Emitted when all layers are removed, before layersWillBeRemoved() and layerWillBeRemoved() signals ar...
void layerRemoved(const QString &layerId)
Emitted after a layer was removed from the store.
void layerWasAdded(QgsMapLayer *layer)
Emitted when a layer was added to the store.
void layersAdded(const QList< QgsMapLayer * > &layers)
Emitted when one or more layers were added to the store.
Base class for all map layer types.