Skip to content
Permalink
Browse files

add the registry to QgsApplication

  • Loading branch information
3nids committed May 14, 2020
1 parent b1920bb commit 75a991c09b773f3cfe746aa54300d07f8c498e01
Showing with 23 additions and 0 deletions.
  1. +7 −0 python/core/auto_generated/qgsapplication.sip.in
  2. +8 −0 src/core/qgsapplication.cpp
  3. +8 −0 src/core/qgsapplication.h
@@ -857,6 +857,13 @@ Gets the registry of available scalebar renderers.
Returns registry of available project storage implementations.

.. versionadded:: 3.2
%End

static QgsBasemapPathRegistry *basemapPathRegistry() /KeepReference/;
%Docstring
Returns the registry of basemaps paths

.. versionadded:: 3.14
%End

static QString nullRepresentation();
@@ -15,6 +15,7 @@

#include "qgsapplication.h"
#include "qgsauthmanager.h"
#include "qgsbasemappathregistry.h"
#include "qgsdataitemproviderregistry.h"
#include "qgsexception.h"
#include "qgsgeometry.h"
@@ -2235,6 +2236,11 @@ QgsProjectStorageRegistry *QgsApplication::projectStorageRegistry()
return members()->mProjectStorageRegistry;
}

QgsBasemapPathRegistry *QgsApplication::basemapPathRegistry()
{
return members()->mBasemapPathRegistry;
}

QgsApplication::ApplicationMembers::ApplicationMembers()
{
// don't use initializer lists or scoped pointers - as more objects are added here we
@@ -2369,6 +2375,7 @@ QgsApplication::ApplicationMembers::ApplicationMembers()
mScaleBarRendererRegistry = new QgsScaleBarRendererRegistry();
mProfiler->end();
}
mBasemapPathRegistry = new QgsBasemapPathRegistry();
}

QgsApplication::ApplicationMembers::~ApplicationMembers()
@@ -2402,6 +2409,7 @@ QgsApplication::ApplicationMembers::~ApplicationMembers()
delete mNumericFormatRegistry;
delete mBookmarkManager;
delete mConnectionRegistry;
delete mBasemapPathRegistry;
}

QgsApplication::ApplicationMembers *QgsApplication::members()
@@ -32,6 +32,7 @@ class QgsFieldFormatterRegistry;
class QgsColorSchemeRegistry;
class QgsPaintEffectRegistry;
class QgsProjectStorageRegistry;
class QgsBasemapPathRegistry;
class QgsRendererRegistry;
class QgsSvgCache;
class QgsImageCache;
@@ -789,6 +790,12 @@ class CORE_EXPORT QgsApplication : public QApplication
*/
static QgsProjectStorageRegistry *projectStorageRegistry() SIP_KEEPREFERENCE;

/**
* Returns the registry of basemaps paths
* \since QGIS 3.14
*/
static QgsBasemapPathRegistry *basemapPathRegistry() SIP_KEEPREFERENCE;

/**
* This string is used to represent the value `NULL` throughout QGIS.
*
@@ -913,6 +920,7 @@ class CORE_EXPORT QgsApplication : public QApplication
QgsActionScopeRegistry *mActionScopeRegistry = nullptr;
QgsAnnotationRegistry *mAnnotationRegistry = nullptr;
QgsColorSchemeRegistry *mColorSchemeRegistry = nullptr;
QgsBasemapPathRegistry *mBasemapPathRegistry = nullptr;
QgsNumericFormatRegistry *mNumericFormatRegistry = nullptr;
QgsFieldFormatterRegistry *mFieldFormatterRegistry = nullptr;
QgsGpsConnectionRegistry *mGpsConnectionRegistry = nullptr;

0 comments on commit 75a991c

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