Abstract base Data Source Widget to create connections and add layers This class provides common functionality and the interface for all source select dialogs used by data providers to configure data sources and add layers.
More...
#include <qgsabstractdatasourcewidget.h>
|
virtual void | addButtonClicked () |
| Triggered when the add button is clicked, the add layer signal is emitted Concrete classes should implement the right behavior depending on the layer being added. More...
|
|
virtual void | refresh () |
| Triggered when the provider's connections need to be refreshed The default implementation does nothing. More...
|
|
virtual void | reset () |
| Called when this source select widget is being shown in a "new and clean" dialog. More...
|
|
|
void | addDatabaseLayers (const QStringList &paths, const QString &providerKey) |
| Emitted when a DB layer has been selected for addition. More...
|
|
void | addMeshLayer (const QString &url, const QString &baseName, const QString &providerKey) |
| Emitted when a mesh layer has been selected for addition. More...
|
|
void | addPointCloudLayer (const QString &url, const QString &baseName, const QString &providerKey) |
| Emitted when a point cloud layer has been selected for addition. More...
|
|
void | addRasterLayer (const QString &rasterLayerPath, const QString &baseName, const QString &providerKey) |
| Emitted when a raster layer has been selected for addition. More...
|
|
void | addVectorLayer (const QString &uri, const QString &layerName, const QString &providerKey=QString()) |
| Emitted when a vector layer has been selected for addition. More...
|
|
void | addVectorLayers (const QStringList &layerList, const QString &encoding, const QString &dataSourceType) |
| Emitted when one or more OGR supported layers are selected for addition. More...
|
|
void | addVectorTileLayer (const QString &url, const QString &baseName) |
| Emitted when a vector tile layer has been selected for addition. More...
|
|
void | connectionsChanged () |
| Emitted when the provider's connections have changed This signal is normally forwarded the app and used to refresh browser items. More...
|
|
void | enableButtons (bool enable) |
| Emitted when the ok/add buttons should be enabled/disabled. More...
|
|
Q_DECL_DEPRECATED void | progress (int, int) |
| Emitted when a progress dialog is shown by the provider dialog. More...
|
|
void | progressMessage (QString message) |
| Emitted when a progress dialog is shown by the provider dialog. More...
|
|
void | pushMessage (const QString &title, const QString &message, const Qgis::MessageLevel level=Qgis::MessageLevel::Info) |
| Emitted when a message with title and level must be shown to the user using the parent visible message bar. More...
|
|
void | replaceVectorLayer (const QString &oldId, const QString &source, const QString &name, const QString &provider) |
| Emitted when a layer needs to be replaced. More...
|
|
Abstract base Data Source Widget to create connections and add layers This class provides common functionality and the interface for all source select dialogs used by data providers to configure data sources and add layers.
- Since
- QGIS 3.0
Definition at line 43 of file qgsabstractdatasourcewidget.h.
◆ QgsAbstractDataSourceWidget()
QgsAbstractDataSourceWidget::QgsAbstractDataSourceWidget |
( |
QWidget * |
parent = nullptr , |
|
|
Qt::WindowFlags |
fl = QgsGuiUtils::ModalDialogFlags , |
|
|
QgsProviderRegistry::WidgetMode |
widgetMode = QgsProviderRegistry::WidgetMode::None |
|
) |
| |
|
protected |
◆ addButton()
QPushButton* QgsAbstractDataSourceWidget::addButton |
( |
| ) |
const |
|
inlineprotected |
◆ addButtonClicked
void QgsAbstractDataSourceWidget::addButtonClicked |
( |
| ) |
|
|
virtualslot |
Triggered when the add button is clicked, the add layer signal is emitted Concrete classes should implement the right behavior depending on the layer being added.
Definition at line 71 of file qgsabstractdatasourcewidget.cpp.
◆ addDatabaseLayers
void QgsAbstractDataSourceWidget::addDatabaseLayers |
( |
const QStringList & |
paths, |
|
|
const QString & |
providerKey |
|
) |
| |
|
signal |
Emitted when a DB layer has been selected for addition.
◆ addMeshLayer
void QgsAbstractDataSourceWidget::addMeshLayer |
( |
const QString & |
url, |
|
|
const QString & |
baseName, |
|
|
const QString & |
providerKey |
|
) |
| |
|
signal |
Emitted when a mesh layer has been selected for addition.
- Since
- QGIS 3.4
◆ addPointCloudLayer
void QgsAbstractDataSourceWidget::addPointCloudLayer |
( |
const QString & |
url, |
|
|
const QString & |
baseName, |
|
|
const QString & |
providerKey |
|
) |
| |
|
signal |
Emitted when a point cloud layer has been selected for addition.
- Since
- QGIS 3.18
◆ addRasterLayer
void QgsAbstractDataSourceWidget::addRasterLayer |
( |
const QString & |
rasterLayerPath, |
|
|
const QString & |
baseName, |
|
|
const QString & |
providerKey |
|
) |
| |
|
signal |
Emitted when a raster layer has been selected for addition.
◆ addVectorLayer
void QgsAbstractDataSourceWidget::addVectorLayer |
( |
const QString & |
uri, |
|
|
const QString & |
layerName, |
|
|
const QString & |
providerKey = QString() |
|
) |
| |
|
signal |
Emitted when a vector layer has been selected for addition.
If providerKey is not specified, the default provider key associated with the source will be used.
◆ addVectorLayers
void QgsAbstractDataSourceWidget::addVectorLayers |
( |
const QStringList & |
layerList, |
|
|
const QString & |
encoding, |
|
|
const QString & |
dataSourceType |
|
) |
| |
|
signal |
Emitted when one or more OGR supported layers are selected for addition.
- Parameters
-
layerList | list of layers protocol URIs |
encoding | encoding |
dataSourceType | string (can be "file" or "database") |
◆ addVectorTileLayer
void QgsAbstractDataSourceWidget::addVectorTileLayer |
( |
const QString & |
url, |
|
|
const QString & |
baseName |
|
) |
| |
|
signal |
Emitted when a vector tile layer has been selected for addition.
- Since
- QGIS 3.14
◆ browserModel()
◆ connectionsChanged
void QgsAbstractDataSourceWidget::connectionsChanged |
( |
| ) |
|
|
signal |
Emitted when the provider's connections have changed This signal is normally forwarded the app and used to refresh browser items.
◆ enableButtons
void QgsAbstractDataSourceWidget::enableButtons |
( |
bool |
enable | ) |
|
|
signal |
Emitted when the ok/add buttons should be enabled/disabled.
◆ mapCanvas()
const QgsMapCanvas * QgsAbstractDataSourceWidget::mapCanvas |
( |
| ) |
const |
|
protected |
◆ progress
Q_DECL_DEPRECATED void QgsAbstractDataSourceWidget::progress |
( |
int |
, |
|
|
int |
|
|
) |
| |
|
signal |
Emitted when a progress dialog is shown by the provider dialog.
- Deprecated:
- Since QGIS 3.4 this signal is no longer used. Use QgsProxyProgressTask instead to show progress reports.
◆ progressMessage
void QgsAbstractDataSourceWidget::progressMessage |
( |
QString |
message | ) |
|
|
signal |
Emitted when a progress dialog is shown by the provider dialog.
◆ pushMessage
void QgsAbstractDataSourceWidget::pushMessage |
( |
const QString & |
title, |
|
|
const QString & |
message, |
|
|
const Qgis::MessageLevel |
level = Qgis::MessageLevel::Info |
|
) |
| |
|
signal |
Emitted when a message with title and level must be shown to the user using the parent visible message bar.
- Since
- QGIS 3.14
◆ refresh
virtual void QgsAbstractDataSourceWidget::refresh |
( |
| ) |
|
|
inlinevirtualslot |
◆ replaceVectorLayer
void QgsAbstractDataSourceWidget::replaceVectorLayer |
( |
const QString & |
oldId, |
|
|
const QString & |
source, |
|
|
const QString & |
name, |
|
|
const QString & |
provider |
|
) |
| |
|
signal |
Emitted when a layer needs to be replaced.
- Parameters
-
oldId | old layer ID |
source | URI of the layer |
name | of the layer |
provider | key |
◆ reset
void QgsAbstractDataSourceWidget::reset |
( |
| ) |
|
|
virtualslot |
Called when this source select widget is being shown in a "new and clean" dialog.
The data source manager recycles existing source select widgets but will call this method on every reopening. This should clear any selection that has previously been done.
- Since
- QGIS 3.10
Reimplemented in QgsOWSSourceSelect.
Definition at line 75 of file qgsabstractdatasourcewidget.cpp.
◆ setBrowserModel()
void QgsAbstractDataSourceWidget::setBrowserModel |
( |
QgsBrowserModel * |
model | ) |
|
◆ setMapCanvas()
void QgsAbstractDataSourceWidget::setMapCanvas |
( |
const QgsMapCanvas * |
mapCanvas | ) |
|
Store a pointer to the map canvas to retrieve extent and CRS Used to select an appropriate CRS and possibly to retrieve data only in the current extent.
Definition at line 61 of file qgsabstractdatasourcewidget.cpp.
◆ setupButtons()
void QgsAbstractDataSourceWidget::setupButtons |
( |
QDialogButtonBox * |
buttonBox | ) |
|
|
protected |
◆ widgetMode()
The documentation for this class was generated from the following files: