QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
qgslayermetadatasourceselectprovider.cpp
Go to the documentation of this file.
1/***************************************************************************
2 qgslayermetadatasourceselectprovider.cpp - 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 ***************************************************************************/
18#include "qgsapplication.h"
19
25
27{
28 return QStringLiteral( "layermetadata" );
29
30}
31
33{
34 return QObject::tr( "Metadata Search" );
35}
36
38{
39 return QObject::tr( "Find layers by metadata" );
40}
41
43{
44 return QgsApplication::getThemeIcon( QStringLiteral( "search.svg" ) );
45}
46
48{
49 return new QgsLayerMetadataSearchWidget( parent, fl, widgetMode );
50}
51
Abstract base Data Source Widget to create connections and add layers This class provides common func...
static QIcon getThemeIcon(const QString &name, const QColor &fillColor=QColor(), const QColor &strokeColor=QColor())
Helper to get a theme icon.
The QgsLayerMetadataSearchWidget class offers layer metadata search and filtering.
QgsAbstractDataSourceWidget * createDataSourceWidget(QWidget *parent, Qt::WindowFlags fl, QgsProviderRegistry::WidgetMode widgetMode) const override
Create a new instance of QgsAbstractDataSourceWidget (or nullptr).
QString toolTip() const override
Text for the tooltip menu item entry, it will be visible to the user so make sure it's translatable.
QString providerKey() const override
Data Provider key.
QIcon icon() const override
Creates a new instance of an QIcon for the menu item entry.
QString text() const override
Text for the menu item entry, it will be visible to the user so make sure it's translatable.
int ordering() const override
Ordering: the source select provider registry will be able to sort the source selects (ascending) usi...
WidgetMode
Different ways a source select dialog can be used.
This is the interface for those who want to add entries to the QgsDataSourceManagerDialog.
@ OrderSearchProvider
Starting point for search providers (e.g. Layer Metadata)