QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
qgssubsetstringeditorproviderregistry.h
Go to the documentation of this file.
1/***************************************************************************
2 qgssubsetstringeditorproviderregistry.h
3 --------------------------------------
4 Date : 15-Nov-2020
5 Copyright : (C) 2020 by Even Rouault
6 Email : even.rouault at spatials.com
7****************************************************************************/
8/***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16
17#ifndef QGSSUBSETSTRINGEDITORPROVIDERREGISTRY_H
18#define QGSSUBSETSTRINGEDITORPROVIDERREGISTRY_H
19
20#include "qgis_gui.h"
21#include "qgis_sip.h"
22#include "qgsguiutils.h"
23
24#include <QWidget>
25
29class QgsVectorLayer;
30
41{
42 public:
45
48
50 QList<QgsSubsetStringEditorProvider *> providers();
51
54
60
66
68 QgsSubsetStringEditorProvider *providerByName( const QString &name );
69
71 QList<QgsSubsetStringEditorProvider *> providersByKey( const QString &providerKey );
72
78 QgsSubsetStringEditorInterface *createDialog( QgsVectorLayer *layer, QWidget *parent SIP_TRANSFERTHIS = nullptr, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags ) SIP_TRANSFERBACK;
79
80 private:
81#ifdef SIP_RUN
83#endif
84
86 QList<QgsSubsetStringEditorProvider *> mProviders;
87};
88
89#endif // QGSSUBSETSTRINGEDITORPROVIDERREGISTRY_H
A registry / canonical manager of GUI parts of data providers.
Interface for a dialog that can edit subset strings.
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.
bool removeProvider(QgsSubsetStringEditorProvider *provider)
Remove provider implementation from the list (provider object is deleted).
QgsSubsetStringEditorProvider * providerByName(const QString &name)
Returns a provider by name or nullptr if not found.
void initializeFromProviderGuiRegistry(QgsProviderGuiRegistry *providerGuiRegistry)
Initializes the registry.
QgsSubsetStringEditorProviderRegistry & operator=(const QgsSubsetStringEditorProviderRegistry &rh)=delete
QList< QgsSubsetStringEditorProvider * > providersByKey(const QString &providerKey)
Returns a (possibly empty) list of providers by data providerkey.
QgsSubsetStringEditorProviderRegistry(const QgsSubsetStringEditorProviderRegistry &rh)=delete
void addProvider(QgsSubsetStringEditorProvider *provider)
Add a provider implementation. Takes ownership of the object.
QList< QgsSubsetStringEditorProvider * > providers()
Gets list of available providers.
An interface for widgets which edit a subset string.
Represents a vector layer which manages a vector based dataset.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53
#define SIP_TRANSFER
Definition qgis_sip.h:36
#define SIP_TRANSFERBACK
Definition qgis_sip.h:48