15 #ifndef QGSAPPLICATION_H
16 #define QGSAPPLICATION_H
18 #include <QApplication>
20 #include <QStringList>
23 #include <qgsconfig.h>
41 QgsApplication(
int & argc,
char ** argv,
bool GUIenabled, QString customConfigPath = QString() );
49 static void init( QString customConfigPath = QString() );
52 virtual bool event( QEvent * event )
override;
55 virtual bool notify( QObject * receiver, QEvent * event )
override;
58 static void setFileOpenEventReceiver( QObject * receiver );
69 static void setThemeName(
const QString &theThemeName );
77 static const QString themeName();
80 static const QString authorsFilePath();
85 static const QString contributorsFilePath();
91 static const QString developersMapFilePath();
94 static const QString sponsorsFilePath();
97 static const QString donorsFilePath();
102 static const QString translatorsFilePath();
107 static const QString licenceFilePath();
110 static const QString helpAppPath();
113 static const QString i18nPath();
116 static const QString qgisMasterDbFilePath();
119 static const QString qgisSettingsDirPath();
122 static const QString qgisUserDbFilePath();
125 static const QString splashPath();
128 static const QString iconsPath();
131 static const QString srsDbFilePath();
134 static const QStringList svgPaths();
140 static const QString prefixPath();
143 static const QString pluginPath();
146 static const QString pkgDataPath();
149 static const QString activeThemePath();
152 static const QString defaultThemePath();
156 static QString
iconPath( QString iconFile );
160 static QIcon getThemeIcon(
const QString &theName );
164 static QPixmap getThemePixmap(
const QString &theName );
167 static const QString userStyleV2Path();
170 static const QString defaultStyleV2Path();
173 static const QString libraryPath();
176 static const QString libexecPath();
179 static void setPrefixPath(
const QString &thePrefixPath,
bool useDefaultPaths =
false );
182 static void setPluginPath(
const QString &thePluginPath );
185 static void setPkgDataPath(
const QString &thePkgDataPath );
188 static void setDefaultSvgPaths(
const QStringList& pathList );
191 static void initQgis();
194 static bool createDB( QString* errorMessage = 0 );
197 static void exitQgis();
208 static endian_t endian();
218 static QString reportStyleSheet();
222 static QString showSettings();
230 static void registerOgrDrivers();
233 static QString absolutePathToRelativePath( QString apath, QString targetPath );
235 static QString relativePathToAbsolutePath( QString rpath, QString targetPath );
240 static QString cfgIntDir() {
return ABISYM( mCfgIntDir ); }
251 static void skipGdalDriver( QString theDriver );
257 static void restoreGdalDriver( QString theDriver );
268 static void applyGdalSkippedDrivers();
276 static void setMaxThreads(
int maxThreads );
280 bool x11EventFilter( XEvent * event )
288 void preNotify( QObject * receiver, QEvent * event,
bool * done );
291 static QObject*
ABISYM( mFileOpenEventReceiver );
292 static QStringList
ABISYM( mFileOpenEventList );
294 static QString
ABISYM( mPrefixPath );
295 static QString
ABISYM( mPluginPath );
296 static QString
ABISYM( mPkgDataPath );
297 static QString
ABISYM( mLibraryPath );
298 static QString
ABISYM( mLibexecPath );
299 static QString
ABISYM( mThemeName );
300 static QStringList
ABISYM( mDefaultSvgPaths );
301 static QMap<QString, QString>
ABISYM( mSystemEnvVars );
303 static QString
ABISYM( mConfigPath );
306 static bool ABISYM( mRunningFromBuildDir );
308 static QString
ABISYM( mBuildSourcePath );
311 static QString
ABISYM( mCfgIntDir );
314 static QString
ABISYM( mBuildOutputPath );
317 static QStringList
ABISYM( mGdalSkipList );
320 static int ABISYM( mMaxThreads );