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 *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-01-09 02:39:15 +00:00
|
|
|
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
|
|
|
|
|
2007-01-09 02:39:15 +00:00
|
|
|
%TypeHeaderCode
|
2017-04-24 07:47:24 +02:00
|
|
|
#include "qgsapplication.h"
|
2007-01-09 02:39:15 +00:00
|
|
|
%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;
|
2007-01-09 02:39:15 +00:00
|
|
|
|
2017-04-24 07:47:24 +02:00
|
|
|
argc = PyList_GET_SIZE( argvlist );
|
2007-01-09 02:39:15 +00:00
|
|
|
|
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 )
|
2007-01-09 02:39:15 +00:00
|
|
|
return NULL;
|
|
|
|
|
2017-04-24 07:47:24 +02:00
|
|
|
// Convert the list.
|
|
|
|
for ( int a = 0; a < argc; ++a )
|
|
|
|
{
|
2007-01-09 02:39:15 +00:00
|
|
|
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;
|
2007-01-09 02:39:15 +00:00
|
|
|
// Copy the argument and save a pointer to it.
|
2017-04-24 07:47:24 +02:00
|
|
|
strcpy( argv[a], arg );
|
2007-01-09 02:39:15 +00:00
|
|
|
argv[a + argc + 1] = argv[a];
|
2017-04-24 07:47:24 +02:00
|
|
|
}
|
2007-01-09 02:39:15 +00:00
|
|
|
|
2017-04-24 07:47:24 +02:00
|
|
|
argv[argc + argc + 1] = argv[argc] = NULL;
|
2007-01-09 02:39:15 +00:00
|
|
|
|
2017-04-24 07:47:24 +02:00
|
|
|
return argv;
|
|
|
|
}
|
2007-01-09 02:39:15 +00:00
|
|
|
|
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 )
|
2007-01-09 02:39:15 +00:00
|
|
|
{
|
2017-04-24 07:47:24 +02:00
|
|
|
for ( int a = 0, na = 0; a < argc; ++a )
|
|
|
|
{
|
2007-01-09 02:39:15 +00:00
|
|
|
// See if it was removed.
|
2017-04-24 07:47:24 +02:00
|
|
|
if ( argv[na] == argv[a + argc + 1] )
|
|
|
|
++na;
|
2007-01-09 02:39:15 +00:00
|
|
|
else
|
2017-04-24 07:47:24 +02:00
|
|
|
PyList_SetSlice( argvlist, na, na + 1, NULL );
|
|
|
|
}
|
2007-01-09 02:39:15 +00:00
|
|
|
}
|
|
|
|
%End
|
|
|
|
public:
|
2015-11-10 17:08:27 +11:00
|
|
|
|
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;
|
2017-04-10 08:42:28 +10:00
|
|
|
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" )];
|
2007-01-09 02:39:15 +00:00
|
|
|
%MethodCode
|
2017-04-24 07:47:24 +02:00
|
|
|
// The Python interface is a list of argument strings that is modified.
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-04-24 07:47:24 +02:00
|
|
|
int argc;
|
|
|
|
char **argv;
|
2012-09-24 02:28:15 +02:00
|
|
|
|
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;
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-04-10 08:42:28 +10:00
|
|
|
sipCpp = new sipQgsApplication( nargc, argv, a1, *a2, *a3 );
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-04-24 07:47:24 +02:00
|
|
|
// Now modify the original list.
|
|
|
|
qtgui_UpdatePyArgv( a0, argc, argv );
|
|
|
|
}
|
2007-01-09 02:39:15 +00:00
|
|
|
%End
|
|
|
|
|
2017-12-15 08:57:22 +10:00
|
|
|
~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-12-15 08:57:22 +10:00
|
|
|
|
2017-04-24 07:47:24 +02:00
|
|
|
%Docstring
|
|
|
|
Watch for QFileOpenEvent.
|
|
|
|
%End
|
|
|
|
|
|
|
|
virtual bool notify( QObject *receiver, QEvent *event );
|
2017-12-15 08:57:22 +10:00
|
|
|
|
2017-04-24 07:47:24 +02:00
|
|
|
%Docstring
|
|
|
|
Catch exceptions when sending event to receiver.
|
|
|
|
%End
|
|
|
|
|
|
|
|
static void setFileOpenEventReceiver( QObject *receiver );
|
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Sets the FileOpen event receiver
|
2017-04-24 07:47:24 +02:00
|
|
|
%End
|
|
|
|
|
2017-02-21 18:14:58 +01:00
|
|
|
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
|
2008-07-28 18:08:44 +00:00
|
|
|
|
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
|
|
|
|
|
2015-08-28 16:42:41 +02:00
|
|
|
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
|
2015-08-28 16:42:41 +02:00
|
|
|
|
|
|
|
static void setUITheme( const QString &themeName );
|
2017-04-24 07:47:24 +02:00
|
|
|
%Docstring
|
2018-05-26 14:10:30 +10:00
|
|
|
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
|
2015-08-28 16:42:41 +02:00
|
|
|
|
|
|
|
static QHash<QString, QString> uiThemes();
|
2017-04-24 07:47:24 +02:00
|
|
|
%Docstring
|
2018-05-26 14:10:30 +10:00
|
|
|
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
|
2007-01-09 02:39:15 +00:00
|
|
|
|
2015-08-28 16:42:41 +02:00
|
|
|
static QString authorsFilePath();
|
2017-04-24 07:47:24 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the path to the authors file.
|
|
|
|
%End
|
2007-01-09 02:39:15 +00:00
|
|
|
|
2015-08-28 16:42:41 +02:00
|
|
|
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
|
2010-04-23 15:20:24 +00:00
|
|
|
|
2015-08-28 16:42:41 +02:00
|
|
|
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,
|
2018-08-28 03:12:40 +07:00
|
|
|
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
|
2015-08-28 16:42:41 +02:00
|
|
|
|
|
|
|
static QString sponsorsFilePath();
|
2017-04-24 07:47:24 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the path to the sponsors file.
|
|
|
|
%End
|
2009-07-03 15:42:42 +00:00
|
|
|
|
2015-08-28 16:42:41 +02:00
|
|
|
static QString donorsFilePath();
|
2017-04-24 07:47:24 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the path to the donors file.
|
|
|
|
%End
|
2009-07-03 15:42:42 +00:00
|
|
|
|
2017-09-29 16:25:10 +01:00
|
|
|
static QString serverResourcesPath();
|
|
|
|
%Docstring
|
|
|
|
Returns the path to the server resources directory.
|
|
|
|
%End
|
|
|
|
|
2015-08-28 16:42:41 +02:00
|
|
|
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
|
2009-07-03 15:42:42 +00:00
|
|
|
|
2015-08-28 16:42:41 +02:00
|
|
|
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
|
|
|
|
2015-08-28 16:42:41 +02:00
|
|
|
static QString i18nPath();
|
2017-04-24 07:47:24 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the path to the translation directory.
|
|
|
|
%End
|
2007-01-09 02:39:15 +00:00
|
|
|
|
2017-09-23 11:08:32 +07:00
|
|
|
static QString metadataPath();
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the path to the metadata directory.
|
|
|
|
|
2017-09-23 11:08:32 +07:00
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
|
|
|
|
2017-02-06 09:21:38 +10:00
|
|
|
static QString qgisMasterDatabaseFilePath();
|
2017-04-24 07:47:24 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the path to the master qgis.db file.
|
|
|
|
%End
|
2007-01-09 02:39:15 +00:00
|
|
|
|
2015-08-28 16:42:41 +02:00
|
|
|
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
|
2012-08-02 23:57:11 +02:00
|
|
|
|
2017-02-06 09:21:38 +10:00
|
|
|
static QString qgisUserDatabaseFilePath();
|
2017-04-24 07:47:24 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the path to the user qgis.db file.
|
|
|
|
%End
|
2007-01-09 02:39:15 +00:00
|
|
|
|
2017-02-06 09:21:38 +10:00
|
|
|
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
|
2015-09-21 04:43:15 -06:00
|
|
|
|
2015-08-28 16:42:41 +02:00
|
|
|
static QString splashPath();
|
2017-04-24 07:47:24 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the path to the splash screen image directory.
|
|
|
|
%End
|
2007-01-09 02:39:15 +00:00
|
|
|
|
2015-08-28 16:42:41 +02:00
|
|
|
static QString iconsPath();
|
2017-04-24 07:47:24 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the path to the icons image directory.
|
|
|
|
%End
|
2007-01-09 02:39:15 +00:00
|
|
|
|
2017-02-06 09:21:38 +10:00
|
|
|
static QString srsDatabaseFilePath();
|
2017-04-24 07:47:24 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the path to the srs.db file.
|
|
|
|
%End
|
2007-01-09 02:39:15 +00:00
|
|
|
|
2015-08-28 16:42:41 +02:00
|
|
|
static QStringList svgPaths();
|
2017-04-24 07:47:24 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the paths to svg directories.
|
|
|
|
%End
|
2009-10-26 19:50:08 +00:00
|
|
|
|
2018-01-16 21:34:19 +10:00
|
|
|
static QStringList layoutTemplatePaths();
|
2017-04-24 07:47:24 +02:00
|
|
|
%Docstring
|
2018-01-16 21:34:19 +10:00
|
|
|
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
|
|
|
|
2015-08-28 16:42:41 +02:00
|
|
|
static QMap<QString, QString> systemEnvVars();
|
2017-04-24 07:47:24 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the system environment variables passed to application.
|
|
|
|
%End
|
2013-01-01 19:48:31 -07:00
|
|
|
|
2015-08-28 16:42:41 +02:00
|
|
|
static QString prefixPath();
|
2017-04-24 07:47:24 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the path to the application prefix directory.
|
|
|
|
%End
|
2007-01-09 02:39:15 +00:00
|
|
|
|
2015-08-28 16:42:41 +02:00
|
|
|
static QString pluginPath();
|
2017-04-24 07:47:24 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the path to the application plugin directory.
|
|
|
|
%End
|
2007-01-09 02:39:15 +00:00
|
|
|
|
2015-08-28 16:42:41 +02:00
|
|
|
static QString pkgDataPath();
|
2017-04-24 07:47:24 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the common root path of all application data directories.
|
|
|
|
%End
|
2007-01-09 02:39:15 +00:00
|
|
|
|
2015-08-28 16:42:41 +02:00
|
|
|
static QString activeThemePath();
|
2017-04-24 07:47:24 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the path to the currently active theme directory.
|
|
|
|
%End
|
2008-07-28 01:24:27 +00:00
|
|
|
|
2015-08-28 16:42:41 +02:00
|
|
|
static QString defaultThemePath();
|
2017-04-24 07:47:24 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the path to the default theme directory.
|
|
|
|
%End
|
2012-08-02 23:57:11 +02:00
|
|
|
|
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
|
2010-04-23 15:20:24 +00:00
|
|
|
|
2017-02-21 18:14:58 +01:00
|
|
|
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
|
2012-08-02 23:57:11 +02:00
|
|
|
|
2017-11-24 19:34:32 +01:00
|
|
|
enum Cursor
|
|
|
|
{
|
|
|
|
ZoomIn,
|
|
|
|
ZoomOut,
|
|
|
|
Identify,
|
|
|
|
CrossHair,
|
|
|
|
CapturePoint,
|
|
|
|
Select,
|
|
|
|
Sampler,
|
|
|
|
};
|
|
|
|
|
2018-02-02 14:33:38 +10:00
|
|
|
static QCursor getThemeCursor( Cursor cursor );
|
2017-11-24 19:34:32 +01:00
|
|
|
%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.
|
2017-11-24 19:34:32 +01:00
|
|
|
%End
|
|
|
|
|
2017-02-21 18:14:58 +01:00
|
|
|
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
|
2012-08-02 23:57:11 +02:00
|
|
|
|
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
|
2010-04-23 15:20:24 +00:00
|
|
|
|
2015-12-07 18:17:06 +01:00
|
|
|
static QRegExp shortNameRegExp();
|
2017-04-24 07:47:24 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the short name regular expression for line edit validator
|
|
|
|
%End
|
2015-12-07 18:17:06 +01:00
|
|
|
|
2016-01-14 07:59:51 +11:00
|
|
|
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.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`userFullName`
|
2018-05-28 11:31:08 -04:00
|
|
|
|
|
|
|
.. versionadded:: 2.14
|
2017-04-24 07:47:24 +02:00
|
|
|
%End
|
2016-01-14 07:59:51 +11:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`userLoginName`
|
2018-05-28 11:31:08 -04:00
|
|
|
|
|
|
|
.. versionadded:: 2.14
|
2017-04-24 07:47:24 +02:00
|
|
|
%End
|
2016-01-14 07:59:51 +11:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`platform`
|
2018-05-28 11:31:08 -04:00
|
|
|
|
|
|
|
.. versionadded:: 2.14
|
2017-04-24 07:47:24 +02:00
|
|
|
%End
|
2016-01-14 07:59:51 +11:00
|
|
|
|
|
|
|
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".
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`osName`
|
2018-05-28 11:31:08 -04:00
|
|
|
|
|
|
|
.. versionadded:: 2.14
|
2017-04-24 07:47:24 +02:00
|
|
|
%End
|
2016-01-14 07:59:51 +11:00
|
|
|
|
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
|
2010-04-23 15:20:24 +00:00
|
|
|
|
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
|
|
|
|
2015-08-28 16:42:41 +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
|
2011-07-24 13:57:00 +02:00
|
|
|
|
2015-08-28 16:42:41 +02:00
|
|
|
static QString libexecPath();
|
2017-04-24 07:47:24 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the path with utility executables (help viewer, crssync, ...)
|
2018-04-26 13:33:48 +02:00
|
|
|
%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
|
2011-07-24 13:57:00 +02:00
|
|
|
|
2017-02-21 18:14:58 +01:00
|
|
|
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
|
2012-08-02 23:57:11 +02:00
|
|
|
|
2017-02-21 18:14:58 +01:00
|
|
|
static void setPluginPath( const QString &pluginPath );
|
2017-04-24 07:47:24 +02:00
|
|
|
%Docstring
|
|
|
|
Alters plugin path - used by 3rd party apps
|
|
|
|
%End
|
2007-01-09 02:39:15 +00:00
|
|
|
|
2017-02-21 18:14:58 +01:00
|
|
|
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
|
2010-04-01 08:06:19 +00:00
|
|
|
|
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
|
2012-08-02 23:57:11 +02:00
|
|
|
|
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
|
|
|
|
2007-01-09 02:39:15 +00:00
|
|
|
static void initQgis();
|
2017-04-24 07:47:24 +02:00
|
|
|
%Docstring
|
|
|
|
loads providers
|
|
|
|
%End
|
2007-01-09 02:39:15 +00:00
|
|
|
|
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
|
|
|
|
2007-01-09 02:39:15 +00:00
|
|
|
static void exitQgis();
|
2017-04-24 07:47:24 +02:00
|
|
|
%Docstring
|
|
|
|
deletes provider registry and map layer registry
|
|
|
|
%End
|
2012-08-02 23:57:11 +02:00
|
|
|
|
2016-01-04 22:51:18 +11:00
|
|
|
static QString appIconPath();
|
2017-04-24 07:47:24 +02:00
|
|
|
%Docstring
|
2018-05-26 18:44:30 +10:00
|
|
|
Gets application icon
|
2017-04-24 07:47:24 +02:00
|
|
|
%End
|
2016-01-04 22:51:18 +11:00
|
|
|
|
2007-01-09 02:39:15 +00:00
|
|
|
enum endian_t
|
|
|
|
{
|
2017-04-24 07:47:24 +02:00
|
|
|
XDR,
|
|
|
|
NDR
|
2007-01-09 02:39:15 +00:00
|
|
|
};
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2007-01-09 02:39:15 +00:00
|
|
|
static endian_t endian();
|
2017-04-24 07:47:24 +02:00
|
|
|
%Docstring
|
|
|
|
Returns whether this machine uses big or little endian
|
|
|
|
%End
|
|
|
|
|
2008-08-05 21:11:58 +00:00
|
|
|
static QString reportStyleSheet();
|
2017-04-24 07:47:24 +02:00
|
|
|
%Docstring
|
2018-05-26 18:44:30 +10:00
|
|
|
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
|
2008-08-05 21:11:58 +00:00
|
|
|
|
|
|
|
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
|
2008-08-05 21:11:58 +00:00
|
|
|
|
2008-08-27 21:56:29 +00:00
|
|
|
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
|
2008-08-27 21:56:29 +00:00
|
|
|
|
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
|
2011-07-25 19:12:40 +02:00
|
|
|
|
|
|
|
static bool isRunningFromBuildDir();
|
2017-04-24 07:47:24 +02:00
|
|
|
%Docstring
|
|
|
|
Indicates whether running from build directory (not installed)
|
|
|
|
%End
|
2011-07-25 19:12:40 +02:00
|
|
|
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
|
2011-07-25 19:12:40 +02:00
|
|
|
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
|
2011-07-25 19:12:40 +02:00
|
|
|
|
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
|
2011-09-12 17:28:45 +02:00
|
|
|
|
|
|
|
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
|
2011-09-12 17:28:45 +02:00
|
|
|
|
2014-05-27 23:22:50 +02:00
|
|
|
static int maxThreads();
|
2017-04-24 07:47:24 +02:00
|
|
|
%Docstring
|
2018-05-26 18:44:30 +10:00
|
|
|
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
|
|
|
|
|
2019-02-06 11:53:00 +01:00
|
|
|
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
|
|
|
|
|
2019-02-06 11:53:00 +01:00
|
|
|
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
|
|
|
|
|
2019-02-06 11:53:00 +01:00
|
|
|
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
|
|
|
|
|
|
|
|
|
2019-02-06 11:53:00 +01:00
|
|
|
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.
|
|
|
|
|
2018-12-03 12:22:52 +10:00
|
|
|
.. seealso:: :py:func:`imageCache`
|
|
|
|
|
2017-04-24 07:47:24 +02:00
|
|
|
.. versionadded:: 3.0
|
2018-12-03 12:22:52 +10:00
|
|
|
%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
|
2018-04-26 14:46:31 -04:00
|
|
|
%End
|
|
|
|
|
2019-02-06 11:53:00 +01:00
|
|
|
static QgsNetworkContentFetcherRegistry *networkContentFetcherRegistry() /KeepReference/;
|
2018-04-26 14:46:31 -04:00
|
|
|
%Docstring
|
2018-04-27 08:33:28 -04:00
|
|
|
Returns the application's network content registry used for fetching temporary files during QGIS session
|
2018-04-26 14:46:31 -04:00
|
|
|
|
|
|
|
.. versionadded:: 3.2
|
2018-11-28 17:03:07 +10:00
|
|
|
%End
|
|
|
|
|
2019-02-06 11:53:00 +01:00
|
|
|
static QgsValidityCheckRegistry *validityCheckRegistry() /KeepReference/;
|
2018-11-28 17:03:07 +10:00
|
|
|
%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
|
|
|
|
|
2018-01-14 19:29:13 +01:00
|
|
|
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
|
|
|
|
|
2017-10-24 15:55:07 +02:00
|
|
|
static QgsAuthManager *authManager();
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the application's authentication manager instance
|
|
|
|
|
2017-10-24 15:55:07 +02:00
|
|
|
.. 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
|
|
|
|
2017-10-24 15:55:07 +02: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
|
|
|
|
|
2017-06-29 07:56:33 +10:00
|
|
|
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.
|
|
|
|
|
2017-06-29 07:56:33 +10:00
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
|
|
|
|
2017-04-24 07:47:24 +02:00
|
|
|
|
2019-02-06 11:53:00 +01: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
|
|
|
|
|
2019-02-06 11:53:00 +01:00
|
|
|
static QgsFieldFormatterRegistry *fieldFormatterRegistry() /KeepReference/;
|
2017-04-24 07:47:24 +02:00
|
|
|
%Docstring
|
2018-05-26 18:44:30 +10:00
|
|
|
Gets the registry of available field formatters.
|
2017-04-24 07:47:24 +02:00
|
|
|
%End
|
2013-05-03 00:21:49 +02:00
|
|
|
|
2019-02-06 11:53:00 +01:00
|
|
|
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
|
2018-03-21 11:22:04 +01:00
|
|
|
%End
|
|
|
|
|
2019-02-06 11:53:00 +01:00
|
|
|
static QgsProjectStorageRegistry *projectStorageRegistry() /KeepReference/;
|
2018-03-21 11:22:04 +01:00
|
|
|
%Docstring
|
|
|
|
Returns registry of available project storage implementations.
|
|
|
|
|
|
|
|
.. versionadded:: 3.2
|
2017-09-15 16:44:42 +02:00
|
|
|
%End
|
2017-07-26 17:01:12 +02:00
|
|
|
|
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.
|
|
|
|
|
2018-09-16 21:16:28 +02:00
|
|
|
.. versionadded:: 3.4
|
|
|
|
%End
|
|
|
|
|
2018-09-17 09:15:35 +02:00
|
|
|
static void setTranslation( const QString &translation );
|
2018-09-16 21:16:28 +02:00
|
|
|
%Docstring
|
|
|
|
Set translation
|
|
|
|
|
2018-08-07 17:08:56 +02:00
|
|
|
.. versionadded:: 3.4
|
2018-07-31 20:32:54 +02:00
|
|
|
%End
|
|
|
|
|
|
|
|
void collectTranslatableObjects( QgsTranslationContext *translationContext );
|
|
|
|
%Docstring
|
|
|
|
Emits the signal to collect all the strings of .qgs to be included in ts file
|
|
|
|
|
2018-10-13 15:40:57 +02:00
|
|
|
.. 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
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
signals:
|
2016-07-19 11:59:44 +10:00
|
|
|
|
2016-12-21 14:05:28 +01:00
|
|
|
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()
|
2018-08-07 14:18:45 +02:00
|
|
|
%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``.
|
|
|
|
|
2018-10-13 15:40:57 +02:00
|
|
|
.. versionadded:: 3.4
|
|
|
|
%End
|
|
|
|
|
2007-01-09 02:39:15 +00:00
|
|
|
};
|
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 *
|
|
|
|
************************************************************************/
|