QGIS API Documentation 3.99.0-Master (21b3aa880ba)
Loading...
Searching...
No Matches
QgsSubsetStringEditorProviderRegistry Class Reference

A registry for 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.
QgsSubsetStringEditorInterfacecreateDialog (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.
QgsSubsetStringEditorProviderRegistryoperator= (const QgsSubsetStringEditorProviderRegistry &rh)=delete
QgsSubsetStringEditorProviderproviderByName (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).

Detailed Description

A registry for subset string editor providers.

QgsSubsetStringEditorProviderRegistry is not usually directly created, but rather accessed through QgsGui::subsetStringEditorProvideRegistry().

Since
QGIS 3.18

Definition at line 40 of file qgssubsetstringeditorproviderregistry.h.

Constructor & Destructor Documentation

◆ QgsSubsetStringEditorProviderRegistry() [1/2]

QgsSubsetStringEditorProviderRegistry::QgsSubsetStringEditorProviderRegistry ( )
default

◆ ~QgsSubsetStringEditorProviderRegistry()

QgsSubsetStringEditorProviderRegistry::~QgsSubsetStringEditorProviderRegistry ( )

Definition at line 27 of file qgssubsetstringeditorproviderregistry.cpp.

◆ QgsSubsetStringEditorProviderRegistry() [2/2]

QgsSubsetStringEditorProviderRegistry::QgsSubsetStringEditorProviderRegistry ( const QgsSubsetStringEditorProviderRegistry & rh)
delete

Member Function Documentation

◆ addProvider()

void QgsSubsetStringEditorProviderRegistry::addProvider ( QgsSubsetStringEditorProvider * provider)

Add a provider implementation. Takes ownership of the object.

Definition at line 37 of file qgssubsetstringeditorproviderregistry.cpp.

◆ createDialog()

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 98 of file qgssubsetstringeditorproviderregistry.cpp.

◆ initializeFromProviderGuiRegistry()

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 54 of file qgssubsetstringeditorproviderregistry.cpp.

◆ operator=()

QgsSubsetStringEditorProviderRegistry & QgsSubsetStringEditorProviderRegistry::operator= ( const QgsSubsetStringEditorProviderRegistry & rh)
delete

◆ providerByName()

QgsSubsetStringEditorProvider * QgsSubsetStringEditorProviderRegistry::providerByName ( const QString & name)

Returns a provider by name or nullptr if not found.

Definition at line 71 of file qgssubsetstringeditorproviderregistry.cpp.

◆ providers()

QList< QgsSubsetStringEditorProvider * > QgsSubsetStringEditorProviderRegistry::providers ( )

Gets list of available providers.

Definition at line 32 of file qgssubsetstringeditorproviderregistry.cpp.

◆ providersByKey()

QList< QgsSubsetStringEditorProvider * > QgsSubsetStringEditorProviderRegistry::providersByKey ( const QString & providerKey)

Returns a (possibly empty) list of providers by data providerkey.

Definition at line 84 of file qgssubsetstringeditorproviderregistry.cpp.

◆ removeProvider()

bool QgsSubsetStringEditorProviderRegistry::removeProvider ( QgsSubsetStringEditorProvider * provider)

Remove provider implementation from the list (provider object is deleted).

Returns
true if the provider was actually removed and deleted

Definition at line 42 of file qgssubsetstringeditorproviderregistry.cpp.


The documentation for this class was generated from the following files: