15 #ifndef QGSAPPLICATION_H
16 #define QGSAPPLICATION_H
18 #include <QApplication>
20 #include <QStringList>
23 #include <qgsconfig.h>
39 QgsApplication(
int & argc,
char ** argv,
bool GUIenabled, QString customConfigPath = QString() );
47 static void init( QString customConfigPath = QString() );
50 virtual bool event( QEvent * event );
53 virtual bool notify( QObject * receiver, QEvent * event );
56 static void setFileOpenEventReceiver( QObject * receiver );
67 static void setThemeName(
const QString &theThemeName );
75 static const QString themeName();
78 static const QString authorsFilePath();
84 static const QString contributorsFilePath();
88 static const QString sponsorsFilePath();
92 static const QString donorsFilePath();
98 static const QString translatorsFilePath();
103 static const QString licenceFilePath();
106 static const QString helpAppPath();
109 static const QString i18nPath();
112 static const QString qgisMasterDbFilePath();
115 static const QString qgisSettingsDirPath();
118 static const QString qgisUserDbFilePath();
121 static const QString splashPath();
124 static const QString iconsPath();
127 static const QString srsDbFilePath();
131 static const QStringList svgPaths();
138 static const QString prefixPath();
141 static const QString pluginPath();
144 static const QString pkgDataPath();
147 static const QString activeThemePath();
150 static const QString defaultThemePath();
155 static QString iconPath( QString iconFile );
160 static QIcon getThemeIcon(
const QString &theName );
165 static QPixmap getThemePixmap(
const QString &theName );
168 static const QString userStyleV2Path();
171 static const QString defaultStyleV2Path();
175 static const QString libraryPath();
179 static const QString libexecPath();
182 static void setPrefixPath(
const QString &thePrefixPath,
bool useDefaultPaths =
false );
185 static void setPluginPath(
const QString &thePluginPath );
188 static void setPkgDataPath(
const QString &thePkgDataPath );
191 static void setDefaultSvgPaths(
const QStringList& pathList );
194 static void initQgis();
197 static bool createDB( QString* errorMessage = 0 );
200 static void exitQgis();
211 static endian_t endian();
221 static QString reportStyleSheet();
225 static QString showSettings();
233 static void registerOgrDrivers();
237 static QString absolutePathToRelativePath( QString apath, QString targetPath );
240 static QString relativePathToAbsolutePath( QString rpath, QString targetPath );
246 static QString cfgIntDir() {
return ABISYM( mCfgIntDir ); }
260 static void skipGdalDriver( QString theDriver );
267 static void restoreGdalDriver( QString theDriver );
280 static void applyGdalSkippedDrivers();
284 bool x11EventFilter( XEvent * event )
292 void preNotify( QObject * receiver, QEvent * event,
bool * done );
295 static QObject*
ABISYM( mFileOpenEventReceiver );
296 static QStringList
ABISYM( mFileOpenEventList );
298 static QString
ABISYM( mPrefixPath );
299 static QString
ABISYM( mPluginPath );
300 static QString
ABISYM( mPkgDataPath );
301 static QString
ABISYM( mLibraryPath );
302 static QString
ABISYM( mLibexecPath );
303 static QString
ABISYM( mThemeName );
304 static QStringList
ABISYM( mDefaultSvgPaths );
305 static QMap<QString, QString>
ABISYM( mSystemEnvVars );
307 static QString
ABISYM( mConfigPath );
310 static bool ABISYM( mRunningFromBuildDir );
312 static QString
ABISYM( mBuildSourcePath );
315 static QString
ABISYM( mCfgIntDir );
318 static QString
ABISYM( mBuildOutputPath );
322 static QStringList
ABISYM( mGdalSkipList );