QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
qgsapplication.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsapplication.h - Accessors for application-wide data
3 --------------------------------------
4 Date : 02-Jan-2006
5 Copyright : (C) 2006 by Tom Elwertowski
6 Email : telwertowski at users dot sourceforge dot net
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15#ifndef QGSAPPLICATION_H
16#define QGSAPPLICATION_H
17
18#include "qgis_core.h"
19#include <QApplication>
20#include <QEvent>
21#include <QStringList>
22#include <QColor>
23
24#include <memory>
25#include "qgis_sip.h"
26#include "qgsconfig.h"
29
35class QgsTaskManager;
44class QgsSvgCache;
45class QgsImageCache;
46class QgsSourceCache;
54class QgsMessageLog;
56class QgsAnnotationRegistry;
57class QgsUserProfile;
61class QgsAuthManager;
64class QTranslator;
67class QgsStyleModel;
78class QgsFontManager;
80
95class CORE_EXPORT QgsApplication : public QApplication
96{
97
98#ifdef SIP_RUN
99 % TypeCode
100 // Convert a Python argv list to a conventional C argc count and argv array.
101 static char **qtgui_ArgvToC( PyObject *argvlist, int &argc )
102 {
103 char **argv;
104
105 argc = PyList_GET_SIZE( argvlist );
106
107 // Allocate space for two copies of the argument pointers, plus the
108 // terminating NULL.
109 if ( ( argv = ( char ** )sipMalloc( 2 * ( argc + 1 ) * sizeof( char * ) ) ) == NULL )
110 return NULL;
111
112 // Convert the list.
113 for ( int a = 0; a < argc; ++a )
114 {
115 char *arg;
116 // Get the argument and allocate memory for it.
117 if ( ( arg = PyBytes_AsString( PyList_GET_ITEM( argvlist, a ) ) ) == NULL ||
118 ( argv[a] = ( char * )sipMalloc( strlen( arg ) + 1 ) ) == NULL )
119 return NULL;
120 // Copy the argument and save a pointer to it.
121 strcpy( argv[a], arg );
122 argv[a + argc + 1] = argv[a];
123 }
124
125 argv[argc + argc + 1] = argv[argc] = NULL;
126
127 return argv;
128 }
129
130 // Remove arguments from the Python argv list that have been removed from the
131 // C argv array.
132 static void qtgui_UpdatePyArgv( PyObject *argvlist, int argc, char **argv )
133 {
134 for ( int a = 0, na = 0; a < argc; ++a )
135 {
136 // See if it was removed.
137 if ( argv[na] == argv[a + argc + 1] )
138 ++na;
139 else
140 PyList_SetSlice( argvlist, na, na + 1, NULL );
141 }
142 }
143 % End
144#endif
145
146 Q_OBJECT
147
148 public:
149
163
164 static const char *QGIS_ORGANIZATION_NAME;
165 static const char *QGIS_ORGANIZATION_DOMAIN;
166 static const char *QGIS_APPLICATION_NAME;
167#ifndef SIP_RUN
168
178 QgsApplication( int &argc, char **argv, bool GUIenabled, const QString &profileFolder = QString(), const QString &platformName = "external" );
179#else
180
189 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" )];
190 % MethodCode
191 // The Python interface is a list of argument strings that is modified.
192
193 int argc;
194 char **argv;
195
196 // Convert the list.
197 if ( ( argv = qtgui_ArgvToC( a0, argc ) ) == NULL )
198 sipIsErr = 1;
199 else
200 {
201 // Create it now the arguments are right.
202 static int nargc = argc;
203
204 sipCpp = new sipQgsApplication( nargc, argv, a1, *a2, *a3 );
205
206 // Now modify the original list.
207 qtgui_UpdatePyArgv( a0, argc, argv );
208 }
209 % End
210#endif
211
212 ~QgsApplication() override;
213
219 static QgsApplication *instance();
220
228 static void init( QString profileFolder = QString() ) SIP_SKIP;
229
231 bool event( QEvent *event ) override;
232
234 bool notify( QObject *receiver, QEvent *event ) override;
235
237 static void setFileOpenEventReceiver( QObject *receiver );
238
249 static void setThemeName( const QString &themeName );
250
255 static QString resolvePkgPath();
256
264 static QString themeName();
265
273 static void setUITheme( const QString &themeName );
274
281 static QHash<QString, QString> uiThemes();
282
284 static QString authorsFilePath();
285
291 static QString contributorsFilePath();
292
299 static QString developersMapFilePath();
300
302 static QString sponsorsFilePath();
303
305 static QString donorsFilePath();
306
308 static QString serverResourcesPath();
309
313 static QString translatorsFilePath();
314
318 static QString licenceFilePath();
319
321 static QString i18nPath();
322
327 static QString metadataPath();
328
330 static QString qgisMasterDatabaseFilePath();
331
333 static QString qgisSettingsDirPath();
334
336 static QString qgisUserDatabaseFilePath();
337
339 static QString qgisAuthDatabaseFilePath();
340
342 static QString splashPath();
343
345 static QString iconsPath();
346
348 static QString srsDatabaseFilePath();
349
355 static void setSvgPaths( const QStringList &svgPaths );
356
358 static QStringList svgPaths();
359
364 static QStringList layoutTemplatePaths();
365
367 static QMap<QString, QString> systemEnvVars();
368
370 static QString prefixPath();
371
373 static QString pluginPath();
374
376 static QString pkgDataPath();
377
379 static QString activeThemePath();
380
382 static QString defaultThemePath();
383
388 static QString iconPath( const QString &iconFile );
389
397 static QIcon getThemeIcon( const QString &name, const QColor &fillColor = QColor(), const QColor &strokeColor = QColor() );
398
413
420 static QCursor getThemeCursor( Cursor cursor );
421
430 static QPixmap getThemePixmap( const QString &name, const QColor &foreColor = QColor(), const QColor &backColor = QColor(), int size = 16 );
431
433 static QString userStylePath();
434
440 static QRegularExpression shortNameRegularExpression();
441
447 static QString userLoginName();
448
454 static QString userFullName();
455
461 static QString osName();
462
470 static int systemMemorySizeMb();
471
477 static QString platform();
478
479
491 static QString applicationFullName();
492
497 static QString locale();
498
505 static void setLocale( const QLocale &locale );
506
508 static QString userThemesFolder();
509
511 static QString defaultStylePath();
512
514 static QString defaultThemesFolder();
515
517 static QString libraryPath();
518
520 static QString libexecPath();
521
528 static QString qmlImportPath();
529
531 static void setPrefixPath( const QString &prefixPath, bool useDefaultPaths = false );
532
534 static void setPluginPath( const QString &pluginPath );
535
537 static void setPkgDataPath( const QString &pkgDataPath );
538
540 static void setDefaultSvgPaths( const QStringList &pathList );
541
543 static void setAuthDatabaseDirPath( const QString &authDbDirPath );
544
546 static void initQgis();
547
549 static bool createDatabase( QString *errorMessage = nullptr );
550
552 static bool createThemeFolder();
553
555 static void exitQgis();
556
558 static QString appIconPath();
559
562 {
563 XDR = 0, // network, or big-endian, byte order
564 NDR = 1 // little-endian byte order
565 };
566
568 static endian_t endian();
569
584 static QString reportStyleSheet( QgsApplication::StyleSheetType styleSheetType = QgsApplication::StyleSheetType::Qt );
585
590 static QString showSettings();
591
599 static void registerOgrDrivers();
600
602 static QString absolutePathToRelativePath( const QString &apath, const QString &targetPath );
604 static QString relativePathToAbsolutePath( const QString &rpath, const QString &targetPath );
605
607 static bool isRunningFromBuildDir() { return ABISYM( mRunningFromBuildDir ); }
608#if defined(_MSC_VER) && !defined(USING_NMAKE) && !defined(USING_NINJA)
609 static QString cfgIntDir() SIP_SKIP;
610#endif
612 static QString buildSourcePath();
614 static QString buildOutputPath();
615
621 static void skipGdalDriver( const QString &driver );
622
628 static void restoreGdalDriver( const QString &driver );
629
634 static QStringList skippedGdalDrivers();
635
642 static void applyGdalSkippedDrivers();
643
648 static void registerGdalDriversFromSettings();
649
656 static QStringList deferredSkippedGdalDrivers();
657
664 static void setSkippedGdalDrivers( const QStringList &skippedGdalDrivers,
665 const QStringList &deferredSkippedGdalDrivers );
666
671 static int maxThreads();
672
678 static void setMaxThreads( int maxThreads );
679
685 static QgsTaskManager *taskManager();
686
692 Q_DECL_DEPRECATED static QgsSettingsRegistryCore *settingsRegistryCore() SIP_KEEPREFERENCE SIP_DEPRECATED;
693
698 static QgsColorSchemeRegistry *colorSchemeRegistry() SIP_KEEPREFERENCE;
699
704 static QgsPaintEffectRegistry *paintEffectRegistry() SIP_KEEPREFERENCE;
705
710 static QgsRendererRegistry *rendererRegistry() SIP_KEEPREFERENCE;
711
717 static QgsRasterRendererRegistry *rasterRendererRegistry() SIP_SKIP;
718
723 static QgsPointCloudRendererRegistry *pointCloudRendererRegistry() SIP_KEEPREFERENCE;
724
729 static QgsTiledSceneRendererRegistry *tiledSceneRendererRegistry() SIP_KEEPREFERENCE;
730
736 static QgsDataItemProviderRegistry *dataItemProviderRegistry() SIP_KEEPREFERENCE;
737
744 static QgsCoordinateReferenceSystemRegistry *coordinateReferenceSystemRegistry() SIP_KEEPREFERENCE;
745
753 static QgsSvgCache *svgCache();
754
761 static QgsImageCache *imageCache();
762
768 static QgsSourceCache *sourceCache();
769
774 static QgsNetworkContentFetcherRegistry *networkContentFetcherRegistry() SIP_KEEPREFERENCE;
775
780 static QgsValidityCheckRegistry *validityCheckRegistry() SIP_KEEPREFERENCE;
781
786 static QgsSymbolLayerRegistry *symbolLayerRegistry() SIP_KEEPREFERENCE;
787
792 static QgsCalloutRegistry *calloutRegistry() SIP_KEEPREFERENCE;
793
798 static QgsLayoutItemRegistry *layoutItemRegistry() SIP_KEEPREFERENCE;
799
804 static QgsAnnotationItemRegistry *annotationItemRegistry() SIP_KEEPREFERENCE;
805
810 static QgsGpsConnectionRegistry *gpsConnectionRegistry() SIP_KEEPREFERENCE;
811
816 static QgsBabelFormatRegistry *gpsBabelFormatRegistry() SIP_KEEPREFERENCE;
817
822 static QgsPluginLayerRegistry *pluginLayerRegistry() SIP_KEEPREFERENCE;
823
828 static QgsClassificationMethodRegistry *classificationMethodRegistry() SIP_KEEPREFERENCE;
829
834 static QgsBookmarkManager *bookmarkManager();
835
841 static QgsTileDownloadManager *tileDownloadManager() SIP_SKIP;
842
847 static QgsRecentStyleHandler *recentStyleHandler() SIP_KEEPREFERENCE;
848
854 static QgsDatabaseQueryLog *databaseQueryLog() SIP_KEEPREFERENCE;
855
863 static QgsStyleModel *defaultStyleModel();
864
870 static QgsFontManager *fontManager() SIP_KEEPREFERENCE;
871
876 static QgsSensorRegistry *sensorRegistry() SIP_KEEPREFERENCE;
877
882 static QgsMessageLog *messageLog();
883
890 static QgsAuthManager *authManager();
891
897 static QgsProcessingRegistry *processingRegistry();
898
903 static QgsPageSizeRegistry *pageSizeRegistry() SIP_KEEPREFERENCE;
904
910 static QgsAnnotationRegistry *annotationRegistry() SIP_SKIP;
911
917 static QgsActionScopeRegistry *actionScopeRegistry() SIP_KEEPREFERENCE;
918
923 static QgsConnectionRegistry *connectionRegistry();
924
929 static QgsRuntimeProfiler *profiler();
930
936 static QgsNumericFormatRegistry *numericFormatRegistry() SIP_KEEPREFERENCE;
937
941 static QgsFieldFormatterRegistry *fieldFormatterRegistry() SIP_KEEPREFERENCE;
942
947 static Qgs3DRendererRegistry *renderer3DRegistry() SIP_KEEPREFERENCE;
948
953 static Qgs3DSymbolRegistry *symbol3DRegistry() SIP_KEEPREFERENCE;
954
960 static QgsScaleBarRendererRegistry *scaleBarRendererRegistry() SIP_KEEPREFERENCE;
961
966 static QgsProjectStorageRegistry *projectStorageRegistry() SIP_KEEPREFERENCE;
967
972 static QgsLayerMetadataProviderRegistry *layerMetadataProviderRegistry() SIP_KEEPREFERENCE;
973
978 static QgsExternalStorageRegistry *externalStorageRegistry() SIP_KEEPREFERENCE;
979
987 static QgsLocalizedDataPathRegistry *localizedDataPathRegistry() SIP_KEEPREFERENCE;
988
997 static QString nullRepresentation();
998
1002 static void setNullRepresentation( const QString &nullRepresentation );
1003
1011 static QVariantMap customVariables();
1012
1020 static void setCustomVariables( const QVariantMap &customVariables );
1021
1027 static void setCustomVariable( const QString &name, const QVariant &value );
1028
1038 static int scaleIconSize( int standardSize, bool applyDevicePixelRatio = false );
1039
1048 int maxConcurrentConnectionsPerPool() const;
1049
1055 static void setTranslation( const QString &translation );
1056
1062 QString translation() const;
1063
1069 void collectTranslatableObjects( QgsTranslationContext *translationContext );
1070
1071
1072#ifndef SIP_RUN
1083#endif
1084
1085#ifdef SIP_RUN
1086 SIP_IF_FEATURE( ANDROID )
1087 //dummy method to workaround sip generation issue
1088 bool x11EventFilter( XEvent *event );
1089 SIP_END
1090#endif
1091
1092 signals:
1094 void preNotify( QObject *receiver, QEvent *event, bool *done ) SIP_SKIP;
1095
1101
1102
1107
1115
1116
1123
1124
1125 private:
1126
1127 static void copyPath( const QString &src, const QString &dst );
1128 static QObject *ABISYM( mFileOpenEventReceiver );
1129
1130 static bool ABISYM( mInitialized );
1131
1133 static bool ABISYM( mRunningFromBuildDir );
1134
1138 static int ABISYM( sMaxThreads );
1139
1140 QMap<QString, QIcon> mIconCache;
1141 QMap<Cursor, QCursor> mCursorCache;
1142
1143 QTranslator *mQgisTranslator = nullptr;
1144 QTranslator *mQtTranslator = nullptr;
1145 QTranslator *mQtBaseTranslator = nullptr;
1146
1147 QgsDataItemProviderRegistry *mDataItemProviderRegistry = nullptr;
1148 QgsAuthManager *mAuthManager = nullptr;
1149
1150 struct ApplicationMembers
1151 {
1152 QgsSettingsRegistryCore *mSettingsRegistryCore = nullptr;
1153 QgsCoordinateReferenceSystemRegistry *mCrsRegistry = nullptr;
1154 Qgs3DRendererRegistry *m3DRendererRegistry = nullptr;
1155 Qgs3DSymbolRegistry *m3DSymbolRegistry = nullptr;
1156 QgsActionScopeRegistry *mActionScopeRegistry = nullptr;
1157 QgsAnnotationRegistry *mAnnotationRegistry = nullptr;
1158 QgsColorSchemeRegistry *mColorSchemeRegistry = nullptr;
1159 QgsLocalizedDataPathRegistry *mLocalizedDataPathRegistry = nullptr;
1160 QgsNumericFormatRegistry *mNumericFormatRegistry = nullptr;
1161 QgsFieldFormatterRegistry *mFieldFormatterRegistry = nullptr;
1162 QgsGpsConnectionRegistry *mGpsConnectionRegistry = nullptr;
1163 QgsBabelFormatRegistry *mGpsBabelFormatRegistry = nullptr;
1164 QgsNetworkContentFetcherRegistry *mNetworkContentFetcherRegistry = nullptr;
1165 QgsScaleBarRendererRegistry *mScaleBarRendererRegistry = nullptr;
1166 QgsValidityCheckRegistry *mValidityCheckRegistry = nullptr;
1167 QgsMessageLog *mMessageLog = nullptr;
1168 QgsPaintEffectRegistry *mPaintEffectRegistry = nullptr;
1169 QgsPluginLayerRegistry *mPluginLayerRegistry = nullptr;
1170 QgsClassificationMethodRegistry *mClassificationMethodRegistry = nullptr;
1171 QgsProcessingRegistry *mProcessingRegistry = nullptr;
1172 QgsConnectionRegistry *mConnectionRegistry = nullptr;
1173 QgsProjectStorageRegistry *mProjectStorageRegistry = nullptr;
1174 QgsLayerMetadataProviderRegistry *mLayerMetadataProviderRegistry = nullptr;
1175 QgsExternalStorageRegistry *mExternalStorageRegistry = nullptr;
1176 QgsPageSizeRegistry *mPageSizeRegistry = nullptr;
1177 QgsRasterRendererRegistry *mRasterRendererRegistry = nullptr;
1178 QgsRendererRegistry *mRendererRegistry = nullptr;
1179 QgsPointCloudRendererRegistry *mPointCloudRendererRegistry = nullptr;
1180 QgsTiledSceneRendererRegistry *mTiledSceneRendererRegistry = nullptr;
1181 QgsSvgCache *mSvgCache = nullptr;
1182 QgsImageCache *mImageCache = nullptr;
1183 QgsSourceCache *mSourceCache = nullptr;
1184 QgsSymbolLayerRegistry *mSymbolLayerRegistry = nullptr;
1185 QgsCalloutRegistry *mCalloutRegistry = nullptr;
1186 QgsTaskManager *mTaskManager = nullptr;
1187 QgsLayoutItemRegistry *mLayoutItemRegistry = nullptr;
1188 QgsAnnotationItemRegistry *mAnnotationItemRegistry = nullptr;
1189 QgsSensorRegistry *mSensorRegistry = nullptr;
1190 QgsUserProfileManager *mUserConfigManager = nullptr;
1191 QgsBookmarkManager *mBookmarkManager = nullptr;
1192 QgsTileDownloadManager *mTileDownloadManager = nullptr;
1193 QgsStyleModel *mStyleModel = nullptr;
1194 QgsRecentStyleHandler *mRecentStyleHandler = nullptr;
1195 QgsDatabaseQueryLog *mQueryLogger = nullptr;
1196 QgsFontManager *mFontManager;
1197 QString mNullRepresentation;
1198 QStringList mSvgPathCache;
1199 bool mSvgPathCacheValid = false;
1200
1201 ApplicationMembers();
1202 ~ApplicationMembers();
1203 };
1204
1205 // Applications members which belong to an instance of QgsApplication
1206 ApplicationMembers *mApplicationMembers = nullptr;
1207 // ... but in case QgsApplication is never instantiated (eg with custom designer widgets), we fall back to static members
1208 static ApplicationMembers *sApplicationMembers;
1209
1210 static QgsAuthManager *sAuthManager;
1211
1212 static ApplicationMembers *members();
1213
1214 static void invalidateCaches();
1215
1220 void installTranslators() SIP_SKIP;
1221
1222 friend class TestQgsApplication;
1223};
1224
1225// clazy:excludeall=qstring-allocations
1226
1227#endif
Keeps track of available 3D renderers.
Registry of available 3D symbol classes.
The action scope registry is an application wide registry that contains a list of available action sc...
Registry of available annotation item types.
Extends QApplication to provide access to QGIS specific resources such as theme paths,...
endian_t
Constants for endian-ness.
static const QgsSettingsEntryStringList * settingsSearchPathsForSVG
Settings entry search path for SVG.
static const QgsSettingsEntryBool * settingsLocaleOverrideFlag
Settings entry locale override flag.
void customVariablesChanged()
Emitted whenever a custom global variable changes.
StyleSheetType
The StyleSheetType enum represents the stylesheet type that a widget supports.
@ WebBrowser
StyleSheet for Qt GUI widgets (based on QLabel or QTextBrowser), supports basic CSS and Qt extensions...
static const QgsSettingsEntryString * settingsLocaleGlobalLocale
Settings entry locale global locale.
static const QgsSettingsEntryString * settingsLocaleUserLocale
Settings entry locale user locale.
static const char * QGIS_APPLICATION_NAME
static const char * QGIS_ORGANIZATION_DOMAIN
void preNotify(QObject *receiver, QEvent *event, bool *done)
void localeChanged()
Emitted when project locale has been changed.
static const char * QGIS_ORGANIZATION_NAME
Cursor
The Cursor enum defines constants for QGIS custom cursors.
@ ZoomOut
Zoom out.
@ CrossHair
Precisely identify a point on the canvas.
@ Identify
Identify: obtain information about the object.
@ Select
Select a rectangle.
@ CapturePoint
Select and capture a point or a feature.
@ Sampler
Color/Value picker.
void requestForTranslatableObjects(QgsTranslationContext *translationContext)
Emitted when project strings which require translation are being collected for inclusion in a ....
void nullRepresentationChanged()
This string is used to represent the value NULL throughout QGIS.
static const QgsSettingsEntryBool * settingsLocaleShowGroupSeparator
Settings entry locale show group separator.
static bool isRunningFromBuildDir()
Indicates whether running from build directory (not installed)
Singleton offering an interface to manage the authentication configuration database and to utilize co...
A registry for QgsAbstractBabelFormat GPSBabel formats.
Manages storage of a set of bookmarks.
Registry of available callout classes.
This class manages all known classification methods.
Registry of color schemes.
A registry for saved data provider connections, allowing retrieval of saved connections by name and p...
A registry for known coordinate reference system (CRS) definitions, including any user-defined CRSes.
This class keeps a list of data item providers that may add items to the browser tree.
Handles logging of database queries.
Registry of external storage backends used by QgsExternalResourceWidget.
The QgsFieldFormatterRegistry manages registered classes of QgsFieldFormatter.
Manages available fonts and font installation for a QGIS instance.
A class to register / unregister existing GPS connections such that the information is available to a...
A cache for images derived from raster files.
Registry of layer metadata provider backends.
Registry of available layout item types.
A registry class to hold localized data paths which can be used for basemaps, logos,...
Interface for logging messages from QGIS in GUI independent way.
Registry for temporary fetched files.
The QgsNumericFormatRegistry manages registered classes of QgsNumericFormat.
A registry for known page sizes.
Registry of available paint effects.
A registry of plugin layers types.
Registry of 2D renderers for point clouds.
Registry for various processing components, including providers, algorithms and various parameters an...
Registry of storage backends that QgsProject may use.
Registry for raster renderers.
Handles and tracks style items recently used in the QGIS GUI.
Registry of renderers.
Provides a method of recording run time profiles of operations, allowing easy recording of their over...
The QgsScaleBarRendererRegistry manages registered scalebar renderers.
Registry of available sensor types.
A boolean settings entry.
A string list settings entry.
A string settings entry.
QgsSettingsRegistryCore is used for settings introspection and collects all QgsSettingsEntry instance...
A cache for source strings that returns a local file path containing the source content.
A QAbstractItemModel subclass for showing symbol and color ramp entities contained within a QgsStyle ...
A cache for images / pictures derived from SVG files.
Registry of available symbol layer classes.
Task manager for managing a set of long-running QgsTask tasks.
Tile download manager handles downloads of map tiles for the purpose of map rendering.
Registry of 2D renderers for tiled scenes.
Used for the collecting of strings from projects for translation and creation of ts files.
User profile manager is used to manager list, and manage user profiles on the users machine.
User profile contains information about the user profile folders on the machine.
This class keeps a list of QgsAbstractValidityCheck checks which can be used when performing validity...
#define SIP_DEPRECATED
Definition qgis_sip.h:106
#define SIP_KEEPREFERENCE
Definition qgis_sip.h:86
#define SIP_SKIP
Definition qgis_sip.h:126
#define SIP_IF_FEATURE(feature)
Definition qgis_sip.h:176
#define SIP_END
Definition qgis_sip.h:203
QObject * ABISYM(QgsApplication::mFileOpenEventReceiver)