mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-16 00:05:45 -04:00
The aim of this work is to be able to provide custom subset string editor GUI according to the layer. Typically, so that a WFS layer uses the same editor than in its select source, or that a plugin can provide a custom editor. * Add QgsSubsetStringEditorInterface: abstract interface to define a dialog that can edit a subset string * Make QgsQueryBuilder implement QgsSubsetStringEditorInterface * Add QgsSubsetStringEditorProvider: interface for thos who want to provide a dialog to edit a subset string. * Add QgsSubsetStringEditorProviderRegistry: keeps a list of subset string editor providers. Transposed from QgsDataItemGuiProviderRegistry * Add QgsGui::subsetStringEditorProviderRegistry()
84 lines
3.1 KiB
Plaintext
84 lines
3.1 KiB
Plaintext
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/gui/qgssubsetstringeditorproviderregistry.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
class QgsSubsetStringEditorProviderRegistry
|
|
{
|
|
%Docstring
|
|
This class keeps a list of subset string editor providers.
|
|
|
|
QgsSubsetStringEditorProviderRegistry is not usually directly created, but rather accessed through
|
|
:py:func:`QgsGui.subsetStringEditorProvideRegistry()`.
|
|
|
|
.. versionadded:: 3.18
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgssubsetstringeditorproviderregistry.h"
|
|
%End
|
|
public:
|
|
|
|
QgsSubsetStringEditorProviderRegistry();
|
|
~QgsSubsetStringEditorProviderRegistry();
|
|
|
|
|
|
QList< QgsSubsetStringEditorProvider *> providers();
|
|
%Docstring
|
|
Gets list of available providers
|
|
%End
|
|
|
|
void addProvider( QgsSubsetStringEditorProvider *provider /Transfer/ );
|
|
%Docstring
|
|
Add a ``provider`` implementation. Takes ownership of the object.
|
|
%End
|
|
|
|
bool removeProvider( QgsSubsetStringEditorProvider *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 QgsGui constructor.
|
|
%End
|
|
|
|
QgsSubsetStringEditorProvider *providerByName( const QString &name );
|
|
%Docstring
|
|
Returns a provider by ``name`` or ``None`` if not found
|
|
%End
|
|
|
|
QList<QgsSubsetStringEditorProvider *> providersByKey( const QString &providerKey );
|
|
%Docstring
|
|
Returns a (possibly empty) list of providers by data ``providerkey``
|
|
%End
|
|
|
|
QgsSubsetStringEditorInterface *createDialog( QgsVectorLayer *layer, QWidget *parent /TransferThis/ = 0, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags ) /TransferBack/;
|
|
%Docstring
|
|
Creates a new dialog to edit the subset string of the provided ``layer``.
|
|
It will default to returning a :py:class:`QgsQueryBuilder`* if no provider was found.
|
|
The returned object must be destroyed by the caller.
|
|
%End
|
|
|
|
private:
|
|
QgsSubsetStringEditorProviderRegistry( const QgsSubsetStringEditorProviderRegistry &rh );
|
|
};
|
|
|
|
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/gui/qgssubsetstringeditorproviderregistry.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|