19 #ifndef QGSMAPLAYERSTORE_H 20 #define QGSMAPLAYERSTORE_H 22 #include "qgis_core.h" 57 int validCount()
const;
66 sipRes = sipCpp->count();
92 QList<QgsMapLayer *> mapLayersByName(
const QString &name )
const;
100 QMap<QString, QgsMapLayer *> mapLayers()
const;
109 QMap<QString, QgsMapLayer *> validMapLayers()
const;
123 template <
typename T>
127 QMap<QString, QgsMapLayer *>::const_iterator layerIt = mMapLayers.constBegin();
128 for ( ; layerIt != mMapLayers.constEnd(); ++layerIt )
130 T tLayer = qobject_cast<T>( layerIt.value() );
158 QList<QgsMapLayer *> addMapLayers(
const QList<QgsMapLayer *> &layers
SIP_TRANSFER,
199 void removeMapLayers(
const QStringList &layerIds )
SIP_PYNAME( removeMapLayersById );
214 void removeMapLayers(
const QList<QgsMapLayer *> &layers );
228 void removeMapLayer(
const QString &
id );
260 void removeAllMapLayers();
278 void layersWillBeRemoved(
const QStringList &layerIds );
287 void layersWillBeRemoved(
const QList<QgsMapLayer *> &layers );
298 void layerWillBeRemoved(
const QString &layerId );
317 void layersRemoved(
const QStringList &layerIds );
327 void layerRemoved(
const QString &layerId );
335 void allLayersRemoved();
344 void layersAdded(
const QList<QgsMapLayer *> &layers );
356 void onMapLayerDeleted( QObject *obj );
360 QMap<QString, QgsMapLayer *> mMapLayers;
364 #endif //QGSMAPLAYERSTORE_H Base class for all map layer types.
QVector< T > layers() const
Returns a list of registered map layers with a specified layer type.
A storage object for map layers, in which the layers are owned by the store and have their lifetime b...