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

882 lines
22 KiB
Plaintext
Raw Normal View History

2017-04-24 07:47:24 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsapplication.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsApplication : QApplication
{
2017-04-24 07:47:24 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Extends QApplication to provide access to QGIS specific resources such
as theme paths, database paths etc.
2017-04-24 07:47:24 +02:00
2017-12-15 10:36:55 -04:00
This is a subclass of QApplication and should be instantiated in place of
2017-04-24 07:47:24 +02:00
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
2017-04-24 07:47:24 +02:00
#include "qgsapplication.h"
%End
%TypeCode
2017-04-24 07:47:24 +02:00
// Convert a Python argv list to a conventional C argc count and argv array.
static char **qtgui_ArgvToC( PyObject *argvlist, int &argc )
{
char **argv;
2017-04-24 07:47:24 +02:00
argc = PyList_GET_SIZE( argvlist );
2017-04-24 07:47:24 +02:00
// 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;
2017-04-24 07:47:24 +02:00
// Convert the list.
for ( int a = 0; a < argc; ++a )
{
char *arg;
// Get the argument and allocate memory for it.
2017-04-24 07:47:24 +02:00
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.
2017-04-24 07:47:24 +02:00
strcpy( argv[a], arg );
argv[a + argc + 1] = argv[a];
2017-04-24 07:47:24 +02:00
}
2017-04-24 07:47:24 +02:00
argv[argc + argc + 1] = argv[argc] = NULL;
2017-04-24 07:47:24 +02:00
return argv;
}
2017-04-24 07:47:24 +02:00
// 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 )
{
2017-04-24 07:47:24 +02:00
for ( int a = 0, na = 0; a < argc; ++a )
{
// See if it was removed.
2017-04-24 07:47:24 +02:00
if ( argv[na] == argv[a + argc + 1] )
++na;
else
2017-04-24 07:47:24 +02:00
PyList_SetSlice( argvlist, na, na + 1, NULL );
}
}
%End
public:
2017-04-24 07:47:24 +02:00
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 = "desktop" ) / PostHook = __pyQtQAppHook__ / [( int &argc, char **argv, bool GUIenabled, const QString &profileFolder = QString(), const QString &platformName = "desktop" )];
%MethodCode
2017-04-24 07:47:24 +02:00
// The Python interface is a list of argument strings that is modified.
2017-04-24 07:47:24 +02:00
int argc;
char **argv;
2017-04-24 07:47:24 +02:00
// 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 );
2017-04-24 07:47:24 +02:00
// Now modify the original list.
qtgui_UpdatePyArgv( a0, argc, argv );
}
%End
~QgsApplication();
2017-04-24 07:47:24 +02:00
static QgsApplication *instance();
%Docstring
2017-12-15 10:36:55 -04:00
Returns the singleton instance of the QgsApplication.
2017-04-24 07:47:24 +02:00
.. versionadded:: 3.0
%End
virtual bool event( QEvent *event );
2017-04-24 07:47:24 +02:00
%Docstring
Watch for QFileOpenEvent.
%End
virtual bool notify( QObject *receiver, QEvent *event );
2017-04-24 07:47:24 +02:00
%Docstring
Catch exceptions when sending event to receiver.
%End
static void setFileOpenEventReceiver( QObject *receiver );
%Docstring
Sets the FileOpen event receiver
2017-04-24 07:47:24 +02:00
%End
static void setThemeName( const QString &themeName );
2017-04-24 07:47:24 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
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 themeName() as a basis for searching
for resources in their own datastores e.g. a Qt4 resource bundle.
2017-04-24 07:47:24 +02:00
.. note::
A basic test will be carried out to ensure the theme search path
2018-01-12 20:51:17 -04:00
based on the supplied theme name exists. If it does not the theme name will
be reverted to 'default'.
2017-04-24 07:47:24 +02:00
%End
2018-09-17 09:15:35 +02:00
static QString resolvePkgPath();
2018-02-15 09:25:26 +01:00
%Docstring
Calculate the application pkg path
:return: the resolved pkg path
%End
static QString themeName();
2017-04-24 07:47:24 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
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.
2017-04-24 07:47:24 +02:00
%End
static void setUITheme( const QString &themeName );
2017-04-24 07:47:24 +02:00
%Docstring
Set the current UI theme used to style the interface. Use uiThemes() to
2017-12-15 10:36:55 -04:00
find valid themes to use. Variables found in variables.qss will be added to the stylesheet
on load.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param themeName: The name of the theme.
2017-04-24 07:47:24 +02:00
.. note::
using an invalid theme name will reset to default
%End
static QHash<QString, QString> uiThemes();
2017-04-24 07:47:24 +02:00
%Docstring
All themes found in ~/.qgis3/themes folder.
2017-12-15 10:36:55 -04:00
The path is to the root folder for the theme
2017-12-16 10:38:54 -04:00
:return: A hash of theme name and theme path. Valid theme folders contain style.qss
2017-04-24 07:47:24 +02:00
.. note::
Valid theme folders must contain a style.qss file.
%End
static QString authorsFilePath();
2017-04-24 07:47:24 +02:00
%Docstring
Returns the path to the authors file.
%End
static QString contributorsFilePath();
2017-04-24 07:47:24 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the path to the contributors file.
Contributors are people who have submitted patches
but don't have commit access. *
2017-04-24 07:47:24 +02:00
%End
static QString developersMapFilePath();
2017-04-24 07:47:24 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the path to the developers map file.
The developers map was created by using leaflet framework,
it shows the contributors.json file.
2017-12-15 10:36:55 -04:00
2017-04-24 07:47:24 +02:00
.. versionadded:: 2.7
%End
static QString sponsorsFilePath();
2017-04-24 07:47:24 +02:00
%Docstring
Returns the path to the sponsors file.
%End
static QString donorsFilePath();
2017-04-24 07:47:24 +02:00
%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();
2017-04-24 07:47:24 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the path to the sponsors file.
2017-04-24 07:47:24 +02:00
%End
static QString licenceFilePath();
2017-04-24 07:47:24 +02:00
%Docstring
Returns the path to the licence file.
%End
2014-01-26 18:35:21 +01:00
static QString i18nPath();
2017-04-24 07:47:24 +02:00
%Docstring
Returns the path to the translation directory.
%End
static QString metadataPath();
%Docstring
2017-12-15 10:36:55 -04:00
Returns the path to the metadata directory.
.. versionadded:: 3.0
%End
static QString qgisMasterDatabaseFilePath();
2017-04-24 07:47:24 +02:00
%Docstring
Returns the path to the master qgis.db file.
%End
static QString qgisSettingsDirPath();
2017-04-24 07:47:24 +02:00
%Docstring
Returns the path to the settings directory in user's home dir
%End
static QString qgisUserDatabaseFilePath();
2017-04-24 07:47:24 +02:00
%Docstring
Returns the path to the user qgis.db file.
%End
static QString qgisAuthDatabaseFilePath();
2017-04-24 07:47:24 +02:00
%Docstring
Returns the path to the user authentication database file: qgis-auth.db.
%End
static QString splashPath();
2017-04-24 07:47:24 +02:00
%Docstring
Returns the path to the splash screen image directory.
%End
static QString iconsPath();
2017-04-24 07:47:24 +02:00
%Docstring
Returns the path to the icons image directory.
%End
static QString srsDatabaseFilePath();
2017-04-24 07:47:24 +02:00
%Docstring
Returns the path to the srs.db file.
%End
static QStringList svgPaths();
2017-04-24 07:47:24 +02:00
%Docstring
Returns the paths to svg directories.
%End
static QStringList layoutTemplatePaths();
2017-04-24 07:47:24 +02:00
%Docstring
Returns the paths to layout template directories.
.. versionadded:: 3.0
2017-04-24 07:47:24 +02:00
%End
2015-11-07 10:14:47 +10:00
static QMap<QString, QString> systemEnvVars();
2017-04-24 07:47:24 +02:00
%Docstring
Returns the system environment variables passed to application.
%End
static QString prefixPath();
2017-04-24 07:47:24 +02:00
%Docstring
Returns the path to the application prefix directory.
%End
static QString pluginPath();
2017-04-24 07:47:24 +02:00
%Docstring
Returns the path to the application plugin directory.
%End
static QString pkgDataPath();
2017-04-24 07:47:24 +02:00
%Docstring
Returns the common root path of all application data directories.
%End
static QString activeThemePath();
2017-04-24 07:47:24 +02:00
%Docstring
Returns the path to the currently active theme directory.
%End
static QString defaultThemePath();
2017-04-24 07:47:24 +02:00
%Docstring
Returns the path to the default theme directory.
%End
2017-04-24 07:47:24 +02:00
static QString iconPath( const QString &iconFile );
%Docstring
2017-12-15 10:36:55 -04:00
Returns path to the desired icon file.
First it tries to use the active theme path, then default theme path
2017-04-24 07:47:24 +02:00
%End
static QIcon getThemeIcon( const QString &name );
2017-04-24 07:47:24 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Helper to get a theme icon. It will fall back to the
default theme if the active theme does not have the required icon.
2017-04-24 07:47:24 +02:00
%End
enum Cursor
{
ZoomIn,
ZoomOut,
Identify,
CrossHair,
CapturePoint,
Select,
Sampler,
};
static QCursor getThemeCursor( Cursor cursor );
%Docstring
2017-12-15 10:36:55 -04:00
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 );
2017-04-24 07:47:24 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
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.
2017-04-24 07:47:24 +02:00
%End
2016-08-06 11:01:42 +02:00
static QString userStylePath();
2017-04-24 07:47:24 +02:00
%Docstring
Returns the path to user's style.
%End
static QRegExp shortNameRegExp();
2017-04-24 07:47:24 +02:00
%Docstring
Returns the short name regular expression for line edit validator
%End
static QString userLoginName();
2017-04-24 07:47:24 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the user's operating system login account name.
.. seealso:: :py:func:`userFullName`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.14
2017-04-24 07:47:24 +02:00
%End
static QString userFullName();
2017-04-24 07:47:24 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the user's operating system login account full display name.
.. seealso:: :py:func:`userLoginName`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.14
2017-04-24 07:47:24 +02:00
%End
static QString osName();
2017-04-24 07:47:24 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns a string name of the operating system QGIS is running on.
.. seealso:: :py:func:`platform`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.14
2017-04-24 07:47:24 +02:00
%End
static QString platform();
2017-04-24 07:47:24 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the QGIS platform name, e.g., "desktop" or "server".
.. seealso:: :py:func:`osName`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.14
2017-04-24 07:47:24 +02:00
%End
2017-01-06 21:21:34 +02:00
static QString locale();
2017-04-24 07:47:24 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the QGIS locale.
2017-04-24 07:47:24 +02:00
.. versionadded:: 3.0
%End
2017-01-06 21:21:34 +02:00
2015-10-07 11:36:15 +02:00
static QString userThemesFolder();
2017-04-24 07:47:24 +02:00
%Docstring
Returns the path to user's themes folder
%End
2015-10-07 11:36:15 +02:00
2016-08-06 11:01:42 +02:00
static QString defaultStylePath();
2017-04-24 07:47:24 +02:00
%Docstring
Returns the path to default style (works as a starting point).
%End
2015-10-07 11:36:15 +02:00
static QString defaultThemesFolder();
2017-04-24 07:47:24 +02:00
%Docstring
Returns the path to default themes folder from install (works as a starting point).
%End
2015-10-07 11:36:15 +02:00
static QString libraryPath();
2017-04-24 07:47:24 +02:00
%Docstring
Returns the path containing qgis_core, qgis_gui, qgispython (and other) libraries
%End
static QString libexecPath();
2017-04-24 07:47:24 +02:00
%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
2017-04-24 07:47:24 +02:00
%End
static void setPrefixPath( const QString &prefixPath, bool useDefaultPaths = false );
2017-04-24 07:47:24 +02:00
%Docstring
Alters prefix path - used by 3rd party apps
%End
static void setPluginPath( const QString &pluginPath );
2017-04-24 07:47:24 +02:00
%Docstring
Alters plugin path - used by 3rd party apps
%End
static void setPkgDataPath( const QString &pkgDataPath );
2017-04-24 07:47:24 +02:00
%Docstring
Alters pkg data path - used by 3rd party apps
%End
2017-04-24 07:47:24 +02:00
static void setDefaultSvgPaths( const QStringList &pathList );
%Docstring
Alters default svg paths - used by 3rd party apps.
%End
2017-04-24 07:47:24 +02:00
static void setAuthDatabaseDirPath( const QString &authDbDirPath );
%Docstring
Alters authentication data base directory path - used by 3rd party apps
%End
2015-10-07 11:36:15 +02:00
static void initQgis();
2017-04-24 07:47:24 +02:00
%Docstring
loads providers
%End
2017-04-24 07:47:24 +02:00
static bool createDatabase( QString *errorMessage = 0 );
%Docstring
initialize qgis.db
%End
2014-01-26 18:35:21 +01:00
2016-02-14 03:50:23 +01:00
static bool createThemeFolder();
2017-04-24 07:47:24 +02:00
%Docstring
Create the users theme folder
%End
2015-10-07 11:36:15 +02:00
static void exitQgis();
2017-04-24 07:47:24 +02:00
%Docstring
deletes provider registry and map layer registry
%End
static QString appIconPath();
2017-04-24 07:47:24 +02:00
%Docstring
Gets application icon
2017-04-24 07:47:24 +02:00
%End
enum endian_t
{
2017-04-24 07:47:24 +02:00
XDR,
NDR
};
static endian_t endian();
2017-04-24 07:47:24 +02:00
%Docstring
Returns whether this machine uses big or little endian
%End
static QString reportStyleSheet();
2017-04-24 07:47:24 +02:00
%Docstring
Returns a standard css style sheet for reports.
2017-12-15 10:36:55 -04:00
Typically you will use this method by doing:
QString myStyle = QgsApplication.reportStyleSheet();
textBrowserReport->document()->setDefaultStyleSheet(myStyle);
:return: QString containing the CSS 2.1 compliant stylesheet.
2017-04-24 07:47:24 +02:00
.. note::
you can use the special Qt extensions too, for example
2018-01-12 20:51:17 -04:00
the gradient fills for backgrounds.
2017-04-24 07:47:24 +02:00
%End
static QString showSettings();
2017-04-24 07:47:24 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Convenience function to get a summary of the paths used in this
application instance useful for debugging mainly.*
2017-04-24 07:47:24 +02:00
%End
static void registerOgrDrivers();
2017-04-24 07:47:24 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
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.
2017-04-24 07:47:24 +02:00
%End
2017-04-24 07:47:24 +02:00
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();
2017-04-24 07:47:24 +02:00
%Docstring
Indicates whether running from build directory (not installed)
%End
static QString buildSourcePath();
2017-04-24 07:47:24 +02:00
%Docstring
Returns path to the source directory. Valid only when running from build directory
%End
static QString buildOutputPath();
2017-04-24 07:47:24 +02:00
%Docstring
Returns path to the build output directory. Valid only when running from build directory
%End
static void skipGdalDriver( const QString &driver );
%Docstring
2017-12-15 10:36:55 -04:00
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.
2017-04-24 07:47:24 +02:00
%End
static void restoreGdalDriver( const QString &driver );
%Docstring
2017-12-15 10:36:55 -04:00
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.
2017-04-24 07:47:24 +02:00
%End
2014-05-27 23:22:50 +02:00
static QStringList skippedGdalDrivers();
2017-04-24 07:47:24 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the list of gdal drivers that should be skipped (based on
GDAL_SKIP environment variable)
2017-04-24 07:47:24 +02:00
%End
static void applyGdalSkippedDrivers();
2017-04-24 07:47:24 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Apply the skipped drivers list to gdal
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`skipGdalDriver`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`restoreGdalDriver`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`skippedGdalDrivers`
2017-04-24 07:47:24 +02:00
%End
2014-05-27 23:22:50 +02:00
static int maxThreads();
2017-04-24 07:47:24 +02:00
%Docstring
Gets maximum concurrent thread count
2017-12-15 10:36:55 -04:00
2017-04-24 07:47:24 +02:00
.. versionadded:: 2.4
%End
2014-05-27 23:22:50 +02:00
static void setMaxThreads( int maxThreads );
2017-04-24 07:47:24 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Set maximum concurrent thread count
2017-04-24 07:47:24 +02:00
.. note::
must be between 1 and \#cores, -1 means use all available cores
2017-12-15 10:36:55 -04:00
2017-04-24 07:47:24 +02:00
.. versionadded:: 2.4
%End
static QgsTaskManager *taskManager();
%Docstring
2017-12-15 10:36:55 -04:00
Returns the application's task manager, used for managing application
wide background task handling.
2017-04-24 07:47:24 +02:00
.. versionadded:: 3.0
%End
static QgsColorSchemeRegistry *colorSchemeRegistry() /KeepReference/;
2017-04-24 07:47:24 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the application's color scheme registry, used for managing color schemes.
2017-04-24 07:47:24 +02:00
.. versionadded:: 3.0
%End
static QgsPaintEffectRegistry *paintEffectRegistry() /KeepReference/;
2017-04-24 07:47:24 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the application's paint effect registry, used for managing paint effects.
2017-04-24 07:47:24 +02:00
.. versionadded:: 3.0
%End
static QgsRendererRegistry *rendererRegistry() /KeepReference/;
2017-04-24 07:47:24 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the application's renderer registry, used for managing vector layer renderers.
2017-04-24 07:47:24 +02:00
.. versionadded:: 3.0
%End
static QgsDataItemProviderRegistry *dataItemProviderRegistry() /KeepReference/;
2017-04-24 07:47:24 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the application's data item provider registry, which keeps a list of data item
providers that may add items to the browser tree.
2017-04-24 07:47:24 +02:00
.. versionadded:: 3.0
%End
static QgsSvgCache *svgCache();
%Docstring
2017-12-15 10:36:55 -04:00
Returns the application's SVG cache, used for caching SVG images and handling parameter replacement
within SVG files.
.. seealso:: :py:func:`imageCache`
2017-04-24 07:47:24 +02:00
.. versionadded:: 3.0
%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 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
2017-04-24 07:47:24 +02:00
%End
static QgsSymbolLayerRegistry *symbolLayerRegistry();
%Docstring
2017-12-15 10:36:55 -04:00
Returns the application's symbol layer registry, used for managing symbol layers.
2017-04-24 07:47:24 +02:00
.. versionadded:: 3.0
%End
2017-06-30 17:01:52 +10:00
static QgsLayoutItemRegistry *layoutItemRegistry();
%Docstring
2017-12-15 10:36:55 -04:00
Returns the application's layout item registry, used for layout item types.
2017-06-30 17:01:52 +10:00
.. versionadded:: 3.0
%End
static QgsGpsConnectionRegistry *gpsConnectionRegistry();
2017-04-24 07:47:24 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the application's GPS connection registry, used for managing GPS connections.
2017-04-24 07:47:24 +02:00
.. versionadded:: 3.0
%End
static QgsPluginLayerRegistry *pluginLayerRegistry();
%Docstring
2017-12-15 10:36:55 -04:00
Returns the application's plugin layer registry, used for managing plugin layer types.
2017-04-24 07:47:24 +02:00
.. versionadded:: 3.0
%End
static QgsMessageLog *messageLog();
%Docstring
2017-12-15 10:36:55 -04:00
Returns the application's message log.
2017-04-24 07:47:24 +02:00
.. versionadded:: 3.0
%End
static QgsAuthManager *authManager();
%Docstring
2017-12-15 10:36:55 -04:00
Returns the application's authentication manager instance
.. note::
this can be a null pointer if called before initQgis
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`initQgis`
2017-12-15 10:36:55 -04:00
.. versionadded:: 3.0
%End
2017-04-24 07:47:24 +02:00
static QgsProcessingRegistry *processingRegistry();
%Docstring
2017-12-15 10:36:55 -04:00
Returns the application's processing registry, used for managing processing providers,
algorithms, and various parameters and outputs.
2017-04-24 07:47:24 +02:00
.. versionadded:: 3.0
%End
static QgsPageSizeRegistry *pageSizeRegistry();
%Docstring
2017-12-15 10:36:55 -04:00
Returns the application's page size registry, used for managing layout page sizes.
.. versionadded:: 3.0
%End
2017-04-24 07:47:24 +02:00
static QgsActionScopeRegistry *actionScopeRegistry() /KeepReference/;
2017-04-24 07:47:24 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the action scope registry.
2017-04-24 07:47:24 +02:00
.. versionadded:: 3.0
%End
static QgsRuntimeProfiler *profiler();
%Docstring
2017-12-15 10:36:55 -04:00
Returns the application runtime profiler.
2017-04-24 07:47:24 +02:00
.. versionadded:: 3.0
%End
static QgsFieldFormatterRegistry *fieldFormatterRegistry() /KeepReference/;
2017-04-24 07:47:24 +02:00
%Docstring
Gets the registry of available field formatters.
2017-04-24 07:47:24 +02:00
%End
static Qgs3DRendererRegistry *renderer3DRegistry() /KeepReference/;
2017-09-15 16:44:42 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns registry of available 3D renderers.
2017-09-15 16:44:42 +02:00
.. versionadded:: 3.0
%End
static QgsProjectStorageRegistry *projectStorageRegistry() /KeepReference/;
%Docstring
Returns registry of available project storage implementations.
.. versionadded:: 3.2
2017-09-15 16:44:42 +02:00
%End
2016-12-07 14:01:15 +01:00
static QString nullRepresentation();
2017-04-24 07:47:24 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
This string is used to represent the value `NULL` throughout QGIS.
In general, when passing values around, prefer to use a null QVariant
`QVariant( field.type() )` or `QVariant( QVariant.Int )`. This value
should only be used in the final presentation step when showing values
in a widget or sending it to a web browser.
2017-04-24 07:47:24 +02:00
%End
static void setNullRepresentation( const QString &nullRepresentation );
%Docstring
2017-12-15 10:36:55 -04:00
\copydoc nullRepresentation()
2017-04-24 07:47:24 +02:00
%End
2016-12-22 13:11:43 +01:00
static QVariantMap customVariables();
2017-04-24 07:47:24 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Custom expression variables for this application.
This does not include generated variables (like system name, user name etc.)
2018-05-25 09:00:58 +10:00
.. seealso:: :py:func:`QgsExpressionContextUtils.globalScope`
2017-12-15 10:36:55 -04:00
2017-04-24 07:47:24 +02:00
.. versionadded:: 3.0
%End
static void setCustomVariables( const QVariantMap &customVariables );
%Docstring
2017-12-15 10:36:55 -04:00
Custom expression variables for this application.
Do not include generated variables (like system name, user name etc.)
2017-04-24 07:47:24 +02:00
2018-05-25 09:00:58 +10:00
.. seealso:: :py:func:`QgsExpressionContextUtils.globalScope`
2017-12-15 10:36:55 -04:00
2017-04-24 07:47:24 +02:00
.. versionadded:: 3.0
%End
static void setCustomVariable( const QString &name, const QVariant &value );
%Docstring
2017-12-15 10:36:55 -04:00
Set a single custom expression variable.
2017-04-24 07:47:24 +02:00
.. versionadded:: 3.0
2018-08-07 17:08:56 +02:00
%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
2018-09-17 09:15:35 +02:00
static void setTranslation( const QString &translation );
%Docstring
Set translation
2018-08-07 17:08:56 +02:00
.. versionadded:: 3.4
%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
2017-04-24 07:47:24 +02:00
%If (ANDROID)
//dummy method to workaround sip generation issue
bool x11EventFilter( XEvent *event );
%End
signals:
void customVariablesChanged();
2017-04-24 07:47:24 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Emitted whenever a custom global variable changes.
2017-04-24 07:47:24 +02:00
.. versionadded:: 3.0
%End
2016-12-07 14:01:15 +01:00
void nullRepresentationChanged();
2017-04-24 07:47:24 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
\copydoc 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
};
2017-04-24 07:47:24 +02:00
2017-09-25 14:20:39 +10:00
2017-04-24 07:47:24 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsapplication.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/