QGIS/python/core/auto_generated/qgsapplication.sip.in

1163 lines
32 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsapplication.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsApplication : QApplication
{
%Docstring(signature="appended")
Extends QApplication to provide access to QGIS specific resources such
as theme paths, database paths etc.
This is a subclass of QApplication and should be instantiated in place of
QApplication. Most methods are static in keeping with the design of QApplication.
This class hides platform-specific path information and provides
a portable way of referencing specific files and directories.
Ideally, hard-coded paths should appear only here and not in other modules
so that platform-conditional code is minimized and paths are easier
to change due to centralization.
%End
%TypeHeaderCode
#include "qgsapplication.h"
%End
%TypeCode
// Convert a Python argv list to a conventional C argc count and argv array.
static char **qtgui_ArgvToC( PyObject *argvlist, int &argc )
{
char **argv;
argc = PyList_GET_SIZE( argvlist );
// Allocate space for two copies of the argument pointers, plus the
// terminating NULL.
if ( ( argv = ( char ** )sipMalloc( 2 * ( argc + 1 ) * sizeof( char * ) ) ) == NULL )
return NULL;
// Convert the list.
for ( int a = 0; a < argc; ++a )
{
char *arg;
// Get the argument and allocate memory for it.
if ( ( arg = PyBytes_AsString( PyList_GET_ITEM( argvlist, a ) ) ) == NULL ||
( argv[a] = ( char * )sipMalloc( strlen( arg ) + 1 ) ) == NULL )
return NULL;
// Copy the argument and save a pointer to it.
strcpy( argv[a], arg );
argv[a + argc + 1] = argv[a];
}
argv[argc + argc + 1] = argv[argc] = NULL;
return argv;
}
// Remove arguments from the Python argv list that have been removed from the
// C argv array.
static void qtgui_UpdatePyArgv( PyObject *argvlist, int argc, char **argv )
{
for ( int a = 0, na = 0; a < argc; ++a )
{
// See if it was removed.
if ( argv[na] == argv[a + argc + 1] )
++na;
else
PyList_SetSlice( argvlist, na, na + 1, NULL );
}
}
%End
public:
enum StyleSheetType
{
Qt,
WebBrowser,
};
static const char *QGIS_ORGANIZATION_NAME;
static const char *QGIS_ORGANIZATION_DOMAIN;
static const char *QGIS_APPLICATION_NAME;
QgsApplication( SIP_PYLIST argv, bool GUIenabled, QString profileFolder = QString(), QString platformName = "external" ) / PostHook = __pyQtQAppHook__ / [( int &argc, char **argv, bool GUIenabled, const QString &profileFolder = QString(), const QString &platformName = "desktop" )];
%Docstring
Constructor for QgsApplication.
:param argv: command line arguments
:param GUIenabled: set to ``True`` if a GUI application is required, or ``False`` for a console only application
:param profileFolder: optional string representing the profile to load at startup
:param platformName: the QGIS platform name, e.g., "desktop", "server", "qgis_process" or "external" (for external CLI scripts)
%End
%MethodCode
// The Python interface is a list of argument strings that is modified.
int argc;
char **argv;
// Convert the list.
if ( ( argv = qtgui_ArgvToC( a0, argc ) ) == NULL )
sipIsErr = 1;
else
{
// Create it now the arguments are right.
static int nargc = argc;
sipCpp = new sipQgsApplication( nargc, argv, a1, *a2, *a3 );
// Now modify the original list.
qtgui_UpdatePyArgv( a0, argc, argv );
}
%End
~QgsApplication();
static QgsApplication *instance();
%Docstring
Returns the singleton instance of the QgsApplication.
%End
virtual bool event( QEvent *event );
%Docstring
Watch for QFileOpenEvent.
%End
virtual bool notify( QObject *receiver, QEvent *event );
%Docstring
Catch exceptions when sending event to receiver.
%End
static void setFileOpenEventReceiver( QObject *receiver );
%Docstring
Sets the FileOpen event receiver
%End
static void setThemeName( const QString &themeName );
%Docstring
Set the active theme to the specified theme.
The theme name should be a single word e.g. 'default','classic'.
The theme search path usually will be pkgDataPath + "/themes/" + themName + "/"
but plugin writers etc can use :py:func:`~QgsApplication.themeName` as a basis for searching
for resources in their own datastores e.g. a Qt4 resource bundle.
.. note::
A basic test will be carried out to ensure the theme search path
based on the supplied theme name exists. If it does not the theme name will
be reverted to 'default'.
%End
static QString resolvePkgPath();
%Docstring
Calculate the application pkg path
:return: the resolved pkg path
%End
static QString themeName();
%Docstring
Set the active theme to the specified theme.
The theme name should be a single word e.g. 'default','classic'.
The theme search path usually will be pkgDataPath + "/themes/" + themName + "/"
but plugin writers etc can use this method as a basis for searching
for resources in their own datastores e.g. a Qt4 resource bundle.
%End
static void setUITheme( const QString &themeName );
%Docstring
Set the current UI theme used to style the interface. Use :py:func:`~QgsApplication.uiThemes` to
find valid themes to use. Variables found in variables.qss will be added to the stylesheet
on load.
:param themeName: The name of the theme.
.. note::
using an invalid theme name will reset to default
%End
static QHash<QString, QString> uiThemes();
%Docstring
All themes found in ~/.qgis3/themes folder.
The path is to the root folder for the theme
:return: A hash of theme name and theme path. Valid theme folders contain style.qss
.. note::
Valid theme folders must contain a style.qss file.
%End
static QString authorsFilePath();
%Docstring
Returns the path to the authors file.
%End
static QString contributorsFilePath();
%Docstring
Returns the path to the contributors file.
Contributors are people who have submitted patches
but don't have commit access.
%End
static QString developersMapFilePath();
%Docstring
Returns the path to the developers map file.
The developers map was created by using leaflet framework,
it shows the contributors.json file.
%End
static QString sponsorsFilePath();
%Docstring
Returns the path to the sponsors file.
%End
static QString donorsFilePath();
%Docstring
Returns the path to the donors file.
%End
static QString serverResourcesPath();
%Docstring
Returns the path to the server resources directory.
%End
static QString translatorsFilePath();
%Docstring
Returns the path to the sponsors file.
%End
static QString licenceFilePath();
%Docstring
Returns the path to the licence file.
%End
static QString i18nPath();
%Docstring
Returns the path to the translation directory.
%End
static QString metadataPath();
%Docstring
Returns the path to the metadata directory.
%End
static QString qgisMasterDatabaseFilePath();
%Docstring
Returns the path to the master qgis.db file.
%End
static QString qgisSettingsDirPath();
%Docstring
Returns the path to the settings directory in user's home dir
%End
static QString qgisUserDatabaseFilePath();
%Docstring
Returns the path to the user qgis.db file.
%End
static QString qgisAuthDatabaseFilePath() /Deprecated="Since 3.30. Use qgisAuthDatabaseUri() instead."/;
%Docstring
Returns the path to the user authentication database file: qgis-auth.db.
.. deprecated:: 3.30
Use :py:func:`~QgsApplication.qgisAuthDatabaseUri` instead.
%End
static QString qgisAuthDatabaseUri();
%Docstring
Returns the URI to the user authentication database.
The URI is be in the format: \verbatim<DRIVER>://<USER>:<PASSWORD>@<HOST>:<PORT>/<DATABASE>[?OPTIONS]\endverbatim
where DATABASE is just the path to the file for SQLite databases. If DRIVER is omitted, PSQLITE is assumed.
Optional SCHEMA can be specified as a query parameter.
.. versionadded:: 3.40
%End
static QString splashPath();
%Docstring
Returns the path to the splash screen image directory.
%End
static QString iconsPath();
%Docstring
Returns the path to the icons image directory.
%End
static QString srsDatabaseFilePath();
%Docstring
Returns the path to the srs.db file.
%End
static void setSvgPaths( const QStringList &svgPaths );
%Docstring
Sets the paths to svg directories and invalidates the svg path list cache.
.. versionadded:: 3.18
%End
static QStringList svgPaths();
%Docstring
Returns the paths to svg directories.
%End
static QStringList layoutTemplatePaths();
%Docstring
Returns the paths to layout template directories.
%End
static QMap<QString, QString> systemEnvVars();
%Docstring
Returns the system environment variables passed to application.
%End
static QString prefixPath();
%Docstring
Returns the path to the application prefix directory.
%End
static QString pluginPath();
%Docstring
Returns the path to the application plugin directory.
%End
static QString pkgDataPath();
%Docstring
Returns the common root path of all application data directories.
%End
static QString activeThemePath();
%Docstring
Returns the path to the currently active theme directory.
%End
static QString defaultThemePath();
%Docstring
Returns the path to the default theme directory.
%End
static QString iconPath( const QString &iconFile );
%Docstring
Returns path to the desired icon file.
First it tries to use the active theme path, then default theme path
%End
static QIcon getThemeIcon( const QString &name, const QColor &fillColor = QColor(), const QColor &strokeColor = QColor() );
%Docstring
Helper to get a theme icon. It will fall back to the
default theme if the active theme does not have the required icon.
Since QGIS 3.20, the optional ``fillColor`` and ``strokeColor`` arguments can be used to
control the color of parameter based SVG icons.
%End
enum Cursor
{
ZoomIn,
ZoomOut,
Identify,
CrossHair,
CapturePoint,
Select,
Sampler,
};
static QCursor getThemeCursor( Cursor cursor );
%Docstring
Helper to get a theme cursor. It will fall back to the
default theme if the active theme does not have the required icon.
Cursors are automatically scaled to look like a 16px cursor on 96dpi
screens.
%End
static QPixmap getThemePixmap( const QString &name, const QColor &foreColor = QColor(), const QColor &backColor = QColor(), int size = 16 );
%Docstring
Helper to get a theme icon as a pixmap. It will fall back to the
default theme if the active theme does not have the required icon.
If ``foreColor`` or ``backColor`` are specified, then these colors will
be used for parametrized colors in SVG files wherever available. If
colors are specified then the ``size`` argument also must be set.
%End
static QString userStylePath();
%Docstring
Returns the path to user's style.
%End
static QRegularExpression shortNameRegularExpression();
%Docstring
Returns the short name regular expression for line edit validator
.. note::
This functionality was previously available as `shortNameRegExp` for QGIS <= 3.20
.. versionadded:: 3.22
%End
static QString userLoginName();
%Docstring
Returns the user's operating system login account name.
.. seealso:: :py:func:`userFullName`
%End
static QString userFullName();
%Docstring
Returns the user's operating system login account full display name.
.. seealso:: :py:func:`userLoginName`
%End
static QString osName();
%Docstring
Returns a string name of the operating system QGIS is running on.
.. seealso:: :py:func:`platform`
%End
static int systemMemorySizeMb();
%Docstring
Returns the size of the system memory (RAM) in megabytes.
This is only supported on some platforms, and will return -1 if not supported.
.. versionadded:: 3.26
%End
static QString platform();
%Docstring
Returns the QGIS platform name, e.g., "desktop", "server", "qgis_process" or "external" (for external CLI scripts).
.. seealso:: :py:func:`osName`
%End
static QString applicationFullName();
%Docstring
Returns the QGIS application full name.
It can be defined by the environment variable QGIS_APPLICATION_FULL_NAME or the /qgis/application_full_name
in the QGIS config file.
By default it is equal to :py:func:`~QgsApplication.applicationName`+' '+:py:func:`~QgsApplication.platform`
.. seealso:: :py:func:`platform`
.. versionadded:: 3.30
%End
static QString locale();
%Docstring
Returns the QGIS locale.
%End
static void setLocale( const QLocale &locale );
%Docstring
Sets the QGIS locale - used mainly by 3rd party apps and tests.
In QGIS this is internally triggered by the application in startup.
.. versionadded:: 3.22.2
%End
static QString userThemesFolder();
%Docstring
Returns the path to user's themes folder
%End
static QString defaultStylePath();
%Docstring
Returns the path to default style (works as a starting point).
%End
static QString defaultThemesFolder();
%Docstring
Returns the path to default themes folder from install (works as a starting point).
%End
static QString libraryPath();
%Docstring
Returns the path containing qgis_core, qgis_gui, qgispython (and other) libraries
%End
static QString libexecPath();
%Docstring
Returns the path with utility executables (help viewer, crssync, ...)
%End
static QString qmlImportPath();
%Docstring
Returns the path where QML components are installed for QGIS Quick library. Returns
empty string when QGIS is built without Quick support
.. versionadded:: 3.2
%End
static void setPrefixPath( const QString &prefixPath, bool useDefaultPaths = false );
%Docstring
Alters prefix path - used by 3rd party apps
%End
static void setPluginPath( const QString &pluginPath );
%Docstring
Alters plugin path - used by 3rd party apps
%End
static void setPkgDataPath( const QString &pkgDataPath );
%Docstring
Alters pkg data path - used by 3rd party apps
%End
static void setDefaultSvgPaths( const QStringList &pathList );
%Docstring
Alters default svg paths - used by 3rd party apps.
%End
static void setAuthDatabaseDirPath( const QString &authDbDirPath );
%Docstring
Alters authentication data base directory path - used by 3rd party apps
%End
static void initQgis();
%Docstring
loads providers
%End
static bool createDatabase( QString *errorMessage = 0 );
%Docstring
initialize qgis.db
%End
static bool createThemeFolder();
%Docstring
Create the users theme folder
%End
static void exitQgis();
%Docstring
deletes provider registry and map layer registry
%End
static QString appIconPath();
%Docstring
Gets application icon
%End
enum endian_t
{
XDR,
NDR
};
static endian_t endian();
%Docstring
Returns whether this machine uses big or little endian
%End
static QString reportStyleSheet( QgsApplication::StyleSheetType styleSheetType = QgsApplication::StyleSheetType::Qt );
%Docstring
Returns a css style sheet for reports, the ``styleSheetType`` argument
determines what type of stylesheet is supported by the widget.
Typically you will use this method by doing:
QString myStyle = :py:func:`QgsApplication.reportStyleSheet()`;
textBrowserReport->:py:func:`~QgsApplication.document`->setDefaultStyleSheet(myStyle);
if you are using a :py:class:`QgsWebView` you will need to manually inject
the CSS into a head -> script tag instead.
:return: the stylesheet CSS rules.
.. note::
if styleSheetType equals StyleSheetType.Qt you can use the special Qt extensions too,
for example the gradient fills for backgrounds.
%End
static QString showSettings();
%Docstring
Convenience function to get a summary of the paths used in this
application instance useful for debugging mainly.
%End
static void registerOgrDrivers();
%Docstring
Register OGR drivers ensuring this only happens once.
This is a workaround for an issue with older gdal versions that
caused duplicate driver name entries to appear in the list
of registered drivers when QgsApplication.registerOgrDrivers was called multiple
times.
%End
static QString absolutePathToRelativePath( const QString &apath, const QString &targetPath );
%Docstring
Converts absolute path to path relative to target
%End
static QString relativePathToAbsolutePath( const QString &rpath, const QString &targetPath );
%Docstring
Converts path relative to target to an absolute path
%End
static bool isRunningFromBuildDir();
%Docstring
Indicates whether running from build directory (not installed)
%End
static QString buildSourcePath();
%Docstring
Returns path to the source directory. Valid only when running from build directory
%End
static QString buildOutputPath();
%Docstring
Returns path to the build output directory. Valid only when running from build directory
%End
static void skipGdalDriver( const QString &driver );
%Docstring
Sets the GDAL_SKIP environment variable to include the specified driver
and then calls GDALDriverManager.AutoSkipDrivers() to unregister it. The
driver name should be the short format of the Gdal driver name e.g. GTIFF.
%End
static void restoreGdalDriver( const QString &driver );
%Docstring
Sets the GDAL_SKIP environment variable to exclude the specified driver
and then calls GDALDriverManager.AutoSkipDrivers() to unregister it. The
driver name should be the short format of the Gdal driver name e.g. GTIFF.
%End
static QStringList skippedGdalDrivers();
%Docstring
Returns the list of gdal drivers that should be skipped (based on
GDAL_SKIP environment variable)
%End
static void applyGdalSkippedDrivers();
%Docstring
Apply the skipped drivers list to gdal
.. seealso:: :py:func:`skipGdalDriver`
.. seealso:: :py:func:`restoreGdalDriver`
.. seealso:: :py:func:`skippedGdalDrivers`
%End
static void registerGdalDriversFromSettings();
%Docstring
Register gdal drivers, excluding the ones mentioned in "gdal/skipList" setting.
.. versionadded:: 3.10
%End
static QStringList deferredSkippedGdalDrivers();
%Docstring
Returns the list of gdal drivers that have been disabled in the current session,
and thus, for safety, should not be disabled right now, but at the
next application restart.
.. versionadded:: 3.10
%End
static void setSkippedGdalDrivers( const QStringList &skippedGdalDrivers,
const QStringList &deferredSkippedGdalDrivers );
%Docstring
Sets the list of gdal drivers that should be disabled (``skippedGdalDrivers``),
but excludes for now the ones defines in ``deferredSkippedGdalDrivers``.
This writes the "gdal/skipList" setting.
.. versionadded:: 3.10
%End
static int maxThreads();
%Docstring
Gets maximum concurrent thread count
%End
static void setMaxThreads( int maxThreads );
%Docstring
Set maximum concurrent thread count
.. note::
must be between 2 and \#cores, -1 means use all available cores
%End
static QgsTaskManager *taskManager();
%Docstring
Returns the application's task manager, used for managing application
wide background task handling.
%End
static QgsSettingsRegistryCore *settingsRegistryCore() /KeepReference,Deprecated="Since 3.30. Use QgsSettings.treeRoot() instead."/;
%Docstring
Returns the application's settings registry, used for managing application settings.
.. versionadded:: 3.20
.. deprecated:: 3.30
Use :py:func:`QgsSettings.treeRoot()` instead.
%End
static QgsColorSchemeRegistry *colorSchemeRegistry() /KeepReference/;
%Docstring
Returns the application's color scheme registry, used for managing color schemes.
%End
static QgsPaintEffectRegistry *paintEffectRegistry() /KeepReference/;
%Docstring
Returns the application's paint effect registry, used for managing paint effects.
%End
static QgsRendererRegistry *rendererRegistry() /KeepReference/;
%Docstring
Returns the application's renderer registry, used for managing vector layer renderers.
%End
static QgsPointCloudRendererRegistry *pointCloudRendererRegistry() /KeepReference/;
%Docstring
Returns the application's point cloud renderer registry, used for managing point cloud layer 2D renderers.
.. versionadded:: 3.18
%End
static QgsTiledSceneRendererRegistry *tiledSceneRendererRegistry() /KeepReference/;
%Docstring
Returns the application's tiled scene renderer registry, used for managing tiled scene layer 2D renderers.
.. versionadded:: 3.34
%End
static QgsDataItemProviderRegistry *dataItemProviderRegistry() /KeepReference/;
%Docstring
Returns the application's data item provider registry, which keeps a list of data item
providers that may add items to the browser tree.
%End
static QgsCoordinateReferenceSystemRegistry *coordinateReferenceSystemRegistry() /KeepReference/;
%Docstring
Returns the application's coordinate reference system (CRS) registry, which handles
known CRS definitions (including user-defined CRSes).
.. versionadded:: 3.18
%End
static QgsSvgCache *svgCache();
%Docstring
Returns the application's SVG cache, used for caching SVG images and handling parameter replacement
within SVG files.
.. seealso:: :py:func:`imageCache`
%End
static QgsImageCache *imageCache();
%Docstring
Returns the application's image cache, used for caching resampled versions of raster images.
.. seealso:: :py:func:`svgCache`
.. versionadded:: 3.6
%End
static QgsSourceCache *sourceCache();
%Docstring
Returns the application's source cache, used for caching embedded and remote source strings as local files
.. versionadded:: 3.16
%End
static QgsNetworkContentFetcherRegistry *networkContentFetcherRegistry() /KeepReference/;
%Docstring
Returns the application's network content registry used for fetching temporary files during QGIS session
.. versionadded:: 3.2
%End
static QgsValidityCheckRegistry *validityCheckRegistry() /KeepReference/;
%Docstring
Returns the application's validity check registry, used for managing validity checks.
.. versionadded:: 3.6
%End
static QgsSymbolLayerRegistry *symbolLayerRegistry() /KeepReference/;
%Docstring
Returns the application's symbol layer registry, used for managing symbol layers.
%End
static QgsCalloutRegistry *calloutRegistry() /KeepReference/;
%Docstring
Returns the application's callout registry, used for managing callout types.
.. versionadded:: 3.10
%End
static QgsLayoutItemRegistry *layoutItemRegistry() /KeepReference/;
%Docstring
Returns the application's layout item registry, used for layout item types.
%End
static QgsAnnotationItemRegistry *annotationItemRegistry() /KeepReference/;
%Docstring
Returns the application's annotation item registry, used for annotation item types.
.. versionadded:: 3.16
%End
static QgsGpsConnectionRegistry *gpsConnectionRegistry() /KeepReference/;
%Docstring
Returns the application's GPS connection registry, used for managing GPS connections.
%End
static QgsBabelFormatRegistry *gpsBabelFormatRegistry() /KeepReference/;
%Docstring
Returns the application's GPSBabel format registry, used for managing GPSBabel formats.
.. versionadded:: 3.22
%End
static QgsPluginLayerRegistry *pluginLayerRegistry() /KeepReference/;
%Docstring
Returns the application's plugin layer registry, used for managing plugin layer types.
%End
static QgsClassificationMethodRegistry *classificationMethodRegistry() /KeepReference/;
%Docstring
Returns the application's classification methods registry, used in graduated renderer
.. versionadded:: 3.10
%End
static QgsBookmarkManager *bookmarkManager();
%Docstring
Returns the application's bookmark manager, used for storing installation-wide bookmarks.
.. versionadded:: 3.10
%End
static QgsRecentStyleHandler *recentStyleHandler() /KeepReference/;
%Docstring
Returns the handler for recently used style items.
.. versionadded:: 3.22
%End
static QgsDatabaseQueryLog *databaseQueryLog() /KeepReference/;
%Docstring
Returns the database query log.
.. versionadded:: 3.24
%End
static QgsStyleModel *defaultStyleModel();
%Docstring
Returns a shared :py:class:`QgsStyleModel` containing the default style library (see :py:func:`QgsStyle.defaultStyle()`).
Using this shared model instead of creating a new :py:class:`QgsStyleModel` improves performance.
.. versionadded:: 3.10
%End
static QgsFontManager *fontManager() /KeepReference/;
%Docstring
Returns the application font manager, which manages available fonts and font installation for the QGIS instance.
.. versionadded:: 3.28
%End
static QgsSensorRegistry *sensorRegistry() /KeepReference/;
%Docstring
Returns the application's sensor registry, used for sensor types.
.. versionadded:: 3.32
%End
static QgsMessageLog *messageLog();
%Docstring
Returns the application's message log.
%End
static QgsAuthManager *authManager();
%Docstring
Returns the application's authentication manager instance
.. note::
this can be ``None`` if called before initQgis
.. seealso:: :py:func:`initQgis`
%End
static QgsAuthConfigurationStorageRegistry *authConfigurationStorageRegistry();
%Docstring
Returns the application's authentication configuration storage registry
.. versionadded:: 3.40
%End
static QgsProcessingRegistry *processingRegistry();
%Docstring
Returns the application's processing registry, used for managing processing providers,
algorithms, and various parameters and outputs.
%End
static QgsPageSizeRegistry *pageSizeRegistry() /KeepReference/;
%Docstring
Returns the application's page size registry, used for managing layout page sizes.
%End
static QgsActionScopeRegistry *actionScopeRegistry() /KeepReference/;
%Docstring
Returns the action scope registry.
%End
static QgsConnectionRegistry *connectionRegistry();
%Docstring
Returns the application's connection registry, used for managing saved data provider connections.
.. versionadded:: 3.14
%End
static QgsRuntimeProfiler *profiler();
%Docstring
Returns the application runtime profiler.
%End
static QgsNumericFormatRegistry *numericFormatRegistry() /KeepReference/;
%Docstring
Gets the registry of available numeric formats.
.. versionadded:: 3.12
%End
static QgsFieldFormatterRegistry *fieldFormatterRegistry() /KeepReference/;
%Docstring
Gets the registry of available field formatters.
%End
static Qgs3DRendererRegistry *renderer3DRegistry() /KeepReference/;
%Docstring
Returns registry of available 3D renderers.
%End
static Qgs3DSymbolRegistry *symbol3DRegistry() /KeepReference/;
%Docstring
Returns registry of available 3D symbols.
.. versionadded:: 3.16
%End
static QgsScaleBarRendererRegistry *scaleBarRendererRegistry() /KeepReference/;
%Docstring
Gets the registry of available scalebar renderers.
.. versionadded:: 3.14
%End
static QgsLabelingEngineRuleRegistry *labelingEngineRuleRegistry() /KeepReference/;
%Docstring
Gets the registry of available labeling engine rules.
.. versionadded:: 3.40
%End
static QgsProjectStorageRegistry *projectStorageRegistry() /KeepReference/;
%Docstring
Returns registry of available project storage implementations.
.. versionadded:: 3.2
%End
static QgsLayerMetadataProviderRegistry *layerMetadataProviderRegistry() /KeepReference/;
%Docstring
Returns registry of available layer metadata provider implementations.
.. versionadded:: 3.28
%End
static QgsExternalStorageRegistry *externalStorageRegistry() /KeepReference/;
%Docstring
Returns registry of available external storage implementations.
.. versionadded:: 3.20
%End
static QgsProfileSourceRegistry *profileSourceRegistry() /KeepReference/;
%Docstring
Returns registry of available profile source implementations.
.. versionadded:: 3.38
%End
static QgsLocalizedDataPathRegistry *localizedDataPathRegistry() /KeepReference/;
%Docstring
Returns the registry of data repositories
These are used as paths for basemaps, logos, etc. which can be referenced
differently across work stations.
.. seealso:: :py:class:`QgsLocalizedDataPathRegistry`
.. versionadded:: 3.14
%End
static QString nullRepresentation();
%Docstring
Returns the string used to represent the value `NULL` throughout QGIS.
.. note::
In general, when passing values around, prefer to use an invalid QVariant.
The :py:func:`~QgsApplication.nullRepresentation` value should only be used in the final presentation step when showing values
in a widget or sending it to a web browser.
.. seealso:: :py:func:`setNullRepresentation`
.. seealso:: :py:func:`nullRepresentationChanged`
%End
static void setNullRepresentation( const QString &nullRepresentation );
%Docstring
Sets the string used to represent the value `NULL` throughout QGIS.
.. note::
In general, when passing values around, prefer to use an invalid QVariant.
The :py:func:`~QgsApplication.nullRepresentation` value should only be used in the final presentation step when showing values
in a widget or sending it to a web browser.
.. seealso:: :py:func:`nullRepresentation`
.. seealso:: :py:func:`nullRepresentationChanged`
%End
static QVariantMap customVariables();
%Docstring
Custom expression variables for this application.
This does not include generated variables (like system name, user name etc.)
.. seealso:: :py:func:`QgsExpressionContextUtils.globalScope`
%End
static void setCustomVariables( const QVariantMap &customVariables );
%Docstring
Custom expression variables for this application.
Do not include generated variables (like system name, user name etc.)
.. seealso:: :py:func:`QgsExpressionContextUtils.globalScope`
%End
static void setCustomVariable( const QString &name, const QVariant &value );
%Docstring
Set a single custom expression variable.
%End
static int scaleIconSize( int standardSize, bool applyDevicePixelRatio = false );
%Docstring
Scales an icon size to compensate for display pixel density, making the icon
size hi-dpi friendly, whilst still resulting in pixel-perfect sizes for low-dpi
displays.
``standardSize`` should be set to a standard icon size, e.g. 16, 24, 48, etc.
.. versionadded:: 3.16
%End
int maxConcurrentConnectionsPerPool() const;
%Docstring
The maximum number of concurrent connections per connections pool.
.. note::
QGIS may in some situations allocate more than this amount
of connections to avoid deadlocks.
.. versionadded:: 3.4
%End
static void setTranslation( const QString &translation );
%Docstring
Set translation locale code
.. versionadded:: 3.4
%End
QString translation() const;
%Docstring
Returns the current application translation locale code
.. seealso:: :py:func:`setTranslation`
.. versionadded:: 3.22
%End
void collectTranslatableObjects( QgsTranslationContext *translationContext );
%Docstring
Emits the signal to collect all the strings of .qgs to be included in ts file
.. versionadded:: 3.4
%End
%If (ANDROID)
//dummy method to workaround sip generation issue
bool x11EventFilter( XEvent *event );
%End
signals:
void customVariablesChanged();
%Docstring
Emitted whenever a custom global variable changes.
%End
void nullRepresentationChanged();
%Docstring
Emitted when the string representing the `NULL` value is changed.
.. seealso:: :py:func:`setNullRepresentation`
.. seealso:: :py:func:`nullRepresentation`
%End
void requestForTranslatableObjects( QgsTranslationContext *translationContext );
%Docstring
Emitted when project strings which require translation are being collected for inclusion in a .ts file.
In order to register translatable strings, connect to this signal and register the strings within the specified ``translationContext``.
.. versionadded:: 3.4
%End
void localeChanged();
%Docstring
Emitted when project locale has been changed.
.. versionadded:: 3.22.2
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsapplication.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/