15 #ifndef QGSAPPLICATION_H    16 #define QGSAPPLICATION_H    18 #include "qgis_core.h"    19 #include <QApplication>    21 #include <QStringList>    24 #include "qgsconfig.h"    46 class QgsAnnotationRegistry;
    81     static char **qtgui_ArgvToC( PyObject *argvlist, 
int &argc )
    85       argc = PyList_GET_SIZE( argvlist );
    89       if ( ( argv = ( 
char ** )sipMalloc( 2 * ( argc + 1 ) * 
sizeof( 
char * ) ) ) == NULL )
    93       for ( 
int a = 0; a < argc; ++a )
    97         if ( ( arg = PyBytes_AsString( PyList_GET_ITEM( argvlist, a ) ) ) == NULL ||
    98              ( argv[a] = ( 
char * )sipMalloc( strlen( arg ) + 1 ) ) == NULL )
   101         strcpy( argv[a], arg );
   102         argv[a + argc + 1] = argv[a];
   105       argv[argc + argc + 1] = argv[argc] = NULL;
   112     static void qtgui_UpdatePyArgv( PyObject *argvlist, 
int argc, 
char **argv )
   114       for ( 
int a = 0, na = 0; a < argc; ++a )
   117         if ( argv[na] == argv[a + argc + 1] )
   120           PyList_SetSlice( argvlist, na, na + 1, NULL );
   148     QgsApplication( 
int &argc, 
char **argv, 
bool GUIenabled, 
const QString &profileFolder = QString(), 
const QString &platformName = 
"desktop" );
   150     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" )];
   158     if ( ( argv = qtgui_ArgvToC( a0, argc ) ) == NULL )
   163       static int nargc = argc;
   165       sipCpp = 
new sipQgsApplication( nargc, argv, a1, *a2, *a3 );
   168       qtgui_UpdatePyArgv( a0, argc, argv );
   189     static void init( QString profileFolder = QString() ) 
SIP_SKIP;
   192     bool event( QEvent *event ) override;
   195     bool notify( QObject *receiver, QEvent *event ) override;
   198     static 
void setFileOpenEventReceiver( QObject *receiver );
   210     static 
void setThemeName( const QString &themeName );
   216     static QString resolvePkgPath();
   225     static QString themeName();
   234     static 
void setUITheme( const QString &themeName );
   242     static QHash<QString, QString> uiThemes();
   245     static QString authorsFilePath();
   251     static QString contributorsFilePath();
   258     static QString developersMapFilePath();
   261     static QString sponsorsFilePath();
   264     static QString donorsFilePath();
   267     static QString serverResourcesPath();
   272     static QString translatorsFilePath();
   277     static QString licenceFilePath();
   280     static QString i18nPath();
   286     static QString metadataPath();
   289     static QString qgisMasterDatabaseFilePath();
   292     static QString qgisSettingsDirPath();
   295     static QString qgisUserDatabaseFilePath();
   298     static QString qgisAuthDatabaseFilePath();
   301     static QString splashPath();
   304     static QString iconsPath();
   307     static QString srsDatabaseFilePath();
   310     static QStringList svgPaths();
   316     static QStringList layoutTemplatePaths();
   319     static QMap<QString, QString> systemEnvVars();
   322     static QString prefixPath();
   325     static QString pluginPath();
   328     static QString pkgDataPath();
   331     static QString activeThemePath();
   334     static QString defaultThemePath();
   340     static QString iconPath( const QString &iconFile );
   346     static QIcon getThemeIcon( const QString &name );
   369     static QCursor getThemeCursor( 
Cursor cursor );
   375     static QPixmap getThemePixmap( 
const QString &name );
   378     static QString userStylePath();
   381     static QRegExp shortNameRegExp();
   388     static QString userLoginName();
   395     static QString userFullName();
   402     static QString osName();
   409     static QString platform();
   415     static QString locale();
   418     static QString userThemesFolder();
   421     static QString defaultStylePath();
   424     static QString defaultThemesFolder();
   427     static QString libraryPath();
   430     static QString libexecPath();
   438     static QString qmlImportPath();
   441     static void setPrefixPath( 
const QString &prefixPath, 
bool useDefaultPaths = 
false );
   444     static void setPluginPath( 
const QString &pluginPath );
   447     static void setPkgDataPath( 
const QString &pkgDataPath );
   450     static void setDefaultSvgPaths( 
const QStringList &pathList );
   453     static void setAuthDatabaseDirPath( 
const QString &authDbDirPath );
   456     static void initQgis();
   459     static bool createDatabase( QString *errorMessage = 
nullptr );
   462     static bool createThemeFolder();
   465     static void exitQgis();
   468     static QString appIconPath();
   499     static QString showSettings();
   508     static void registerOgrDrivers();
   511     static QString absolutePathToRelativePath( 
const QString &apath, 
const QString &targetPath );
   513     static QString relativePathToAbsolutePath( 
const QString &rpath, 
const QString &targetPath );
   517 #if defined(_MSC_VER) && !defined(USING_NMAKE) && !defined(USING_NINJA)   518     static QString cfgIntDir() 
SIP_SKIP;
   520     static QString buildSourcePath();
   523     static QString buildOutputPath();
   530     static void skipGdalDriver( 
const QString &driver );
   537     static void restoreGdalDriver( 
const QString &driver );
   543     static QStringList skippedGdalDrivers();
   551     static void applyGdalSkippedDrivers();
   557     static void registerGdalDriversFromSettings();
   565     static QStringList deferredSkippedGdalDrivers();
   573     static void setSkippedGdalDrivers( 
const QStringList &skippedGdalDrivers,
   574                                        const QStringList &deferredSkippedGdalDrivers );
   579     static int maxThreads();
   585     static void setMaxThreads( 
int maxThreads );
   738     static QgsAnnotationRegistry *annotationRegistry() 
SIP_SKIP;
   785     static QString nullRepresentation();
   790     static void setNullRepresentation( 
const QString &nullRepresentation );
   799     static QVariantMap customVariables();
   808     static void setCustomVariables( 
const QVariantMap &customVariables );
   815     static void setCustomVariable( 
const QString &name, 
const QVariant &value );
   825     int maxConcurrentConnectionsPerPool() 
const;
   832     static void setTranslation( 
const QString &translation );
   844     bool x11EventFilter( XEvent *event );
   850     void preNotify( QObject *receiver, QEvent *event, 
bool *done ) 
SIP_SKIP;
   856     void customVariablesChanged();
   862     void nullRepresentationChanged();
   874     static void copyPath( 
const QString &src, 
const QString &dst );
   875     static QObject *
ABISYM( mFileOpenEventReceiver );
   877     static bool ABISYM( mInitialized );
   880     static bool ABISYM( mRunningFromBuildDir );
   884     static int ABISYM( sMaxThreads );
   886     QMap<QString, QIcon> mIconCache;
   887     QMap<Cursor, QCursor> mCursorCache;
   889     QTranslator *mQgisTranslator = 
nullptr;
   890     QTranslator *mQtTranslator = 
nullptr;
   895     struct ApplicationMembers
   899       QgsAnnotationRegistry *mAnnotationRegistry = 
nullptr;
   925       QString mNullRepresentation;
   927       ApplicationMembers();
   928       ~ApplicationMembers();
   932     ApplicationMembers *mApplicationMembers = 
nullptr;
   934     static ApplicationMembers *sApplicationMembers;
   938     static ApplicationMembers *members();
   940     static void invalidateCaches();
 A QAbstractItemModel subclass for showing symbol and color ramp entities contained within a QgsStyle ...
 
Singleton offering an interface to manage the authentication configuration database and to utilize co...
 
This class keeps a list of data item providers that may add items to the browser tree. 
 
Extends QApplication to provide access to QGIS specific resources such as theme paths, database paths etc. 
 
Cursor
The Cursor enum defines constants for QGIS custom cursors. 
 
Registry of color schemes. 
 
A registry of plugin layers types. 
 
A cache for images / pictures derived from svg files. 
 
Registry for raster renderers. 
 
StyleSheet for Qt GUI widgets (based on QLabel or QTextBrowser), supports basic CSS and Qt extensions...
 
User profile contains information about the user profile folders on the machine. 
 
Precisely identify a point on the canvas. 
 
Manages storage of a set of bookmarks. 
 
This class keeps a list of QgsAbstractValidityCheck checks which can be used when performing validity...
 
static bool isRunningFromBuildDir()
Indicates whether running from build directory (not installed) 
 
endian_t
Constants for endian-ness. 
 
Keeps track of available 3D renderers. 
 
Registry of available symbol layer classes. 
 
Registry for temporary fetched files. 
 
#define SIP_KEEPREFERENCE
 
A registry for known page sizes. 
 
static const char * QGIS_ORGANIZATION_NAME
 
This class manages all known classification methods. 
 
Task manager for managing a set of long-running QgsTask tasks. 
 
Used for the collecting of strings from projects for translation and creation of ts files...
 
#define SIP_IF_FEATURE(feature)
 
StyleSheetType
The StyleSheetType enum represents the stylesheet type that a widget supports. 
 
Identify: obtain information about the object. 
 
Registry for various processing components, including providers, algorithms and various parameters an...
 
static const char * QGIS_ORGANIZATION_DOMAIN
 
Registry of available layout item types. 
 
A class to register / unregister existing GPS connections such that the information is available to a...
 
Registry of available callout classes. 
 
QObject * ABISYM(QgsApplication::mFileOpenEventReceiver)
 
A cache for images derived from raster files. 
 
Registry of storage backends that QgsProject may use. 
 
The action scope registry is an application wide registry that contains a list of available action sc...
 
static const char * QGIS_APPLICATION_NAME
 
User profile manager is used to manager list, and manage user profiles on the users machine...
 
Interface for logging messages from QGIS in GUI independent way. 
 
Select and capture a point or a feature. 
 
Registry of available paint effects.