QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
qgslayermetadatasourceselectprovider.h
Go to the documentation of this file.
1/***************************************************************************
2 qgslayermetadatasourceselectprovider.h - QgsLayerMetadataSourceSelectProvider
3
4 ---------------------
5 begin : 6.9.2022
6 copyright : (C) 2022 by Alessandro Pasotti
7 email : elpaso at itopen dot it
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#ifndef QGSLAYERMETADATASOURCESELECTPROVIDER_H
17#define QGSLAYERMETADATASOURCESELECTPROVIDER_H
18
20#include "qgis_gui.h"
21
22#define SIP_NO_FILE
23
24
33{
34
35 public:
37
38 // QgsSourceSelectProvider interface
39 public:
40 QString providerKey() const override;
41 QString text() const override;
42 QString toolTip() const override;
43 QIcon icon() const override;
44 QgsAbstractDataSourceWidget *createDataSourceWidget( QWidget *parent, Qt::WindowFlags fl, QgsProviderRegistry::WidgetMode widgetMode ) const override;
45 int ordering() const override;
46};
47
48#endif // QGSLAYERMETADATASOURCESELECTPROVIDER_H
Abstract base Data Source Widget to create connections and add layers This class provides common func...
Source select provider for layer metadata.
WidgetMode
Different ways a source select dialog can be used.
This is the interface for those who want to add entries to the QgsDataSourceManagerDialog.
virtual QString providerKey() const =0
Data Provider key.
virtual int ordering() const
Ordering: the source select provider registry will be able to sort the source selects (ascending) usi...
virtual QgsAbstractDataSourceWidget * createDataSourceWidget(QWidget *parent=nullptr, Qt::WindowFlags fl=Qt::Widget, QgsProviderRegistry::WidgetMode widgetMode=QgsProviderRegistry::WidgetMode::Embedded) const =0
Create a new instance of QgsAbstractDataSourceWidget (or nullptr).
virtual QIcon icon() const =0
Creates a new instance of an QIcon for the menu item entry.
virtual QString text() const =0
Text for the menu item entry, it will be visible to the user so make sure it's translatable.
virtual QString toolTip() const
Text for the tooltip menu item entry, it will be visible to the user so make sure it's translatable.