15 #ifndef QGSAPPLICATION_H
16 #define QGSAPPLICATION_H
18 #include <QApplication>
20 #include <QStringList>
23 #include <qgsconfig.h>
34 QgsApplication(
int & argc,
char ** argv,
bool GUIenabled, QString customConfigPath = QString() );
42 static void init( QString customConfigPath = QString() );
45 virtual bool event( QEvent * event );
48 virtual bool notify( QObject * receiver, QEvent * event );
51 static void setFileOpenEventReceiver( QObject * receiver );
62 static void setThemeName(
const QString theThemeName );
70 static const QString themeName();
73 static const QString authorsFilePath();
79 static const QString contributorsFilePath();
83 static const QString sponsorsFilePath();
87 static const QString donorsFilePath();
93 static const QString translatorsFilePath();
98 static const QString licenceFilePath();
101 static const QString helpAppPath();
104 static const QString i18nPath();
107 static const QString qgisMasterDbFilePath();
110 static const QString qgisSettingsDirPath();
113 static const QString qgisUserDbFilePath();
116 static const QString splashPath();
119 static const QString iconsPath();
122 static const QString srsDbFilePath();
126 static const QStringList svgPaths();
133 static const QString prefixPath();
136 static const QString pluginPath();
139 static const QString pkgDataPath();
142 static const QString activeThemePath();
145 static const QString defaultThemePath();
150 static QString iconPath( QString iconFile );
155 static QIcon getThemeIcon(
const QString theName );
160 static QPixmap getThemePixmap(
const QString theName );
163 static const QString userStyleV2Path();
166 static const QString defaultStyleV2Path();
170 static const QString libraryPath();
174 static const QString libexecPath();
177 static void setPrefixPath(
const QString thePrefixPath,
bool useDefaultPaths =
false );
180 static void setPluginPath(
const QString thePluginPath );
183 static void setPkgDataPath(
const QString thePkgDataPath );
186 static void setDefaultSvgPaths(
const QStringList& pathList );
189 static void initQgis();
192 static bool createDB( QString* errorMessage = 0 );
195 static void exitQgis();
206 static endian_t endian();
216 static QString reportStyleSheet();
220 static QString showSettings();
228 static void registerOgrDrivers();
232 static QString absolutePathToRelativePath( QString apath, QString targetPath );
235 static QString relativePathToAbsolutePath( QString rpath, QString targetPath );
241 static QString cfgIntDir() {
return ABISYM( mCfgIntDir ); }
255 static void skipGdalDriver( QString theDriver );
262 static void restoreGdalDriver( QString theDriver );
275 static void applyGdalSkippedDrivers();
279 void preNotify( QObject * receiver, QEvent * event,
bool * done );
282 static QObject*
ABISYM( mFileOpenEventReceiver );
283 static QStringList
ABISYM( mFileOpenEventList );
285 static QString
ABISYM( mPrefixPath );
286 static QString
ABISYM( mPluginPath );
287 static QString
ABISYM( mPkgDataPath );
288 static QString
ABISYM( mLibraryPath );
289 static QString
ABISYM( mLibexecPath );
290 static QString
ABISYM( mThemeName );
291 static QStringList
ABISYM( mDefaultSvgPaths );
292 static QMap<QString, QString>
ABISYM( mSystemEnvVars );
294 static QString
ABISYM( mConfigPath );
297 static bool ABISYM( mRunningFromBuildDir );
299 static QString
ABISYM( mBuildSourcePath );
302 static QString
ABISYM( mCfgIntDir );
305 static QString
ABISYM( mBuildOutputPath );
309 static QStringList
ABISYM( mGdalSkipList );