19 #ifndef QGSMAPLAYERREGISTRY_H
20 #define QGSMAPLAYERREGISTRY_H
25 #include <QStringList>
50 QList<QgsMapLayer *> mapLayersByName( QString layerName );
53 const QMap<QString, QgsMapLayer*> & mapLayers();
77 QList<QgsMapLayer *> addMapLayers( QList<QgsMapLayer *> theMapLayers,
78 bool addToLegend =
true,
79 bool takeOwnership =
true );
106 QgsMapLayer* addMapLayer(
QgsMapLayer * theMapLayer,
bool addToLegend =
true,
bool takeOwnership =
true );
121 void removeMapLayers( QStringList theLayerIds );
136 void removeMapLayer(
const QString& theLayerId );
144 void removeAllMapLayers();
153 Q_DECL_DEPRECATED
void clearAllLayerCaches();
158 void reloadAllLayers();
166 void layersWillBeRemoved( QStringList theLayerIds );
175 void layerWillBeRemoved( QString theLayerId );
182 void layersRemoved( QStringList theLayerIds );
191 void layerRemoved( QString theLayerId );
211 void layersAdded( QList<QgsMapLayer *> theMapLayers );
230 void legendLayersAdded( QList<QgsMapLayer*> theMapLayers );
236 void connectNotify(
const char * signal );
243 QMap<QString, QgsMapLayer*> mMapLayers;
244 QSet<QgsMapLayer*> mOwnedLayers;
247 #endif //QgsMapLayerRegistry_H