19 #ifndef QGSMAPLAYERSTORE_H 20 #define QGSMAPLAYERSTORE_H 22 #include "qgis_core.h" 60 sipRes = sipCpp->count();
86 QList<QgsMapLayer *> mapLayersByName(
const QString &name )
const;
94 QMap<QString, QgsMapLayer *> mapLayers()
const;
108 template <
typename T>
112 QMap<QString, QgsMapLayer *>::const_iterator layerIt = mMapLayers.constBegin();
113 for ( ; layerIt != mMapLayers.constEnd(); ++layerIt )
115 T tLayer = qobject_cast<T>( layerIt.value() );
143 QList<QgsMapLayer *> addMapLayers(
const QList<QgsMapLayer *> &layers
SIP_TRANSFER,
184 void removeMapLayers(
const QStringList &layerIds )
SIP_PYNAME( removeMapLayersById );
199 void removeMapLayers(
const QList<QgsMapLayer *> &layers );
213 void removeMapLayer(
const QString &
id );
245 void removeAllMapLayers();
263 void layersWillBeRemoved(
const QStringList &layerIds );
272 void layersWillBeRemoved(
const QList<QgsMapLayer *> &layers );
283 void layerWillBeRemoved(
const QString &layerId );
302 void layersRemoved(
const QStringList &layerIds );
312 void layerRemoved(
const QString &layerId );
320 void allLayersRemoved();
329 void layersAdded(
const QList<QgsMapLayer *> &layers );
341 void onMapLayerDeleted( QObject *obj );
345 QMap<QString, QgsMapLayer *> mMapLayers;
349 #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...