15 #ifndef QGSAPPLICATION_H
16 #define QGSAPPLICATION_H
18 #include <QApplication>
20 #include <QStringList>
23 #include <qgsconfig.h>
58 static void setFileOpenEventReceiver(
QObject * receiver );
69 static void setThemeName(
const QString &theThemeName );
86 static void setUITheme(
const QString &themeName );
97 static QString authorsFilePath();
102 static QString contributorsFilePath();
108 static QString developersMapFilePath();
111 static QString sponsorsFilePath();
114 static QString donorsFilePath();
119 static QString translatorsFilePath();
124 static QString licenceFilePath();
133 static QString qgisMasterDbFilePath();
136 static QString qgisSettingsDirPath();
139 static QString qgisUserDbFilePath();
142 static QString qgisAuthDbFilePath();
151 static QString srsDbFilePath();
169 static QString activeThemePath();
172 static QString defaultThemePath();
187 static QString userStyleV2Path();
190 static QString userThemesFolder();
193 static QString defaultStyleV2Path();
196 static QString defaultThemesFolder();
205 static void setPrefixPath(
const QString &thePrefixPath,
bool useDefaultPaths =
false );
208 static void setPluginPath(
const QString &thePluginPath );
211 static void setPkgDataPath(
const QString &thePkgDataPath );
214 static void setDefaultSvgPaths(
const QStringList& pathList );
217 static void setAuthDbDirPath(
const QString& theAuthDbDirPath );
220 static void initQgis();
223 static bool createDB(
QString* errorMessage = 0 );
226 static bool createThemeFolder( );
229 static void exitQgis();
240 static endian_t endian();
246 char* data =
reinterpret_cast<char*
>( &value );
247 std::size_t n =
sizeof( value );
248 for ( std::size_t i = 0, m = n / 2; i < m; ++i )
250 std::swap( data[i], data[n - 1 - i] );
262 static QString reportStyleSheet();
274 static void registerOgrDrivers();
295 static void skipGdalDriver(
const QString& theDriver );
301 static void restoreGdalDriver(
const QString& theDriver );
312 static void applyGdalSkippedDrivers();
320 static void setMaxThreads(
int maxThreads );
332 void preNotify(
QObject * receiver,
QEvent * event,
bool * done );
352 static bool ABISYM( mRunningFromBuildDir );
366 static int ABISYM( mMaxThreads );
static void endian_swap(T &value)
Swap the endianness of the specified value.
Extends QApplication to provide access to QGIS specific resources such as theme paths, database paths etc.
static QStringList skippedGdalDrivers()
Returns the list of gdal drivers that should be skipped (based on GDAL_SKIP environment variable) ...
static bool isRunningFromBuildDir()
Indicates whether running from build directory (not installed)
static int maxThreads()
Get maximum concurrent thread count.
QString iconPath(const QString &iconFile)
static QMap< QString, QString > systemEnvVars()
Returns the system environment variables passed to application.
static QString buildOutputPath()
Returns path to the build output directory.
QStringList ABISYM(QgsApplication::mFileOpenEventList)
static const char * QGIS_ORGANIZATION_NAME
virtual bool x11EventFilter(XEvent *event)
ENDIAN
Constants for endian-ness.
static QString buildSourcePath()
Returns path to the source directory.
static const char * QGIS_ORGANIZATION_DOMAIN
virtual bool event(QEvent *e)
static const char * QGIS_APPLICATION_NAME
virtual bool notify(QObject *receiver, QEvent *e)