19 #ifndef QGSMAPLAYERREGISTRY_H
20 #define QGSMAPLAYERREGISTRY_H
25 #include <QStringList>
49 QList<QgsMapLayer *> mapLayersByName( QString layerName );
52 const QMap<QString, QgsMapLayer*> & mapLayers();
76 QList<QgsMapLayer *> addMapLayers( QList<QgsMapLayer *> theMapLayers,
77 bool addToLegend =
true,
78 bool takeOwnership =
true );
105 QgsMapLayer* addMapLayer(
QgsMapLayer * theMapLayer,
bool addToLegend =
true,
bool takeOwnership =
true );
120 void removeMapLayers( QStringList theLayerIds );
135 void removeMapLayer(
const QString& theLayerId );
143 void removeAllMapLayers();
152 Q_DECL_DEPRECATED
void clearAllLayerCaches();
157 void reloadAllLayers();
165 void layersWillBeRemoved( QStringList theLayerIds );
174 void layerWillBeRemoved( QString theLayerId );
181 void layersRemoved( QStringList theLayerIds );
190 void layerRemoved( QString theLayerId );
210 void layersAdded( QList<QgsMapLayer *> theMapLayers );
229 void legendLayersAdded( QList<QgsMapLayer*> theMapLayers );
236 void connectNotify(
const char * signal )
override;
243 QMap<QString, QgsMapLayer*> mMapLayers;
244 QSet<QgsMapLayer*> mOwnedLayers;
249 #endif //QgsMapLayerRegistry_H