QGIS API Documentation 3.39.0-Master (3783037d301)
|
This class keeps a list of subset string editor providers. More...
#include <qgssubsetstringeditorproviderregistry.h>
Public Member Functions | |
QgsSubsetStringEditorProviderRegistry () | |
QgsSubsetStringEditorProviderRegistry (const QgsSubsetStringEditorProviderRegistry &rh)=delete | |
~QgsSubsetStringEditorProviderRegistry () | |
void | addProvider (QgsSubsetStringEditorProvider *provider) |
Add a provider implementation. Takes ownership of the object. | |
QgsSubsetStringEditorInterface * | createDialog (QgsVectorLayer *layer, QWidget *parent=nullptr, Qt::WindowFlags fl=QgsGuiUtils::ModalDialogFlags) |
Creates a new dialog to edit the subset string of the provided layer. | |
void | initializeFromProviderGuiRegistry (QgsProviderGuiRegistry *providerGuiRegistry) |
Initializes the registry. | |
QgsSubsetStringEditorProviderRegistry & | operator= (const QgsSubsetStringEditorProviderRegistry &rh)=delete |
QgsSubsetStringEditorProvider * | providerByName (const QString &name) |
Returns a provider by name or nullptr if not found. | |
QList< QgsSubsetStringEditorProvider * > | providers () |
Gets list of available providers. | |
QList< QgsSubsetStringEditorProvider * > | providersByKey (const QString &providerKey) |
Returns a (possibly empty) list of providers by data providerkey. | |
bool | removeProvider (QgsSubsetStringEditorProvider *provider) |
Remove provider implementation from the list (provider object is deleted) | |
This class keeps a list of subset string editor providers.
QgsSubsetStringEditorProviderRegistry is not usually directly created, but rather accessed through QgsGui::subsetStringEditorProvideRegistry().
Definition at line 40 of file qgssubsetstringeditorproviderregistry.h.
|
default |
QgsSubsetStringEditorProviderRegistry::~QgsSubsetStringEditorProviderRegistry | ( | ) |
Definition at line 26 of file qgssubsetstringeditorproviderregistry.cpp.
|
delete |
void QgsSubsetStringEditorProviderRegistry::addProvider | ( | QgsSubsetStringEditorProvider * | provider | ) |
Add a provider implementation. Takes ownership of the object.
Definition at line 36 of file qgssubsetstringeditorproviderregistry.cpp.
QgsSubsetStringEditorInterface * QgsSubsetStringEditorProviderRegistry::createDialog | ( | QgsVectorLayer * | layer, |
QWidget * | parent = nullptr , |
||
Qt::WindowFlags | fl = QgsGuiUtils::ModalDialogFlags |
||
) |
Creates a new dialog to edit the subset string of the provided layer.
It will default to returning a QgsQueryBuilder if no provider was found. The returned object must be destroyed by the caller.
Definition at line 97 of file qgssubsetstringeditorproviderregistry.cpp.
void QgsSubsetStringEditorProviderRegistry::initializeFromProviderGuiRegistry | ( | QgsProviderGuiRegistry * | providerGuiRegistry | ) |
Initializes the registry.
The registry needs to be passed explicitly (instead of using singleton) because this gets called from QgsGui constructor.
Definition at line 53 of file qgssubsetstringeditorproviderregistry.cpp.
|
delete |
QgsSubsetStringEditorProvider * QgsSubsetStringEditorProviderRegistry::providerByName | ( | const QString & | name | ) |
Returns a provider by name or nullptr
if not found.
Definition at line 70 of file qgssubsetstringeditorproviderregistry.cpp.
QList< QgsSubsetStringEditorProvider * > QgsSubsetStringEditorProviderRegistry::providers | ( | ) |
Gets list of available providers.
Definition at line 31 of file qgssubsetstringeditorproviderregistry.cpp.
QList< QgsSubsetStringEditorProvider * > QgsSubsetStringEditorProviderRegistry::providersByKey | ( | const QString & | providerKey | ) |
Returns a (possibly empty) list of providers by data providerkey.
Definition at line 83 of file qgssubsetstringeditorproviderregistry.cpp.
bool QgsSubsetStringEditorProviderRegistry::removeProvider | ( | QgsSubsetStringEditorProvider * | provider | ) |
Remove provider implementation from the list (provider object is deleted)
true
if the provider was actually removed and deleted Definition at line 41 of file qgssubsetstringeditorproviderregistry.cpp.