-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bugfix] Sync the dialogs connections when changed from the browser
For now it's only for WMS but you get the idea. There is a new abstract base class for the source select dialogs, that will grow with common behavior for all the select dialogs. Signals are forwarded from the (root) data items to the app and then delivered to the various browser instances and to the unified layer dialog. A change in one of the browser items should trigger a refresh in all the other browsers and dialogs.
- Loading branch information
Showing
18 changed files
with
166 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/*************************************************************************** | ||
qgssourceselect.cpp - base class for source selector widgets | ||
------------------- | ||
begin : 10 July 2017 | ||
original : (C) 2017 by Alessandro Pasotti email : apasotti at boundlessgeo dot com | ||
***************************************************************************/ | ||
|
||
/*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#include "qgssourceselect.h" | ||
|
||
QgsSourceSelect::QgsSourceSelect( QWidget *parent, Qt::WindowFlags fl, QgsProviderRegistry::WidgetMode widgetMode ): | ||
QDialog( parent, fl ), | ||
mWidgetMode( widgetMode ) | ||
{ | ||
|
||
} | ||
|
||
QgsSourceSelect::~QgsSourceSelect() | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/*************************************************************************** | ||
qgssourceselect.h - base class for source selector widgets | ||
------------------- | ||
begin : 10 July 2017 | ||
original : (C) 2017 by Alessandro Pasotti email : apasotti at boundlessgeo dot com | ||
***************************************************************************/ | ||
|
||
/*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#ifndef QGSSOURCESELECT_H | ||
#define QGSSOURCESELECT_H | ||
#include "qgis_sip.h" | ||
#include "qgis.h" | ||
#include "qgis_gui.h" | ||
|
||
#include "qgsproviderregistry.h" | ||
#include "qgsguiutils.h" | ||
|
||
#include <QDialog> | ||
|
||
/** \ingroup gui | ||
* \brief Abstract base Dialog to create connections and add layers | ||
* This class must provide common functionality and the interface for all | ||
* source select dialogs used by data providers to configure data sources | ||
* and add layers. | ||
*/ | ||
class GUI_EXPORT QgsSourceSelect : public QDialog | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
|
||
//! Constructor | ||
QgsSourceSelect( QWidget *parent SIP_TRANSFERTHIS = nullptr, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags, QgsProviderRegistry::WidgetMode widgetMode = QgsProviderRegistry::WidgetMode::None ); | ||
|
||
//! Destructor | ||
~QgsSourceSelect( ); | ||
|
||
//! Return the widget mode | ||
QgsProviderRegistry::WidgetMode widgetMode( ) { return mWidgetMode; } | ||
|
||
public slots: | ||
|
||
//! Triggered when the provider's connections need to be refreshed | ||
virtual void refresh( ) = 0; | ||
|
||
signals: | ||
|
||
//! Emitted when the provider's connections have changed | ||
void connectionsChanged(); | ||
|
||
private: | ||
|
||
QgsProviderRegistry::WidgetMode mWidgetMode; | ||
}; | ||
|
||
#endif // QGSSOURCESELECT_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.