QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
qgslayermetadatasearchwidget.h
Go to the documentation of this file.
1/***************************************************************************
2 qgslayermetadatasearchwidget.h - QgsLayerMetadataSearchWidget
3
4 ---------------------
5 begin : 1.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 QGSLAYERMETADATASEARCHWIDGET_H
17#define QGSLAYERMETADATASEARCHWIDGET_H
18
19#include "qgis_gui.h"
20#include <QWidget>
21#include "ui_qgslayermetadatasearchwidget.h"
22#include "qgsfeedback.h"
25
26class QgsMapCanvas;
28class QgsLayerMetadataResultsModel;
29
36class GUI_EXPORT QgsLayerMetadataSearchWidget : public QgsAbstractDataSourceWidget, private Ui::QgsLayerMetadataSearchWidget
37{
38 Q_OBJECT
39 public:
40
44 explicit QgsLayerMetadataSearchWidget( QWidget *parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags(), QgsProviderRegistry::WidgetMode widgetMode = QgsProviderRegistry::WidgetMode::Standalone );
45
46 void setMapCanvas( QgsMapCanvas *mapCanvas ) override;
47
48 public slots:
49
51 void updateExtentFilter( int index );
52
53 void refresh() override;
54 void addButtonClicked() override;
55 void reset() override;
56
57 private slots:
58 void showHelp();
59
60 private:
61
62 QgsLayerMetadataResultsProxyModel *mProxyModel = nullptr;
63 bool mIsLoading = false;
64 QgsLayerMetadataResultsModel *mSourceModel = nullptr;
65
66 // QWidget interface
67 protected:
68 void showEvent( QShowEvent *event ) override;
69};
70
71#endif // QGSLAYERMETADATASEARCHWIDGET_H
Abstract base Data Source Widget to create connections and add layers This class provides common func...
virtual void setMapCanvas(QgsMapCanvas *mapCanvas)
Sets the dialog map canvas.
virtual void addButtonClicked()
Triggered when the add button is clicked, the add layer signal is emitted Concrete classes should imp...
virtual void refresh()
Triggered when the provider's connections need to be refreshed The default implementation does nothin...
virtual void reset()
Called when this source select widget is being shown in a "new and clean" dialog.
The QgsLayerMetadataResultsProxyModel class is a proxy model for QgsLayerMetadataResultsModel,...
The QgsLayerMetadataSearchWidget class offers layer metadata search and filtering.
Map canvas is a class for displaying all GIS data types on a canvas.
WidgetMode
Different ways a source select dialog can be used.
@ Standalone
Basic mode when the widget is used as a standalone dialog.