QGIS API Documentation
2.18.21-Las Palmas (9fba24a)
|
Extends QApplication to provide access to QGIS specific resources such as theme paths, database paths etc. More...
#include <qgsapplication.h>
Public Types | |
enum | endian_t { XDR = 0, NDR = 1 } |
Constants for endian-ness. More... | |
Public Slots | |
void | emitSettingsChanged () |
Causes the application instance to emit the settingsChanged() signal. More... | |
Signals | |
void | preNotify (QObject *receiver, QEvent *event, bool *done) |
void | settingsChanged () |
Emitted whenever any global, application-wide settings are changed. More... | |
Public Member Functions | |
QgsApplication (int &argc, char **argv, bool GUIenabled, const QString &customConfigPath=QString(), const QString &platformName="desktop") | |
virtual | ~QgsApplication () |
virtual bool | event (QEvent *event) override |
Watch for QFileOpenEvent. More... | |
virtual bool | notify (QObject *receiver, QEvent *event) override |
Catch exceptions when sending event to receiver. More... | |
Public Member Functions inherited from QApplication | |
QApplication (int &argc, char **argv) | |
QApplication (int &argc, char **argv, Type type) | |
QApplication (Display *display, Qt::HANDLE visual, Qt::HANDLE colormap) | |
QApplication (Display *display, int &argc, char **argv, Qt::HANDLE visual, Qt::HANDLE colormap) | |
QApplication (QApplication::QS60MainApplicationFactory factory, int &argc, char **argv) | |
QApplication (int &argc, char **argv, bool GUIenabled) | |
virtual | ~QApplication () |
void | aboutToReleaseGpuResources () |
void | aboutToUseGpuResources () |
int | autoMaximizeThreshold () const |
bool | autoSipEnabled () const |
virtual void | commitData (QSessionManager &manager) |
void | commitDataRequest (QSessionManager &manager) |
void | focusChanged (QWidget *old, QWidget *now) |
void | fontDatabaseChanged () |
QInputContext * | inputContext () const |
bool | isSessionRestored () const |
void | lastWindowClosed () |
virtual bool | macEventFilter (EventHandlerCallRef caller, EventRef event) |
virtual bool | qwsEventFilter (QWSEvent *event) |
void | qwsSetCustomColors (QRgb *colorTable, int start, int numColors) |
virtual void | saveState (QSessionManager &manager) |
void | saveStateRequest (QSessionManager &manager) |
QString | sessionId () const |
QString | sessionKey () const |
void | setAutoMaximizeThreshold (const int threshold) |
void | setAutoSipEnabled (const bool enabled) |
void | setInputContext (QInputContext *inputContext) |
void | setStyleSheet (const QString &sheet) |
QString | styleSheet () const |
virtual bool | symbianEventFilter (const QSymbianEvent *event) |
int | symbianProcessEvent (const QSymbianEvent *event) |
virtual bool | x11EventFilter (XEvent *event) |
int | x11ProcessEvent (XEvent *event) |
Public Member Functions inherited from QCoreApplication | |
QCoreApplication (int &argc, char **argv) | |
~QCoreApplication () | |
void | aboutToQuit () |
bool | filterEvent (void *message, long *result) |
void | lock () |
bool | locked () |
EventFilter | setEventFilter (EventFilter filter) |
bool | tryLock () |
void | unlock (bool wakeUpGui) |
virtual bool | winEventFilter (MSG *msg, long *result) |
Public Member Functions inherited from QObject | |
QObject (QObject *parent) | |
QObject (QObject *parent, const char *name) | |
virtual | ~QObject () |
bool | blockSignals (bool block) |
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
const QObjectList & | children () const |
const char * | className () const |
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const QObject *receiver, const char *method) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
void | dumpObjectInfo () |
void | dumpObjectTree () |
QList< QByteArray > | dynamicPropertyNames () const |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name) const |
QList< T > | findChildren (const QRegExp ®Exp) const |
QList< T > | findChildren (const QString &name) const |
bool | inherits (const char *className) const |
void | insertChild (QObject *object) |
void | installEventFilter (QObject *filterObj) |
bool | isA (const char *className) const |
bool | isWidgetType () const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
const char * | name () const |
const char * | name (const char *defaultName) const |
QString | objectName () const |
QObject * | parent () const |
QVariant | property (const char *name) const |
void | removeChild (QObject *object) |
void | removeEventFilter (QObject *obj) |
void | setName (const char *name) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const |
int | startTimer (int interval) |
QThread * | thread () const |
Static Public Member Functions | |
static QString | absolutePathToRelativePath (const QString &apath, const QString &targetPath) |
Converts absolute path to path relative to target. More... | |
static QString | activeThemePath () |
Returns the path to the currently active theme directory. More... | |
static QString | appIconPath () |
get application icon More... | |
static void | applyGdalSkippedDrivers () |
Apply the skipped drivers list to gdal. More... | |
static QString | authorsFilePath () |
Returns the path to the authors file. More... | |
static QString | buildOutputPath () |
Returns path to the build output directory. More... | |
static QString | buildSourcePath () |
Returns path to the source directory. More... | |
static QStringList | composerTemplatePaths () |
Returns the pathes to composer template directories. More... | |
static QString | contributorsFilePath () |
Returns the path to the contributors file. More... | |
static bool | createDB (QString *errorMessage=nullptr) |
initialise qgis.db More... | |
static bool | createThemeFolder () |
Create the users theme folder. More... | |
static QString | defaultStyleV2Path () |
Returns the path to default style (works as a starting point). More... | |
static QString | defaultThemePath () |
Returns the path to the default theme directory. More... | |
static QString | defaultThemesFolder () |
Returns the path to default themes folder from install (works as a starting point). More... | |
static QString | developersMapFilePath () |
Returns the path to the developers map file. More... | |
static QString | donorsFilePath () |
Returns the path to the donors file. More... | |
static endian_t | endian () |
Returns whether this machine uses big or little endian. More... | |
template<typename T > | |
static void | endian_swap (T &value) |
Swap the endianness of the specified value. More... | |
static void | exitQgis () |
deletes provider registry and map layer registry More... | |
static QIcon | getThemeIcon (const QString &theName) |
Helper to get a theme icon. More... | |
static QPixmap | getThemePixmap (const QString &theName) |
Helper to get a theme icon as a pixmap. More... | |
static QString | helpAppPath () |
Returns the path to the help application. More... | |
static QString | i18nPath () |
Returns the path to the translation directory. More... | |
static QString | iconPath (const QString &iconFile) |
Returns path to the desired icon file. More... | |
static QString | iconsPath () |
Returns the path to the icons image directory. More... | |
static void | init (QString customConfigPath=QString()) |
This method initialises paths etc for QGIS. More... | |
static void | initQgis () |
loads providers More... | |
static bool | isRunningFromBuildDir () |
Indicates whether running from build directory (not installed) More... | |
static QString | libexecPath () |
Returns the path with utility executables (help viewer, crssync, ...) More... | |
static QString | libraryPath () |
Returns the path containing qgis_core, qgis_gui, qgispython (and other) libraries. More... | |
static QString | licenceFilePath () |
Returns the path to the licence file. More... | |
static int | maxThreads () |
Get maximum concurrent thread count. More... | |
static QString | osName () |
Returns a string name of the operating system QGIS is running on. More... | |
static QString | pkgDataPath () |
Returns the common root path of all application data directories. More... | |
static QString | platform () |
Returns the QGIS platform name, eg "desktop" or "server". More... | |
static QString | pluginPath () |
Returns the path to the application plugin directory. More... | |
static QString | prefixPath () |
Returns the path to the application prefix directory. More... | |
static QString | qgisAuthDbFilePath () |
Returns the path to the user authentication database file: qgis-auth.db. More... | |
static QString | qgisMasterDbFilePath () |
Returns the path to the master qgis.db file. More... | |
static QString | qgisSettingsDirPath () |
Returns the path to the settings directory in user's home dir. More... | |
static QString | qgisUserDbFilePath () |
Returns the path to the user qgis.db file. More... | |
static void | registerOgrDrivers () |
Register OGR drivers ensuring this only happens once. More... | |
static QString | relativePathToAbsolutePath (const QString &rpath, const QString &targetPath) |
Converts path relative to target to an absolute path. More... | |
static QString | reportStyleSheet () |
get a standard css style sheet for reports. More... | |
static void | restoreGdalDriver (const QString &theDriver) |
Sets the GDAL_SKIP environment variable to exclude the specified driver and then calls GDALDriverManager::AutoSkipDrivers() to unregister it. More... | |
static void | setAuthDbDirPath (const QString &theAuthDbDirPath) |
Alters authentication data base directory path - used by 3rd party apps. More... | |
static void | setDefaultSvgPaths (const QStringList &pathList) |
Alters default svg paths - used by 3rd party apps. More... | |
static void | setFileOpenEventReceiver (QObject *receiver) |
Set the FileOpen event receiver. More... | |
static void | setMaxThreads (int maxThreads) |
Set maximum concurrent thread count. More... | |
static void | setPkgDataPath (const QString &thePkgDataPath) |
Alters pkg data path - used by 3rd party apps. More... | |
static void | setPluginPath (const QString &thePluginPath) |
Alters plugin path - used by 3rd party apps. More... | |
static void | setPrefixPath (const QString &thePrefixPath, bool useDefaultPaths=false) |
Alters prefix path - used by 3rd party apps. More... | |
static void | setThemeName (const QString &theThemeName) |
Set the active theme to the specified theme. More... | |
static void | setUITheme (const QString &themeName) |
Set the current UI theme used to style the interface. More... | |
static QRegExp | shortNameRegExp () |
Returns the short name regular expression for line edit validator. More... | |
static QString | showSettings () |
Convenience function to get a summary of the paths used in this application instance useful for debugging mainly. More... | |
static void | skipGdalDriver (const QString &theDriver) |
Sets the GDAL_SKIP environment variable to include the specified driver and then calls GDALDriverManager::AutoSkipDrivers() to unregister it. More... | |
static QStringList | skippedGdalDrivers () |
Returns the list of gdal drivers that should be skipped (based on GDAL_SKIP environment variable) More... | |
static QString | splashPath () |
Returns the path to the splash screen image directory. More... | |
static QString | sponsorsFilePath () |
Returns the path to the sponsors file. More... | |
static QString | srsDbFilePath () |
Returns the path to the srs.db file. More... | |
static QStringList | svgPaths () |
Returns the pathes to svg directories. More... | |
static QMap< QString, QString > | systemEnvVars () |
Returns the system environment variables passed to application. More... | |
static QString | themeName () |
Set the active theme to the specified theme. More... | |
static QString | translatorsFilePath () |
Returns the path to the sponsors file. More... | |
static QHash< QString, QString > | uiThemes () |
All themes found in ~/.qgis2/themes folder. More... | |
static QString | userFullName () |
Returns the user's operating system login account full display name. More... | |
static QString | userLoginName () |
Returns the user's operating system login account name. More... | |
static QString | userStyleV2Path () |
Returns the path to user's style. More... | |
static QString | userThemesFolder () |
Returns the path to user's themes folder. More... | |
Static Public Member Functions inherited from QApplication | |
void | aboutQt () |
QWidget * | activeModalWidget () |
QWidget * | activePopupWidget () |
QWidget * | activeWindow () |
void | alert (QWidget *widget, int msec) |
QWidgetList | allWidgets () |
void | beep () |
void | changeOverrideCursor (const QCursor &cursor) |
QClipboard * | clipboard () |
void | closeAllWindows () |
ColorMode | colorMode () |
int | colorSpec () |
int | cursorFlashTime () |
QDesktopWidget * | desktop () |
bool | desktopSettingsAware () |
int | doubleClickInterval () |
int | exec () |
void | flushX () |
QWidget * | focusWidget () |
QFont | font (const QWidget *widget) |
QFont | font () |
QFont | font (const char *className) |
QFontMetrics | fontMetrics () |
QSize | globalStrut () |
bool | hasGlobalMouseTracking () |
Qt::Alignment | horizontalAlignment (QFlags< Qt::AlignmentFlag > align) |
bool | isEffectEnabled (Qt::UIEffect effect) |
bool | isLeftToRight () |
bool | isRightToLeft () |
Qt::LayoutDirection | keyboardInputDirection () |
int | keyboardInputInterval () |
QLocale | keyboardInputLocale () |
Qt::KeyboardModifiers | keyboardModifiers () |
bool | keypadNavigationEnabled () |
Qt::LayoutDirection | layoutDirection () |
Qt::MacintoshVersion | macVersion () |
QWidget * | mainWidget () |
Qt::MouseButtons | mouseButtons () |
Qt::NavigationMode | navigationMode () |
QCursor * | overrideCursor () |
QPalette | palette (const QWidget *widget) |
QPalette | palette () |
QPalette | palette (const char *className) |
Qt::KeyboardModifiers | queryKeyboardModifiers () |
bool | quitOnLastWindowClosed () |
QDecoration & | qwsDecoration () |
void | qwsSetDecoration (QDecoration *decoration) |
QDecoration * | qwsSetDecoration (const QString &decoration) |
void | restoreOverrideCursor () |
bool | reverseLayout () |
void | setActiveWindow (QWidget *active) |
void | setColorMode (ColorMode mode) |
void | setColorSpec (int spec) |
void | setCursorFlashTime (int) |
void | setDesktopSettingsAware (bool on) |
void | setDoubleClickInterval (int) |
void | setEffectEnabled (Qt::UIEffect effect, bool enable) |
void | setFont (const QFont &font, bool b, const char *className) |
void | setFont (const QFont &font, const char *className) |
void | setGlobalMouseTracking (bool dummy) |
void | setGlobalStrut (const QSize &) |
void | setGraphicsSystem (const QString &system) |
void | setKeyboardInputInterval (int) |
void | setLayoutDirection (Qt::LayoutDirection direction) |
void | setMainWidget (QWidget *mainWidget) |
void | setNavigationMode (Qt::NavigationMode mode) |
void | setOverrideCursor (const QCursor &cursor) |
void | setOverrideCursor (const QCursor &cursor, bool replace) |
void | setPalette (const QPalette &pal, bool b, const char *className) |
void | setPalette (const QPalette &palette, const char *className) |
void | setQuitOnLastWindowClosed (bool quit) |
void | setReverseLayout (bool reverse) |
void | setStartDragDistance (int l) |
void | setStartDragTime (int ms) |
void | setStyle (QStyle *style) |
QStyle * | setStyle (const QString &style) |
void | setWheelScrollLines (int) |
void | setWindowIcon (const QIcon &icon) |
void | setWinStyleHighlightColor (const QColor &c) |
int | startDragDistance () |
int | startDragTime () |
QStyle * | style () |
void | syncX () |
QWidget * | topLevelAt (const QPoint &point) |
QWidget * | topLevelAt (int x, int y) |
QWidgetList | topLevelWidgets () |
Type | type () |
int | wheelScrollLines () |
QWidget * | widgetAt (const QPoint &point) |
QWidget * | widgetAt (int x, int y, bool child) |
QWidget * | widgetAt (const QPoint &point, bool child) |
QWidget * | widgetAt (int x, int y) |
QIcon | windowIcon () |
const QColor & | winStyleHighlightColor () |
Qt::WindowsVersion | winVersion () |
Static Public Member Functions inherited from QCoreApplication | |
void | addLibraryPath (const QString &path) |
QString | applicationDirPath () |
QString | applicationFilePath () |
QString | applicationName () |
qint64 | applicationPid () |
QString | applicationVersion () |
int | argc () |
QStringList | arguments () |
char ** | argv () |
bool | closingDown () |
int | enter_loop () |
int | exec () |
void | exit (int returnCode) |
void | exit_loop () |
void | flush () |
bool | hasPendingEvents () |
void | installTranslator (QTranslator *translationFile) |
QCoreApplication * | instance () |
QStringList | libraryPaths () |
int | loopLevel () |
QString | organizationDomain () |
QString | organizationName () |
void | postEvent (QObject *receiver, QEvent *event) |
void | postEvent (QObject *receiver, QEvent *event, int priority) |
void | processEvents (QFlags< QEventLoop::ProcessEventsFlag > flags) |
void | processEvents (QFlags< QEventLoop::ProcessEventsFlag > flags, int maxtime) |
void | processOneEvent () |
void | quit () |
void | removeLibraryPath (const QString &path) |
void | removePostedEvents (QObject *receiver, int eventType) |
void | removePostedEvents (QObject *receiver) |
void | removeTranslator (QTranslator *translationFile) |
bool | sendEvent (QObject *receiver, QEvent *event) |
void | sendPostedEvents (QObject *receiver, int event_type) |
void | sendPostedEvents () |
void | setApplicationName (const QString &application) |
void | setApplicationVersion (const QString &version) |
void | setAttribute (Qt::ApplicationAttribute attribute, bool on) |
void | setLibraryPaths (const QStringList &paths) |
void | setOrganizationDomain (const QString &orgDomain) |
void | setOrganizationName (const QString &orgName) |
bool | startingUp () |
bool | testAttribute (Qt::ApplicationAttribute attribute) |
QString | translate (const char *context, const char *sourceText, const char *disambiguation, Encoding encoding, int n) |
QString | translate (const char *context, const char *sourceText, const char *disambiguation, Encoding encoding) |
Static Public Member Functions inherited from QObject | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Static Public Attributes | |
static const char * | QGIS_APPLICATION_NAME = "QGIS2" |
static const char * | QGIS_ORGANIZATION_DOMAIN = "qgis.org" |
static const char * | QGIS_ORGANIZATION_NAME = "QGIS" |
Extends QApplication to provide access to QGIS specific resources such as theme paths, database paths etc.
The QgsApplication class manages application-wide information.
This is a subclass of QApplication and should be instantiated in place of QApplication. Most methods are static in keeping witn the design of QApplication.
This class hides platform-specific path information and provides a portable way of referencing specific files and directories. Ideally, hard-coded paths should appear only here and not in other modules so that platform-conditional code is minimized and paths are easier to change due to centralization.
Definition at line 34 of file qgsapplication.h.
QgsApplication::QgsApplication | ( | int & | argc, |
char ** | argv, | ||
bool | GUIenabled, | ||
const QString & | customConfigPath = QString() , |
||
const QString & | platformName = "desktop" |
||
) |
Definition at line 102 of file qgsapplication.cpp.
|
virtual |
Definition at line 235 of file qgsapplication.cpp.
|
static |
Converts absolute path to path relative to target.
Definition at line 1053 of file qgsapplication.cpp.
|
static |
Returns the path to the currently active theme directory.
Definition at line 392 of file qgsapplication.cpp.
|
static |
get application icon
Definition at line 397 of file qgsapplication.cpp.
|
static |
Apply the skipped drivers list to gdal.
Definition at line 1192 of file qgsapplication.cpp.
|
static |
Returns the path to the authors file.
Returns the path to the authors file.
Definition at line 555 of file qgsapplication.cpp.
|
inlinestatic |
Returns path to the build output directory.
Valid only when running from build directory
Definition at line 324 of file qgsapplication.h.
|
inlinestatic |
Returns path to the source directory.
Valid only when running from build directory
Definition at line 322 of file qgsapplication.h.
|
static |
Returns the pathes to composer template directories.
Returns the paths to the composer template directories.
Definition at line 734 of file qgsapplication.cpp.
|
static |
Returns the path to the contributors file.
Contributors are people who have submitted patches but don't have commit access.
Returns the path to the contributors file.
Definition at line 562 of file qgsapplication.cpp.
|
static |
initialise qgis.db
Definition at line 1234 of file qgsapplication.cpp.
|
static |
Create the users theme folder.
Definition at line 1202 of file qgsapplication.cpp.
|
static |
Returns the path to default style (works as a starting point).
Definition at line 853 of file qgsapplication.cpp.
|
static |
Returns the path to the default theme directory.
Definition at line 388 of file qgsapplication.cpp.
|
static |
Returns the path to default themes folder from install (works as a starting point).
Definition at line 858 of file qgsapplication.cpp.
|
static |
Returns the path to the developers map file.
The developers map was created by using leaflet framework, it shows the doc/contributors.json file.
Definition at line 566 of file qgsapplication.cpp.
|
static |
Returns the path to the donors file.
Returns the path to the donors file.
Definition at line 582 of file qgsapplication.cpp.
|
slot |
Causes the application instance to emit the settingsChanged() signal.
This should be called whenever global, application-wide settings are altered to advise listeners that they may need to update their state.
Definition at line 1386 of file qgsapplication.cpp.
|
static |
Returns whether this machine uses big or little endian.
Definition at line 873 of file qgsapplication.cpp.
|
inlinestatic |
Swap the endianness of the specified value.
Definition at line 279 of file qgsapplication.h.
|
overridevirtual |
Watch for QFileOpenEvent.
Reimplemented from QApplication.
Definition at line 239 of file qgsapplication.cpp.
|
static |
deletes provider registry and map layer registry
Definition at line 890 of file qgsapplication.cpp.
Helper to get a theme icon.
It will fall back to the default theme if the active theme does not have the required icon.
Definition at line 413 of file qgsapplication.cpp.
Helper to get a theme icon as a pixmap.
It will fall back to the default theme if the active theme does not have the required icon.
Definition at line 444 of file qgsapplication.cpp.
|
static |
Returns the path to the help application.
Returns the path to the help application.
Definition at line 602 of file qgsapplication.cpp.
|
static |
Returns the path to the translation directory.
Returns the path to the translation directory.
Definition at line 619 of file qgsapplication.cpp.
Returns path to the desired icon file.
First it tries to use the active theme path, then default theme path
Definition at line 402 of file qgsapplication.cpp.
|
static |
Returns the path to the icons image directory.
Returns the path to the icons image directory.
Definition at line 670 of file qgsapplication.cpp.
This method initialises paths etc for QGIS.
Called by the ctor or call it manually when your app does not extend the QApplication class.
Definition at line 110 of file qgsapplication.cpp.
|
static |
loads providers
Definition at line 878 of file qgsapplication.cpp.
|
inlinestatic |
Indicates whether running from build directory (not installed)
Definition at line 317 of file qgsapplication.h.
|
static |
Returns the path with utility executables (help viewer, crssync, ...)
Definition at line 868 of file qgsapplication.cpp.
|
static |
Returns the path containing qgis_core, qgis_gui, qgispython (and other) libraries.
Definition at line 863 of file qgsapplication.cpp.
|
static |
Returns the path to the licence file.
Returns the path to the licence file.
Definition at line 594 of file qgsapplication.cpp.
|
inlinestatic |
Get maximum concurrent thread count.
Definition at line 351 of file qgsapplication.h.
Catch exceptions when sending event to receiver.
Reimplemented from QApplication.
Definition at line 267 of file qgsapplication.cpp.
|
static |
Returns a string name of the operating system QGIS is running on.
Definition at line 828 of file qgsapplication.cpp.
|
static |
Returns the common root path of all application data directories.
Definition at line 384 of file qgsapplication.cpp.
|
static |
Returns the QGIS platform name, eg "desktop" or "server".
Definition at line 843 of file qgsapplication.cpp.
|
static |
Returns the path to the application plugin directory.
Definition at line 380 of file qgsapplication.cpp.
|
static |
Returns the path to the application prefix directory.
Definition at line 368 of file qgsapplication.cpp.
|
static |
Returns the path to the user authentication database file: qgis-auth.db.
Returns the path to the user authentication database file: qgis-auth.db.
Definition at line 654 of file qgsapplication.cpp.
|
static |
Returns the path to the master qgis.db file.
Returns the path to the master qgis.db file.
Definition at line 630 of file qgsapplication.cpp.
|
static |
Returns the path to the settings directory in user's home dir.
Returns the path to the settings directory in user's home dir
Definition at line 638 of file qgsapplication.cpp.
|
static |
Returns the path to the user qgis.db file.
Returns the path to the user qgis.db file.
Definition at line 646 of file qgsapplication.cpp.
|
static |
Register OGR drivers ensuring this only happens once.
This is a workaround for an issue with older gdal versions that caused duplicate driver name entries to appear in the list of registered drivers when QgsApplication::registerOgrDrivers was called multiple times.
Definition at line 1045 of file qgsapplication.cpp.
|
static |
Converts path relative to target to an absolute path.
Definition at line 1118 of file qgsapplication.cpp.
|
static |
get a standard css style sheet for reports.
Typically you will use this method by doing: QString myStyle = QgsApplication::reportStyleSheet(); textBrowserReport->document()->setDefaultStyleSheet(myStyle);
Definition at line 936 of file qgsapplication.cpp.
|
static |
Sets the GDAL_SKIP environment variable to exclude the specified driver and then calls GDALDriverManager::AutoSkipDrivers() to unregister it.
The driver name should be the short format of the Gdal driver name e.g. GTIFF.
Definition at line 1178 of file qgsapplication.cpp.
|
static |
Alters authentication data base directory path - used by 3rd party apps.
Definition at line 359 of file qgsapplication.cpp.
|
static |
Alters default svg paths - used by 3rd party apps.
Definition at line 354 of file qgsapplication.cpp.
|
static |
Set the FileOpen event receiver.
Definition at line 305 of file qgsapplication.cpp.
|
static |
Set maximum concurrent thread count.
Definition at line 1365 of file qgsapplication.cpp.
|
static |
Alters pkg data path - used by 3rd party apps.
Definition at line 345 of file qgsapplication.cpp.
|
static |
Alters plugin path - used by 3rd party apps.
Definition at line 340 of file qgsapplication.cpp.
|
static |
Alters prefix path - used by 3rd party apps.
Definition at line 322 of file qgsapplication.cpp.
|
static |
Set the active theme to the specified theme.
The theme name should be a single word e.g. 'default','classic'. The theme search path usually will be pkgDataPath + "/themes/" + themName + "/" but plugin writers etc can use themeName() as a basis for searching for resources in their own datastores e.g. a Qt4 resource bundle.
Set the theme path to the specified theme.
Definition at line 463 of file qgsapplication.cpp.
|
signal |
Emitted whenever any global, application-wide settings are changed.
|
static |
Set the current UI theme used to style the interface.
Use uiThemes() to find valid themes to use. Variabels found in variables.qss will be added to the stylesheet on load.
themeName | The name of the theme. |
Definition at line 475 of file qgsapplication.cpp.
|
static |
Returns the short name regular expression for line edit validator.
Definition at line 754 of file qgsapplication.cpp.
|
static |
Convenience function to get a summary of the paths used in this application instance useful for debugging mainly.
Definition at line 909 of file qgsapplication.cpp.
|
static |
Sets the GDAL_SKIP environment variable to include the specified driver and then calls GDALDriverManager::AutoSkipDrivers() to unregister it.
The driver name should be the short format of the Gdal driver name e.g. GTIFF.
Definition at line 1168 of file qgsapplication.cpp.
|
inlinestatic |
Returns the list of gdal drivers that should be skipped (based on GDAL_SKIP environment variable)
Definition at line 341 of file qgsapplication.h.
|
static |
Returns the path to the splash screen image directory.
Returns the path to the splash screen image directory.
Definition at line 662 of file qgsapplication.cpp.
|
static |
Returns the path to the sponsors file.
Returns the path to the sponsors file.
Definition at line 574 of file qgsapplication.cpp.
|
static |
Returns the path to the srs.db file.
Returns the path to the srs.db file.
Definition at line 677 of file qgsapplication.cpp.
|
static |
Returns the pathes to svg directories.
Returns the paths to the svg directories.
Definition at line 703 of file qgsapplication.cpp.
Returns the system environment variables passed to application.
Definition at line 161 of file qgsapplication.h.
|
static |
Set the active theme to the specified theme.
The theme name should be a single word e.g. 'default','classic'. The theme search path usually will be pkgDataPath + "/themes/" + themName + "/" but plugin writers etc can use this method as a basis for searching for resources in their own datastores e.g. a Qt4 resource bundle.
Get the active theme name
Definition at line 470 of file qgsapplication.cpp.
|
static |
Returns the path to the sponsors file.
Definition at line 588 of file qgsapplication.cpp.
All themes found in ~/.qgis2/themes folder.
The path is to the root folder for the theme
Definition at line 529 of file qgsapplication.cpp.
|
static |
Returns the user's operating system login account full display name.
Definition at line 794 of file qgsapplication.cpp.
|
static |
Returns the user's operating system login account name.
Definition at line 759 of file qgsapplication.cpp.
|
static |
Returns the path to user's style.
Definition at line 749 of file qgsapplication.cpp.
|
static |
Returns the path to user's themes folder.
Definition at line 848 of file qgsapplication.cpp.
|
static |
Definition at line 40 of file qgsapplication.h.
|
static |
Definition at line 39 of file qgsapplication.h.
|
static |
Definition at line 38 of file qgsapplication.h.