QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
qgssubsetstringeditorprovider.h
Go to the documentation of this file.
1/***************************************************************************
2 qgssubsetstringeditorprovider.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 QGSSUBSETSTRINGEDITORPROVIDER_H
18#define QGSSUBSETSTRINGEDITORPROVIDER_H
19
20#include "qgis.h"
21#include "qgis_gui.h"
22#include "qgis_sip.h"
23#include "qgsguiutils.h"
24
25class QWidget;
26class QgsVectorLayer;
28
38{
39 public:
42
44 virtual QString providerKey() const = 0;
45
53 virtual QString name() const { return providerKey(); }
54
56 virtual bool canHandleLayer( QgsVectorLayer *layer ) const = 0;
57
66 virtual bool canHandleLayerStorageType( QgsVectorLayer *layer ) const { Q_UNUSED( layer ); return false; }
67
75 virtual QgsSubsetStringEditorInterface *createDialog( QgsVectorLayer *layer, QWidget *parent SIP_TRANSFERTHIS = nullptr, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags ) = 0 SIP_FACTORY;
76};
77
78#endif
Interface for a dialog that can edit subset strings.
This is the interface for those who want to provide a dialog to edit a subset string.
virtual QgsSubsetStringEditorInterface * createDialog(QgsVectorLayer *layer, QWidget *parent=nullptr, Qt::WindowFlags fl=QgsGuiUtils::ModalDialogFlags)=0
Creates a new dialog to edit the subset string of the provided layer.
virtual bool canHandleLayer(QgsVectorLayer *layer) const =0
Returns true if the provider can handle the layer.
virtual bool canHandleLayerStorageType(QgsVectorLayer *layer) const
Returns true if the provider can handle specifically the layer->provider()->storageType() This method...
virtual QString name() const
Subset string editor provider name, this is useful to retrieve a particular subset string editor in c...
virtual QString providerKey() const =0
Provider key.
virtual ~QgsSubsetStringEditorProvider()
Destructor.
Represents a vector layer which manages a vector based data sets.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53
#define SIP_FACTORY
Definition qgis_sip.h:76