Skip to content
Permalink
Browse files

Adds connectionsChanged signal to iface

This is meant to be used by plugins (DBManager is the
first candidate) to notify the application that
the GUI elements that handle connections needs to
be updated (i.e. the data source manager dialog
and the browsers)
  • Loading branch information
elpaso committed Sep 14, 2017
1 parent d894054 commit 91a98902a10d20e6cf12fe370cc65fe3dde7d428
Showing with 20 additions and 0 deletions.
  1. +9 −0 python/gui/qgisinterface.sip
  2. +2 −0 src/app/qgisapp.cpp
  3. +9 −0 src/gui/qgisinterface.h
@@ -1256,6 +1256,15 @@ Get timeout for timed messages: default of 5 seconds
\note
added in version 2.7
%End

void connectionsChanged();
%Docstring
Emitted when connections have changed, this signal is forwarded
to the GUI elements that needs to be updated (i.e. the source
select dialogs and the browser widgets)
.. versionadded:: 3.0
%End

};

/************************************************************************
@@ -934,6 +934,8 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
mInternalClipboard = new QgsClipboard; // create clipboard
connect( mInternalClipboard, &QgsClipboard::changed, this, &QgisApp::clipboardChanged );
mQgisInterface = new QgisAppInterface( this ); // create the interfce
// Forward signal
connect( mQgisInterface, &QgisInterface::connectionsChanged, this, &QgisApp::connectionsChanged );

#ifdef Q_OS_MAC
// action for Window menu (create before generating WindowTitleChange event))
@@ -796,6 +796,15 @@ class GUI_EXPORT QgisInterface : public QObject
* added in version 2.7
*/
void layerSavedAs( QgsMapLayer *l, const QString &path );

/**
* Emitted when connections have changed, this signal is forwarded
* to the GUI elements that needs to be updated (i.e. the source
* select dialogs and the browser widgets)
* \since QGIS 3.0
*/
void connectionsChanged();

};
Q_NOWARN_DEPRECATED_POP

0 comments on commit 91a9890

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