Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Add a very trivial registry GeoCMS providers to app
Currently it's only used to register GeoNode source select dialogs. As additional GeoCMS handling is added to QGIS we can start refining this class to handle common functionality. For now, it's locked away in app so we don't need to worry about frozen API restricting us when this happens.
- Loading branch information
1 parent
15f9241
commit 33b1380
Showing
6 changed files
with
103 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/*************************************************************************** | ||
qgsgeocmsproviderregistry.cpp | ||
----------------------------- | ||
begin : September 2017 | ||
copyright : (C) 2017 by Nyall Dawson | ||
email : nyall dot dawson at gmail 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 "qgsgeocmsproviderregistry.h" | ||
#include "qgsgui.h" | ||
#include "qgssourceselectproviderregistry.h" | ||
#include "geocms/geonode/qgsgeonodesourceselect.h" | ||
|
||
QgsGeoCmsProviderRegistry::QgsGeoCmsProviderRegistry() | ||
{ | ||
init(); | ||
} | ||
|
||
void QgsGeoCmsProviderRegistry::init() | ||
{ | ||
QgsGui::sourceSelectProviderRegistry()->addProvider( new QgsGeoNodeSourceSelectProvider() ); | ||
} |
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,49 @@ | ||
/*************************************************************************** | ||
qgsgeocmsproviderregistry.h | ||
--------------------------- | ||
begin : September 2017 | ||
copyright : (C) 2017 by Nyall Dawson | ||
email : nyall dot dawson at gmail 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 QGSGEOCMSPROVIDERREGISTRY_H | ||
#define QGSGEOCMSPROVIDERREGISTRY_H | ||
|
||
#include "qgis.h" | ||
|
||
/** | ||
* \ingroup app | ||
* | ||
* This is a trivial registry for GeoCMS providers. It will be 'fleshed out' | ||
* as additional GeoCMS providers are added, and the required common functionality | ||
* between the different providers is determined. | ||
* | ||
* \since QGIS 3.0 | ||
*/ | ||
class QgsGeoCmsProviderRegistry | ||
{ | ||
|
||
public: | ||
QgsGeoCmsProviderRegistry(); | ||
|
||
//! QgsGeoCmsProviderRegistry cannot be copied. | ||
QgsGeoCmsProviderRegistry( const QgsGeoCmsProviderRegistry &rh ) = delete; | ||
|
||
//! QgsGeoCmsProviderRegistry cannot be copied. | ||
QgsGeoCmsProviderRegistry &operator=( const QgsGeoCmsProviderRegistry &rh ) = delete; | ||
|
||
private: | ||
|
||
//! Initializes the registry | ||
void init(); | ||
|
||
}; | ||
|
||
#endif // QGSGEOCMSPROVIDERREGISTRY_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