19 #ifndef QGSMAPLAYERREGISTRY_H
20 #define QGSMAPLAYERREGISTRY_H
25 #include <QStringList>
50 QList<QgsMapLayer *> mapLayersByName( QString layerName );
53 const QMap<QString, QgsMapLayer*> & mapLayers();
78 QList<QgsMapLayer *> addMapLayers( QList<QgsMapLayer *> theMapLayers,
79 bool addToLegend =
true,
80 bool takeOwnership =
true );
107 QgsMapLayer* addMapLayer(
QgsMapLayer * theMapLayer,
bool addToLegend =
true,
bool takeOwnership =
true );
122 void removeMapLayers( QStringList theLayerIds );
137 void removeMapLayer(
const QString& theLayerId );
145 void removeAllMapLayers();
155 Q_DECL_DEPRECATED
void clearAllLayerCaches();
163 void reloadAllLayers();
171 void layersWillBeRemoved( QStringList theLayerIds );
180 void layerWillBeRemoved( QString theLayerId );
187 void layersRemoved( QStringList theLayerIds );
196 void layerRemoved( QString theLayerId );
218 void layersAdded( QList<QgsMapLayer *> theMapLayers );
239 void legendLayersAdded( QList<QgsMapLayer*> theMapLayers );
248 void connectNotify(
const char * signal );
256 #endif //QgsMapLayerRegistry_H
Base class for all map layer types.
static QgsMapLayerRegistry * mInstance
This class tracks map layers that are currently loaded and provides a means to fetch a pointer to a m...
QMap< QString, QgsMapLayer * > mMapLayers
QSet< QgsMapLayer * > mOwnedLayers