Skip to content

Commit

Permalink
Added last missing signal replaceVectorLayer
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
elpaso committed Sep 3, 2017
1 parent d4868b3 commit 7cd7f16
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
10 changes: 10 additions & 0 deletions python/gui/qgsabstractdatasourcewidget.sip
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,16 @@ Emitted when a vector layer has been selected for addition
\param dataSourceType string (can be "file" or "database")
%End

void replaceVectorLayer( const QString &oldId, const QString &source, const QString &name, const QString &provider );
%Docstring
Emitted when a layer needs to be replaced
\param oldId old layer ID
\param source URI of the layer
\params name of the layer
\params provider key
%End


void progress( int, int );
%Docstring
Emitted when a progress dialog is shown by the provider dialog
Expand Down
9 changes: 9 additions & 0 deletions src/gui/qgsabstractdatasourcewidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,15 @@ class GUI_EXPORT QgsAbstractDataSourceWidget : public QDialog
*/
void addVectorLayers( const QStringList &layerList, const QString &encoding, const QString &dataSourceType );

/** Emitted when a layer needs to be replaced
* \param oldId old layer ID
* \param source URI of the layer
* \params name of the layer
* \params provider key
*/
void replaceVectorLayer( const QString &oldId, const QString &source, const QString &name, const QString &provider );


//! Emitted when a progress dialog is shown by the provider dialog
void progress( int, int );

Expand Down

0 comments on commit 7cd7f16

Please sign in to comment.