QGIS API Documentation  3.20.0-Odense (decaadbb31)
Public Member Functions | List of all members
QgsSubsetStringEditorProviderRegistry Class Reference

This class keeps a list of subset string editor providers. More...

#include <qgssubsetstringeditorproviderregistry.h>

Public Member Functions

 QgsSubsetStringEditorProviderRegistry ()
 
 QgsSubsetStringEditorProviderRegistry (const QgsSubsetStringEditorProviderRegistry &rh)=delete
 QgsDataItemProviderRegistry cannot be copied. More...
 
 ~QgsSubsetStringEditorProviderRegistry ()
 
void addProvider (QgsSubsetStringEditorProvider *provider)
 Add a provider implementation. Takes ownership of the object. More...
 
QgsSubsetStringEditorInterfacecreateDialog (QgsVectorLayer *layer, QWidget *parent=nullptr, Qt::WindowFlags fl=QgsGuiUtils::ModalDialogFlags)
 Creates a new dialog to edit the subset string of the provided layer. More...
 
void initializeFromProviderGuiRegistry (QgsProviderGuiRegistry *providerGuiRegistry)
 Initializes the registry. More...
 
QgsSubsetStringEditorProviderRegistryoperator= (const QgsSubsetStringEditorProviderRegistry &rh)=delete
 QgsDataItemProviderRegistry cannot be copied. More...
 
QgsSubsetStringEditorProviderproviderByName (const QString &name)
 Returns a provider by name or nullptr if not found. More...
 
QList< QgsSubsetStringEditorProvider * > providers ()
 Gets list of available providers. More...
 
QList< QgsSubsetStringEditorProvider * > providersByKey (const QString &providerKey)
 Returns a (possibly empty) list of providers by data providerkey. More...
 
bool removeProvider (QgsSubsetStringEditorProvider *provider)
 Remove provider implementation from the list (provider object is deleted) More...
 

Detailed Description

This class keeps a list of subset string editor providers.

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

Since
QGIS 3.18

Definition at line 39 of file qgssubsetstringeditorproviderregistry.h.

Constructor & Destructor Documentation

◆ QgsSubsetStringEditorProviderRegistry() [1/2]

QgsSubsetStringEditorProviderRegistry::QgsSubsetStringEditorProviderRegistry ( )
default

◆ ~QgsSubsetStringEditorProviderRegistry()

QgsSubsetStringEditorProviderRegistry::~QgsSubsetStringEditorProviderRegistry ( )

Definition at line 26 of file qgssubsetstringeditorproviderregistry.cpp.

◆ QgsSubsetStringEditorProviderRegistry() [2/2]

QgsSubsetStringEditorProviderRegistry::QgsSubsetStringEditorProviderRegistry ( const QgsSubsetStringEditorProviderRegistry rh)
delete

QgsDataItemProviderRegistry cannot be copied.

Member Function Documentation

◆ addProvider()

void QgsSubsetStringEditorProviderRegistry::addProvider ( QgsSubsetStringEditorProvider provider)

Add a provider implementation. Takes ownership of the object.

Definition at line 36 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 97 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 53 of file qgssubsetstringeditorproviderregistry.cpp.

◆ operator=()

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

QgsDataItemProviderRegistry cannot be copied.

◆ providerByName()

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

Returns a provider by name or nullptr if not found.

Definition at line 70 of file qgssubsetstringeditorproviderregistry.cpp.

◆ providers()

QList< QgsSubsetStringEditorProvider * > QgsSubsetStringEditorProviderRegistry::providers ( )

Gets list of available providers.

Definition at line 31 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 83 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 41 of file qgssubsetstringeditorproviderregistry.cpp.


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