15 #ifndef QGSAPPLICATION_H 16 #define QGSAPPLICATION_H 18 #include <QApplication> 20 #include <QStringList> 23 #include <qgsconfig.h> 59 static void setFileOpenEventReceiver(
QObject * receiver );
70 static void setThemeName(
const QString &theThemeName );
87 static void setUITheme(
const QString &themeName );
98 static QString authorsFilePath();
103 static QString contributorsFilePath();
109 static QString developersMapFilePath();
112 static QString sponsorsFilePath();
115 static QString donorsFilePath();
120 static QString translatorsFilePath();
125 static QString licenceFilePath();
134 static QString qgisMasterDbFilePath();
137 static QString qgisSettingsDirPath();
140 static QString qgisUserDbFilePath();
143 static QString qgisAuthDbFilePath();
152 static QString srsDbFilePath();
173 static QString activeThemePath();
176 static QString defaultThemePath();
191 static QString userStyleV2Path();
194 static QRegExp shortNameRegExp();
200 static QString userLoginName();
221 static QString userThemesFolder();
224 static QString defaultStyleV2Path();
227 static QString defaultThemesFolder();
236 static void setPrefixPath(
const QString &thePrefixPath,
bool useDefaultPaths =
false );
239 static void setPluginPath(
const QString &thePluginPath );
242 static void setPkgDataPath(
const QString &thePkgDataPath );
245 static void setDefaultSvgPaths(
const QStringList& pathList );
248 static void setAuthDbDirPath(
const QString& theAuthDbDirPath );
251 static void initQgis();
254 static bool createDB(
QString* errorMessage =
nullptr );
257 static bool createThemeFolder();
260 static void exitQgis();
281 char* data =
reinterpret_cast<char*
>( &value );
282 std::size_t n =
sizeof( value );
283 for ( std::size_t i = 0, m = n / 2; i < m; ++i )
285 std::swap( data[i], data[n - 1 - i] );
297 static QString reportStyleSheet();
309 static void registerOgrDrivers();
330 static void skipGdalDriver(
const QString& theDriver );
336 static void restoreGdalDriver(
const QString& theDriver );
347 static void applyGdalSkippedDrivers();
356 static void setMaxThreads(
int maxThreads );
375 void emitSettingsChanged();
379 void preNotify(
QObject * receiver,
QEvent * event,
bool * done );
385 void settingsChanged();
405 static bool ABISYM( mRunningFromBuildDir );
419 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.
endian_t
Constants for endian-ness.
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)
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)