Skip to content
Permalink
Browse files

Rebase and partially revert 9bae832

All signals are now in the base class, even if only
a subset of available providers actually emits them.

This way we can handle all source select dialogs
the same way, regardless if they are vector, DB
or raster (or others).
  • Loading branch information
elpaso committed Jul 18, 2017
1 parent e83ef2e commit bd925cd64831cd9d657386f9717d6d0e4b7433e2
@@ -67,6 +67,16 @@ Emitted when a raster layer has been selected for addition
void addVectorLayer( const QString &uri, const QString &layerName );
%Docstring
Emitted when a vector layer has been selected for addition
%End

void progress( int, int );
%Docstring
Emitted when a progress dialog is shown by the provider dialog
%End

void progressMessage( QString message );
%Docstring
Emitted when a progress dialog is shown by the provider dialog
%End

protected:
@@ -112,8 +112,6 @@ Stores the selected datasource whenerver it is changed
Add some default wms servers to the list
%End

void on_mDialogButtonBox_helpRequested();

protected:

virtual QList<QgsOWSSourceSelect::SupportedFormat> providerFormats();
@@ -76,6 +76,12 @@ class GUI_EXPORT QgsAbstractDataSourceWidget : public QDialog
//! Emitted when a vector layer has been selected for addition
void addVectorLayer( const QString &uri, const QString &layerName );

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

//! Emitted when a progress dialog is shown by the provider dialog
void progressMessage( QString message );

protected:

//! Constructor
@@ -104,10 +104,10 @@ class GUI_EXPORT QgsDataSourceManagerDialog : public QgsOptionsDialogBase, priva
//! Emitted when a connection has changed inside the provider dialogs
//! This signal is normally forwarded to the application to notify other
//! browsers that they need to refresh their connections list
void connectionsChanged( );
void connectionsChanged();
//! One or more provider connections have changed and the
//! dialogs should be refreshed
void providerDialogsRefreshRequested( );
void providerDialogsRefreshRequested();

private:
// Return the dialog from the provider
@@ -110,8 +110,6 @@ class GUI_EXPORT QgsOWSSourceSelect : public QgsAbstractDataSourceWidget, protec
//! Add some default wms servers to the list
void on_mAddDefaultButton_clicked();

void on_mDialogButtonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }

protected:

/**
@@ -30,11 +30,6 @@ class QgsAmsSourceSelect: public QgsArcGisServiceSourceSelect
public:
QgsAmsSourceSelect( QWidget *parent, Qt::WindowFlags fl, QgsProviderRegistry::WidgetMode widgetMode = QgsProviderRegistry::WidgetMode::None );

signals:
void addRasterLayer( QString const &rasterLayerPath,
QString const &baseName,
QString const &providerKey );

protected:
bool connectToService( const QgsOwsConnection &connection ) override;
QString getLayerURI( const QgsOwsConnection &connection,
@@ -458,7 +458,7 @@ void QgsDb2SourceSelect::addTables()
else
{
emit addDatabaseLayers( mSelectedTables, QStringLiteral( "DB2" ) );
if ( !mHoldDialogOpen->isChecked() && mWidgetMode == QgsProviderRegistry::WidgetMode::None )
if ( !mHoldDialogOpen->isChecked() && QgsAbstractDataSourceWidget::widgetMode() == QgsProviderRegistry::WidgetMode::None )
{
accept();
}
@@ -110,8 +110,6 @@ class QgsDb2SourceSelect : public QgsAbstractDataSourceWidget, private Ui::QgsDb

signals:
void addGeometryColumn( QgsDb2LayerProperty );
void progress( int, int );
void progressMessage( QString );

public slots:
//! Determines the tables the user selected and closes the dialog
@@ -453,7 +453,7 @@ void QgsMssqlSourceSelect::addTables()
else
{
emit addDatabaseLayers( mSelectedTables, QStringLiteral( "mssql" ) );
if ( !mHoldDialogOpen->isChecked() && mWidgetMode == QgsProviderRegistry::WidgetMode::None )
if ( !mHoldDialogOpen->isChecked() && QgsAbstractDataSourceWidget::widgetMode() == QgsProviderRegistry::WidgetMode::None )
{
accept();
}
@@ -80,8 +80,6 @@ class QgsMssqlSourceSelect : public QgsAbstractDataSourceWidget, private Ui::Qgs

signals:
void addGeometryColumn( const QgsMssqlLayerProperty & );
void progress( int, int );
void progressMessage( QString );

public slots:

0 comments on commit bd925cd

Please sign in to comment.
You can’t perform that action at this time.