QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
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;
77class QgsFontManager;
79
94class CORE_EXPORT QgsApplication : public QApplication
95{
96
97#ifdef SIP_RUN
98 % TypeCode
99 // Convert a Python argv list to a conventional C argc count and argv array.
100 static char **qtgui_ArgvToC( PyObject *argvlist, int &argc )
101 {
102 char **argv;
103
104 argc = PyList_GET_SIZE( argvlist );
105
106 // Allocate space for two copies of the argument pointers, plus the
107 // terminating NULL.
108 if ( ( argv = ( char ** )sipMalloc( 2 * ( argc + 1 ) * sizeof( char * ) ) ) == NULL )
109 return NULL;
110
111 // Convert the list.
112 for ( int a = 0; a < argc; ++a )
113 {
114 char *arg;
115 // Get the argument and allocate memory for it.
116 if ( ( arg = PyBytes_AsString( PyList_GET_ITEM( argvlist, a ) ) ) == NULL ||
117 ( argv[a] = ( char * )sipMalloc( strlen( arg ) + 1 ) ) == NULL )
118 return NULL;
119 // Copy the argument and save a pointer to it.
120 strcpy( argv[a], arg );
121 argv[a + argc + 1] = argv[a];
122 }
123
124 argv[argc + argc + 1] = argv[argc] = NULL;
125
126 return argv;
127 }
128
129 // Remove arguments from the Python argv list that have been removed from the
130 // C argv array.
131 static void qtgui_UpdatePyArgv( PyObject *argvlist, int argc, char **argv )
132 {
133 for ( int a = 0, na = 0; a < argc; ++a )
134 {
135 // See if it was removed.
136 if ( argv[na] == argv[a + argc + 1] )
137 ++na;
138 else
139 PyList_SetSlice( argvlist, na, na + 1, NULL );
140 }
141 }
142 % End
143#endif
144
145 Q_OBJECT
146
147 public:
148
158 {
161 };
162
163 static const char *QGIS_ORGANIZATION_NAME;
164 static const char *QGIS_ORGANIZATION_DOMAIN;
165 static const char *QGIS_APPLICATION_NAME;
166#ifndef SIP_RUN
167
177 QgsApplication( int &argc, char **argv, bool GUIenabled, const QString &profileFolder = QString(), const QString &platformName = "external" );
178#else
179
188 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" )];
189 % MethodCode
190 // The Python interface is a list of argument strings that is modified.
191
192 int argc;
193 char **argv;
194
195 // Convert the list.
196 if ( ( argv = qtgui_ArgvToC( a0, argc ) ) == NULL )
197 sipIsErr = 1;
198 else
199 {
200 // Create it now the arguments are right.
201 static int nargc = argc;
202
203 sipCpp = new sipQgsApplication( nargc, argv, a1, *a2, *a3 );
204
205 // Now modify the original list.
206 qtgui_UpdatePyArgv( a0, argc, argv );
207 }
208 % End
209#endif
210
211 ~QgsApplication() override;
212
218 static QgsApplication *instance();
219
227 static void init( QString profileFolder = QString() ) SIP_SKIP;
228
230 bool event( QEvent *event ) override;
231
233 bool notify( QObject *receiver, QEvent *event ) override;
234
236 static void setFileOpenEventReceiver( QObject *receiver );
237
248 static void setThemeName( const QString &themeName );
249
254 static QString resolvePkgPath();
255
263 static QString themeName();
264
272 static void setUITheme( const QString &themeName );
273
280 static QHash<QString, QString> uiThemes();
281
283 static QString authorsFilePath();
284
290 static QString contributorsFilePath();
291
298 static QString developersMapFilePath();
299
301 static QString sponsorsFilePath();
302
304 static QString donorsFilePath();
305
307 static QString serverResourcesPath();
308
312 static QString translatorsFilePath();
313
317 static QString licenceFilePath();
318
320 static QString i18nPath();
321
326 static QString metadataPath();
327
329 static QString qgisMasterDatabaseFilePath();
330
332 static QString qgisSettingsDirPath();
333
335 static QString qgisUserDatabaseFilePath();
336
338 static QString qgisAuthDatabaseFilePath();
339
341 static QString splashPath();
342
344 static QString iconsPath();
345
347 static QString srsDatabaseFilePath();
348
354 static void setSvgPaths( const QStringList &svgPaths );
355
357 static QStringList svgPaths();
358
363 static QStringList layoutTemplatePaths();
364
366 static QMap<QString, QString> systemEnvVars();
367
369 static QString prefixPath();
370
372 static QString pluginPath();
373
375 static QString pkgDataPath();
376
378 static QString activeThemePath();
379
381 static QString defaultThemePath();
382
387 static QString iconPath( const QString &iconFile );
388
396 static QIcon getThemeIcon( const QString &name, const QColor &fillColor = QColor(), const QColor &strokeColor = QColor() );
397
403 {
411 };
412
419 static QCursor getThemeCursor( Cursor cursor );
420
429 static QPixmap getThemePixmap( const QString &name, const QColor &foreColor = QColor(), const QColor &backColor = QColor(), int size = 16 );
430
432 static QString userStylePath();
433
439 static QRegularExpression shortNameRegularExpression();
440
446 static QString userLoginName();
447
453 static QString userFullName();
454
460 static QString osName();
461
469 static int systemMemorySizeMb();
470
476 static QString platform();
477
478
490 static QString applicationFullName();
491
496 static QString locale();
497
504 static void setLocale( const QLocale &locale );
505
507 static QString userThemesFolder();
508
510 static QString defaultStylePath();
511
513 static QString defaultThemesFolder();
514
516 static QString libraryPath();
517
519 static QString libexecPath();
520
527 static QString qmlImportPath();
528
530 static void setPrefixPath( const QString &prefixPath, bool useDefaultPaths = false );
531
533 static void setPluginPath( const QString &pluginPath );
534
536 static void setPkgDataPath( const QString &pkgDataPath );
537
539 static void setDefaultSvgPaths( const QStringList &pathList );
540
542 static void setAuthDatabaseDirPath( const QString &authDbDirPath );
543
545 static void initQgis();
546
548 static bool createDatabase( QString *errorMessage = nullptr );
549
551 static bool createThemeFolder();
552
554 static void exitQgis();
555
557 static QString appIconPath();
558
561 {
562 XDR = 0, // network, or big-endian, byte order
563 NDR = 1 // little-endian byte order
564 };
565
567 static endian_t endian();
568
583 static QString reportStyleSheet( QgsApplication::StyleSheetType styleSheetType = QgsApplication::StyleSheetType::Qt );
584
589 static QString showSettings();
590
598 static void registerOgrDrivers();
599
601 static QString absolutePathToRelativePath( const QString &apath, const QString &targetPath );
603 static QString relativePathToAbsolutePath( const QString &rpath, const QString &targetPath );
604
606 static bool isRunningFromBuildDir() { return ABISYM( mRunningFromBuildDir ); }
607#if defined(_MSC_VER) && !defined(USING_NMAKE) && !defined(USING_NINJA)
608 static QString cfgIntDir() SIP_SKIP;
609#endif
611 static QString buildSourcePath();
613 static QString buildOutputPath();
614
620 static void skipGdalDriver( const QString &driver );
621
627 static void restoreGdalDriver( const QString &driver );
628
633 static QStringList skippedGdalDrivers();
634
641 static void applyGdalSkippedDrivers();
642
647 static void registerGdalDriversFromSettings();
648
655 static QStringList deferredSkippedGdalDrivers();
656
663 static void setSkippedGdalDrivers( const QStringList &skippedGdalDrivers,
664 const QStringList &deferredSkippedGdalDrivers );
665
670 static int maxThreads();
671
677 static void setMaxThreads( int maxThreads );
678
684 static QgsTaskManager *taskManager();
685
691 Q_DECL_DEPRECATED static QgsSettingsRegistryCore *settingsRegistryCore() SIP_KEEPREFERENCE SIP_DEPRECATED;
692
697 static QgsColorSchemeRegistry *colorSchemeRegistry() SIP_KEEPREFERENCE;
698
703 static QgsPaintEffectRegistry *paintEffectRegistry() SIP_KEEPREFERENCE;
704
709 static QgsRendererRegistry *rendererRegistry() SIP_KEEPREFERENCE;
710
716 static QgsRasterRendererRegistry *rasterRendererRegistry() SIP_SKIP;
717
722 static QgsPointCloudRendererRegistry *pointCloudRendererRegistry() SIP_KEEPREFERENCE;
723
729 static QgsDataItemProviderRegistry *dataItemProviderRegistry() SIP_KEEPREFERENCE;
730
737 static QgsCoordinateReferenceSystemRegistry *coordinateReferenceSystemRegistry() SIP_KEEPREFERENCE;
738
746 static QgsSvgCache *svgCache();
747
754 static QgsImageCache *imageCache();
755
761 static QgsSourceCache *sourceCache();
762
767 static QgsNetworkContentFetcherRegistry *networkContentFetcherRegistry() SIP_KEEPREFERENCE;
768
773 static QgsValidityCheckRegistry *validityCheckRegistry() SIP_KEEPREFERENCE;
774
779 static QgsSymbolLayerRegistry *symbolLayerRegistry() SIP_KEEPREFERENCE;
780
785 static QgsCalloutRegistry *calloutRegistry() SIP_KEEPREFERENCE;
786
791 static QgsLayoutItemRegistry *layoutItemRegistry() SIP_KEEPREFERENCE;
792
797 static QgsAnnotationItemRegistry *annotationItemRegistry() SIP_KEEPREFERENCE;
798
803 static QgsGpsConnectionRegistry *gpsConnectionRegistry() SIP_KEEPREFERENCE;
804
809 static QgsBabelFormatRegistry *gpsBabelFormatRegistry() SIP_KEEPREFERENCE;
810
815 static QgsPluginLayerRegistry *pluginLayerRegistry() SIP_KEEPREFERENCE;
816
821 static QgsClassificationMethodRegistry *classificationMethodRegistry() SIP_KEEPREFERENCE;
822
827 static QgsBookmarkManager *bookmarkManager();
828
834 static QgsTileDownloadManager *tileDownloadManager() SIP_SKIP;
835
840 static QgsRecentStyleHandler *recentStyleHandler() SIP_KEEPREFERENCE;
841
847 static QgsDatabaseQueryLog *databaseQueryLog() SIP_KEEPREFERENCE;
848
856 static QgsStyleModel *defaultStyleModel();
857
863 static QgsFontManager *fontManager() SIP_KEEPREFERENCE;
864
869 static QgsSensorRegistry *sensorRegistry() SIP_KEEPREFERENCE;
870
875 static QgsMessageLog *messageLog();
876
883 static QgsAuthManager *authManager();
884
890 static QgsProcessingRegistry *processingRegistry();
891
896 static QgsPageSizeRegistry *pageSizeRegistry() SIP_KEEPREFERENCE;
897
903 static QgsAnnotationRegistry *annotationRegistry() SIP_SKIP;
904
910 static QgsActionScopeRegistry *actionScopeRegistry() SIP_KEEPREFERENCE;
911
916 static QgsConnectionRegistry *connectionRegistry();
917
922 static QgsRuntimeProfiler *profiler();
923
929 static QgsNumericFormatRegistry *numericFormatRegistry() SIP_KEEPREFERENCE;
930
934 static QgsFieldFormatterRegistry *fieldFormatterRegistry() SIP_KEEPREFERENCE;
935
940 static Qgs3DRendererRegistry *renderer3DRegistry() SIP_KEEPREFERENCE;
941
946 static Qgs3DSymbolRegistry *symbol3DRegistry() SIP_KEEPREFERENCE;
947
953 static QgsScaleBarRendererRegistry *scaleBarRendererRegistry() SIP_KEEPREFERENCE;
954
959 static QgsProjectStorageRegistry *projectStorageRegistry() SIP_KEEPREFERENCE;
960
965 static QgsLayerMetadataProviderRegistry *layerMetadataProviderRegistry() SIP_KEEPREFERENCE;
966
971 static QgsExternalStorageRegistry *externalStorageRegistry() SIP_KEEPREFERENCE;
972
980 static QgsLocalizedDataPathRegistry *localizedDataPathRegistry() SIP_KEEPREFERENCE;
981
990 static QString nullRepresentation();
991
995 static void setNullRepresentation( const QString &nullRepresentation );
996
1004 static QVariantMap customVariables();
1005
1013 static void setCustomVariables( const QVariantMap &customVariables );
1014
1020 static void setCustomVariable( const QString &name, const QVariant &value );
1021
1031 static int scaleIconSize( int standardSize, bool applyDevicePixelRatio = false );
1032
1041 int maxConcurrentConnectionsPerPool() const;
1042
1048 static void setTranslation( const QString &translation );
1049
1055 QString translation() const;
1056
1062 void collectTranslatableObjects( QgsTranslationContext *translationContext );
1063
1064
1065#ifndef SIP_RUN
1076#endif
1077
1078#ifdef SIP_RUN
1079 SIP_IF_FEATURE( ANDROID )
1080 //dummy method to workaround sip generation issue
1081 bool x11EventFilter( XEvent *event );
1082 SIP_END
1083#endif
1084
1085 signals:
1087 void preNotify( QObject *receiver, QEvent *event, bool *done ) SIP_SKIP;
1088
1094
1095
1100
1108
1109
1116
1117
1118 private:
1119
1120 static void copyPath( const QString &src, const QString &dst );
1121 static QObject *ABISYM( mFileOpenEventReceiver );
1122
1123 static bool ABISYM( mInitialized );
1124
1126 static bool ABISYM( mRunningFromBuildDir );
1127
1131 static int ABISYM( sMaxThreads );
1132
1133 QMap<QString, QIcon> mIconCache;
1134 QMap<Cursor, QCursor> mCursorCache;
1135
1136 QTranslator *mQgisTranslator = nullptr;
1137 QTranslator *mQtTranslator = nullptr;
1138 QTranslator *mQtBaseTranslator = nullptr;
1139
1140 QgsDataItemProviderRegistry *mDataItemProviderRegistry = nullptr;
1141 QgsAuthManager *mAuthManager = nullptr;
1142
1143 struct ApplicationMembers
1144 {
1145 QgsSettingsRegistryCore *mSettingsRegistryCore = nullptr;
1146 QgsCoordinateReferenceSystemRegistry *mCrsRegistry = nullptr;
1147 Qgs3DRendererRegistry *m3DRendererRegistry = nullptr;
1148 Qgs3DSymbolRegistry *m3DSymbolRegistry = nullptr;
1149 QgsActionScopeRegistry *mActionScopeRegistry = nullptr;
1150 QgsAnnotationRegistry *mAnnotationRegistry = nullptr;
1151 QgsColorSchemeRegistry *mColorSchemeRegistry = nullptr;
1152 QgsLocalizedDataPathRegistry *mLocalizedDataPathRegistry = nullptr;
1153 QgsNumericFormatRegistry *mNumericFormatRegistry = nullptr;
1154 QgsFieldFormatterRegistry *mFieldFormatterRegistry = nullptr;
1155 QgsGpsConnectionRegistry *mGpsConnectionRegistry = nullptr;
1156 QgsBabelFormatRegistry *mGpsBabelFormatRegistry = nullptr;
1157 QgsNetworkContentFetcherRegistry *mNetworkContentFetcherRegistry = nullptr;
1158 QgsScaleBarRendererRegistry *mScaleBarRendererRegistry = nullptr;
1159 QgsValidityCheckRegistry *mValidityCheckRegistry = nullptr;
1160 QgsMessageLog *mMessageLog = nullptr;
1161 QgsPaintEffectRegistry *mPaintEffectRegistry = nullptr;
1162 QgsPluginLayerRegistry *mPluginLayerRegistry = nullptr;
1163 QgsClassificationMethodRegistry *mClassificationMethodRegistry = nullptr;
1164 QgsProcessingRegistry *mProcessingRegistry = nullptr;
1165 QgsConnectionRegistry *mConnectionRegistry = nullptr;
1166 QgsProjectStorageRegistry *mProjectStorageRegistry = nullptr;
1167 QgsLayerMetadataProviderRegistry *mLayerMetadataProviderRegistry = nullptr;
1168 QgsExternalStorageRegistry *mExternalStorageRegistry = nullptr;
1169 QgsPageSizeRegistry *mPageSizeRegistry = nullptr;
1170 QgsRasterRendererRegistry *mRasterRendererRegistry = nullptr;
1171 QgsRendererRegistry *mRendererRegistry = nullptr;
1172 QgsPointCloudRendererRegistry *mPointCloudRendererRegistry = nullptr;
1173 QgsSvgCache *mSvgCache = nullptr;
1174 QgsImageCache *mImageCache = nullptr;
1175 QgsSourceCache *mSourceCache = nullptr;
1176 QgsSymbolLayerRegistry *mSymbolLayerRegistry = nullptr;
1177 QgsCalloutRegistry *mCalloutRegistry = nullptr;
1178 QgsTaskManager *mTaskManager = nullptr;
1179 QgsLayoutItemRegistry *mLayoutItemRegistry = nullptr;
1180 QgsAnnotationItemRegistry *mAnnotationItemRegistry = nullptr;
1181 QgsSensorRegistry *mSensorRegistry = nullptr;
1182 QgsUserProfileManager *mUserConfigManager = nullptr;
1183 QgsBookmarkManager *mBookmarkManager = nullptr;
1184 QgsTileDownloadManager *mTileDownloadManager = nullptr;
1185 QgsStyleModel *mStyleModel = nullptr;
1186 QgsRecentStyleHandler *mRecentStyleHandler = nullptr;
1187 QgsDatabaseQueryLog *mQueryLogger = nullptr;
1188 QgsFontManager *mFontManager;
1189 QString mNullRepresentation;
1190 QStringList mSvgPathCache;
1191 bool mSvgPathCacheValid = false;
1192
1193 ApplicationMembers();
1194 ~ApplicationMembers();
1195 };
1196
1197 // Applications members which belong to an instance of QgsApplication
1198 ApplicationMembers *mApplicationMembers = nullptr;
1199 // ... but in case QgsApplication is never instantiated (eg with custom designer widgets), we fall back to static members
1200 static ApplicationMembers *sApplicationMembers;
1201
1202 static QgsAuthManager *sAuthManager;
1203
1204 static ApplicationMembers *members();
1205
1206 static void invalidateCaches();
1207
1212 void installTranslators() SIP_SKIP;
1213
1214 friend class TestQgsApplication;
1215};
1216
1217// clazy:excludeall=qstring-allocations
1218
1219#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.
@ ZoomIn
Zoom in.
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.
Definition: qgsmessagelog.h:40
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.
Definition: qgssvgcache.h:123
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.
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...
int scaleIconSize(int standardSize)
Scales an icon size to compensate for display pixel density, making the icon size hi-dpi friendly,...
#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)