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 );
55 virtual bool notify( QObject * receiver, QEvent * event );
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();
88 static const QString sponsorsFilePath();
91 static const QString donorsFilePath();
96 static const QString translatorsFilePath();
101 static const QString licenceFilePath();
104 static const QString helpAppPath();
107 static const QString i18nPath();
110 static const QString qgisMasterDbFilePath();
113 static const QString qgisSettingsDirPath();
116 static const QString qgisUserDbFilePath();
119 static const QString splashPath();
122 static const QString iconsPath();
125 static const QString srsDbFilePath();
128 static const QStringList svgPaths();
134 static const QString prefixPath();
137 static const QString pluginPath();
140 static const QString pkgDataPath();
143 static const QString activeThemePath();
146 static const QString defaultThemePath();
150 static QString
iconPath( QString iconFile );
154 static QIcon getThemeIcon(
const QString &theName );
158 static QPixmap getThemePixmap(
const QString &theName );
161 static const QString userStyleV2Path();
164 static const QString defaultStyleV2Path();
167 static const QString libraryPath();
170 static const QString libexecPath();
173 static void setPrefixPath(
const QString &thePrefixPath,
bool useDefaultPaths =
false );
176 static void setPluginPath(
const QString &thePluginPath );
179 static void setPkgDataPath(
const QString &thePkgDataPath );
182 static void setDefaultSvgPaths(
const QStringList& pathList );
185 static void initQgis();
188 static bool createDB( QString* errorMessage = 0 );
191 static void exitQgis();
202 static endian_t endian();
212 static QString reportStyleSheet();
216 static QString showSettings();
224 static void registerOgrDrivers();
228 static QString absolutePathToRelativePath( QString apath, QString targetPath );
231 static QString relativePathToAbsolutePath( QString rpath, QString targetPath );
236 static QString cfgIntDir() {
return ABISYM( mCfgIntDir ); }
247 static void skipGdalDriver( QString theDriver );
253 static void restoreGdalDriver( QString theDriver );
264 static void applyGdalSkippedDrivers();
272 static void setMaxThreads(
int maxThreads );
276 bool x11EventFilter( XEvent * event )
284 void preNotify( QObject * receiver, QEvent * event,
bool * done );
287 static QObject*
ABISYM( mFileOpenEventReceiver );
288 static QStringList
ABISYM( mFileOpenEventList );
290 static QString
ABISYM( mPrefixPath );
291 static QString
ABISYM( mPluginPath );
292 static QString
ABISYM( mPkgDataPath );
293 static QString
ABISYM( mLibraryPath );
294 static QString
ABISYM( mLibexecPath );
295 static QString
ABISYM( mThemeName );
296 static QStringList
ABISYM( mDefaultSvgPaths );
297 static QMap<QString, QString>
ABISYM( mSystemEnvVars );
299 static QString
ABISYM( mConfigPath );
302 static bool ABISYM( mRunningFromBuildDir );
304 static QString
ABISYM( mBuildSourcePath );
307 static QString
ABISYM( mCfgIntDir );
310 static QString
ABISYM( mBuildOutputPath );
313 static QStringList
ABISYM( mGdalSkipList );
316 static int ABISYM( mMaxThreads );