Skip to content

Commit 7cd7f16

Browse files
committed
Added last missing signal replaceVectorLayer
This is only used by virtual layers, but it might be handy for others too and now I can start to remove all specialized source select add methods from the datas source manager dialog. This is only the first step: next is looping through the source select provider registry to get all needed GUI elements for the dialog.
1 parent d4868b3 commit 7cd7f16

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

python/gui/qgsabstractdatasourcewidget.sip

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,16 @@ Emitted when a vector layer has been selected for addition
9090
\param dataSourceType string (can be "file" or "database")
9191
%End
9292

93+
void replaceVectorLayer( const QString &oldId, const QString &source, const QString &name, const QString &provider );
94+
%Docstring
95+
Emitted when a layer needs to be replaced
96+
\param oldId old layer ID
97+
\param source URI of the layer
98+
\params name of the layer
99+
\params provider key
100+
%End
101+
102+
93103
void progress( int, int );
94104
%Docstring
95105
Emitted when a progress dialog is shown by the provider dialog

src/gui/qgsabstractdatasourcewidget.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,15 @@ class GUI_EXPORT QgsAbstractDataSourceWidget : public QDialog
9393
*/
9494
void addVectorLayers( const QStringList &layerList, const QString &encoding, const QString &dataSourceType );
9595

96+
/** Emitted when a layer needs to be replaced
97+
* \param oldId old layer ID
98+
* \param source URI of the layer
99+
* \params name of the layer
100+
* \params provider key
101+
*/
102+
void replaceVectorLayer( const QString &oldId, const QString &source, const QString &name, const QString &provider );
103+
104+
96105
//! Emitted when a progress dialog is shown by the provider dialog
97106
void progress( int, int );
98107

0 commit comments

Comments
 (0)