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 );
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();
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();
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();
214 char* data =
reinterpret_cast<char*
>( &value );
215 std::size_t n =
sizeof( value );
216 for ( std::size_t i = 0, m = n / 2; i < m; ++i )
218 std::swap( data[i], data[n - 1 - i] );
230 static QString reportStyleSheet();
242 static void registerOgrDrivers();
263 static void skipGdalDriver(
QString theDriver );
269 static void restoreGdalDriver(
QString theDriver );
280 static void applyGdalSkippedDrivers();
288 static void setMaxThreads(
int maxThreads );
300 void preNotify(
QObject * receiver,
QEvent * event,
bool * done );
318 static bool ABISYM( mRunningFromBuildDir );
332 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.
ENDIAN
constants for endian-ness
QStringList ABISYM(QgsApplication::mFileOpenEventList)
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(QString iconFile)
static QString buildOutputPath()
Returns path to the build output directory.
static const char * QGIS_ORGANIZATION_NAME
static const QMap< QString, QString > systemEnvVars()
Returns the system environment variables passed to application.
virtual bool x11EventFilter(XEvent *event)
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)