QGIS API Documentation 3.41.0-Master (cea29feecf2)
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:
43 explicit QgsLayerMetadataSearchWidget( QWidget *parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags(), QgsProviderRegistry::WidgetMode widgetMode = QgsProviderRegistry::WidgetMode::Standalone );
44
45 void setMapCanvas( QgsMapCanvas *mapCanvas ) override;
46
47 public slots:
48
50 void updateExtentFilter( int index );
51
52 void refresh() override;
53 void addButtonClicked() override;
54 void reset() override;
55
56 private slots:
57 void showHelp();
58
59 private:
60 QgsLayerMetadataResultsProxyModel *mProxyModel = nullptr;
61 bool mIsLoading = false;
62 QgsLayerMetadataResultsModel *mSourceModel = nullptr;
63
64 // QWidget interface
65 protected:
66 void showEvent( QShowEvent *event ) override;
67};
68
69#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.