QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
57 if ( !mPluginLayerTypes.isEmpty() )
59 QgsDebugMsg( QStringLiteral(
"QgsPluginLayerRegistry::~QgsPluginLayerRegistry(): creator list not empty" ) );
60 const QStringList keys = mPluginLayerTypes.keys();
61 for (
const QString &key : keys )
70 return mPluginLayerTypes.keys();
78 if ( mPluginLayerTypes.contains( type->
name() ) )
81 mPluginLayerTypes[type->
name()] = type;
88 if ( !mPluginLayerTypes.contains(
typeName ) )
93 const auto constLayers = layers;
102 QStringList() << layer->id() );
107 delete mPluginLayerTypes.take(
typeName );
113 return mPluginLayerTypes.value(
typeName,
nullptr );
126 if ( !uri.isEmpty() )
~QgsPluginLayerRegistry()
QMap< QString, QgsMapLayer * > mapLayers(const bool validOnly=false) const
Returns a map of all registered layers by layer ID.
virtual QgsPluginLayer * createLayer()
Returns new layer of this type. Return nullptr on error.
QStringList pluginLayerTypes()
List all known layer types.
static QgsProject * instance()
Returns the QgsProject singleton instance.
void removeMapLayers(const QStringList &layerIds)
Remove a set of layers from the registry by layer ID.
QgsPluginLayer * createLayer(const QString &typeName, const QString &uri=QString())
Returns new layer if corresponding plugin has been found else returns nullptr.
QgsPluginLayerType * pluginLayerType(const QString &typeName)
Returns plugin layer type metadata or nullptr if doesn't exist.
Base class for plugin layers. These can be implemented by plugins and registered in QgsPluginLayerReg...
Class for creating plugin specific layers.
QgsPluginLayerType(const QString &name)
virtual bool showLayerProperties(QgsPluginLayer *layer)
Show plugin layer properties dialog. Return false if the dialog cannot be shown.
Base class for all map layer types. This is the base class for all map layer types (vector,...
bool addPluginLayerType(QgsPluginLayerType *pluginLayerType)
Add plugin layer type (take ownership) and return true on success.
QString pluginLayerType()
Returns plugin layer type (the same as used in QgsPluginLayerRegistry)
bool removePluginLayerType(const QString &typeName)
Remove plugin layer type and return true on success.
@ PluginLayer
Plugin based layer.