mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
after QGIS startup (eg when enabling a new plugin), and also ensure pages are correctly removed when providers are removed
109 lines
3.5 KiB
Plaintext
109 lines
3.5 KiB
Plaintext
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/gui/qgssourceselectproviderregistry.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
class QgsSourceSelectProviderRegistry : QObject
|
|
{
|
|
%Docstring(signature="appended")
|
|
This class keeps a list of source select providers that may add items to the :py:class:`QgsDataSourceManagerDialog`
|
|
When created, it automatically adds providers from data provider plugins (e.g. PostGIS, WMS, ...)
|
|
|
|
:py:class:`QgsSourceSelectProviderRegistry` is not usually directly created, but rather accessed through
|
|
:py:func:`QgsGui.sourceSelectProviderRegistry()`.
|
|
|
|
.. versionadded:: 3.0
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgssourceselectproviderregistry.h"
|
|
%End
|
|
public:
|
|
|
|
QgsSourceSelectProviderRegistry();
|
|
~QgsSourceSelectProviderRegistry();
|
|
|
|
|
|
QList< QgsSourceSelectProvider *> providers();
|
|
%Docstring
|
|
Gets list of available providers
|
|
%End
|
|
|
|
void addProvider( QgsSourceSelectProvider *provider /Transfer/ );
|
|
%Docstring
|
|
Add a ``provider`` implementation. Takes ownership of the object.
|
|
%End
|
|
|
|
bool removeProvider( QgsSourceSelectProvider *provider /Transfer/ );
|
|
%Docstring
|
|
Remove ``provider`` implementation from the list (``provider`` object is deleted)
|
|
|
|
:return: ``True`` if the provider was actually removed and deleted
|
|
%End
|
|
|
|
void initializeFromProviderGuiRegistry( QgsProviderGuiRegistry *providerGuiRegistry );
|
|
%Docstring
|
|
Initializes the registry. The registry needs to be passed explicitly
|
|
(instead of using singleton) because this gets called from :py:class:`QgsGui` constructor.
|
|
|
|
.. versionadded:: 3.10
|
|
%End
|
|
|
|
QgsSourceSelectProvider *providerByName( const QString &name );
|
|
%Docstring
|
|
Returns a provider by ``name`` or ``None`` if not found
|
|
%End
|
|
|
|
QList<QgsSourceSelectProvider *> providersByKey( const QString &providerKey );
|
|
%Docstring
|
|
Returns a (possibly empty) list of providers by data ``providerkey``
|
|
%End
|
|
|
|
QgsAbstractDataSourceWidget *createSelectionWidget(
|
|
const QString &name,
|
|
QWidget *parent,
|
|
Qt::WindowFlags fl,
|
|
QgsProviderRegistry::WidgetMode widgetMode
|
|
);
|
|
%Docstring
|
|
Gets select widget from provider with ``name``
|
|
|
|
The function is replacement of :py:func:`QgsProviderRegistry.createSelectionWidget()` from QGIS 3.8
|
|
|
|
.. versionadded:: 3.10
|
|
%End
|
|
|
|
signals:
|
|
|
|
void providerAdded( const QString &name );
|
|
%Docstring
|
|
Emitted whenever a provider is added to the registry.
|
|
|
|
.. versionadded:: 3.30
|
|
%End
|
|
|
|
void providerRemoved( const QString &name );
|
|
%Docstring
|
|
Emitted whenever a provider is removed from the registry.
|
|
|
|
.. versionadded:: 3.30
|
|
%End
|
|
|
|
private:
|
|
QgsSourceSelectProviderRegistry( const QgsSourceSelectProviderRegistry &rh );
|
|
};
|
|
|
|
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/gui/qgssourceselectproviderregistry.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|