19 #ifndef QGSMAPLAYERSTORE_H 20 #define QGSMAPLAYERSTORE_H 22 #include "qgis_core.h" 60 sipRes = sipCpp->count();
80 QList<QgsMapLayer *> mapLayersByName(
const QString &name )
const;
88 QMap<QString, QgsMapLayer *> mapLayers()
const;
102 template <
typename T>
106 QMap<QString, QgsMapLayer *>::const_iterator layerIt = mMapLayers.constBegin();
107 for ( ; layerIt != mMapLayers.constEnd(); ++layerIt )
109 T tLayer = qobject_cast<T>( layerIt.value() );
137 QList<QgsMapLayer *> addMapLayers(
const QList<QgsMapLayer *> &layers
SIP_TRANSFER,
178 void removeMapLayers(
const QStringList &layerIds )
SIP_PYNAME( removeMapLayersById );
193 void removeMapLayers(
const QList<QgsMapLayer *> &layers );
207 void removeMapLayer(
const QString &
id );
239 void removeAllMapLayers();
257 void layersWillBeRemoved(
const QStringList &layerIds );
266 void layersWillBeRemoved(
const QList<QgsMapLayer *> &layers );
277 void layerWillBeRemoved(
const QString &layerId );
296 void layersRemoved(
const QStringList &layerIds );
306 void layerRemoved(
const QString &layerId );
314 void allLayersRemoved();
324 void layersAdded(
const QList<QgsMapLayer *> &layers );
336 void onMapLayerDeleted( QObject *obj );
340 QMap<QString, QgsMapLayer *> mMapLayers;
344 #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...