Quantum GIS API Documentation
1.7.4
|
00001 /*************************************************************************** 00002 qgsapplication.h - Accessors for application-wide data 00003 -------------------------------------- 00004 Date : 02-Jan-2006 00005 Copyright : (C) 2006 by Tom Elwertowski 00006 Email : telwertowski at users dot sourceforge dot net 00007 *************************************************************************** 00008 * * 00009 * This program is free software; you can redistribute it and/or modify * 00010 * it under the terms of the GNU General Public License as published by * 00011 * the Free Software Foundation; either version 2 of the License, or * 00012 * (at your option) any later version. * 00013 * * 00014 ***************************************************************************/ 00015 #ifndef QGSAPPLICATION_H 00016 #define QGSAPPLICATION_H 00017 00018 #include <QApplication> 00019 #include <QEvent> 00020 00021 #include <qgis.h> 00022 00023 #define ABISYM(x) x ## VERSION_INT 00024 00029 class CORE_EXPORT QgsApplication: public QApplication 00030 { 00031 Q_OBJECT 00032 public: 00034 QgsApplication( int & argc, char ** argv, bool GUIenabled, QString customConfigPath = QString() ); 00035 virtual ~QgsApplication(); 00036 00038 virtual bool event( QEvent * event ); 00039 00041 virtual bool notify( QObject * receiver, QEvent * event ); 00042 00044 static void setFileOpenEventReceiver( QObject * receiver ); 00045 00055 static void setThemeName( const QString theThemeName ); 00056 00063 static const QString themeName() ; 00064 00066 static const QString authorsFilePath(); 00067 00072 static const QString contributorsFilePath(); 00073 00076 static const QString sponsorsFilePath(); 00077 00080 static const QString donorsFilePath(); 00081 00086 static const QString translatorsFilePath(); 00087 00089 static const QString developerPath(); 00090 00092 static const QString helpAppPath(); 00093 00095 static const QString i18nPath(); 00096 00098 static const QString qgisMasterDbFilePath(); 00099 00101 static const QString qgisSettingsDirPath(); 00102 00104 static const QString qgisUserDbFilePath(); 00105 00107 static const QString splashPath(); 00108 00110 static const QString iconsPath(); 00111 00113 static const QString srsDbFilePath(); 00114 00117 static const QStringList svgPaths(); 00118 00121 Q_DECL_DEPRECATED static const QString svgPath(); 00122 00124 static const QString prefixPath(); 00125 00127 static const QString pluginPath(); 00128 00130 static const QString pkgDataPath(); 00131 00133 static const QString activeThemePath(); 00134 00136 static const QString defaultThemePath(); 00137 00141 static QString iconPath( QString iconFile ); 00142 00144 static const QString userStyleV2Path(); 00145 00147 static const QString defaultStyleV2Path(); 00148 00150 static void setPrefixPath( const QString thePrefixPath, bool useDefaultPaths = false ); 00151 00153 static void setPluginPath( const QString thePluginPath ); 00154 00156 static void setPkgDataPath( const QString thePkgDataPath ); 00157 00159 static void setDefaultSvgPaths( const QStringList& pathList ); 00160 00162 static void initQgis(); 00163 00165 static void exitQgis(); 00166 00168 typedef enum ENDIAN 00169 { 00170 XDR = 0, // network, or big-endian, byte order 00171 NDR = 1 // little-endian byte order 00172 } 00173 endian_t; 00174 00176 static endian_t endian(); 00177 00186 static QString reportStyleSheet(); 00189 static QString showSettings(); 00196 static void registerOgrDrivers(); 00197 00200 static QString absolutePathToRelativePath( QString apath, QString targetPath ); 00203 static QString relativePathToAbsolutePath( QString rpath, QString targetPath ); 00204 00205 private: 00206 static QObject* ABISYM( mFileOpenEventReceiver ); 00207 static QStringList ABISYM( mFileOpenEventList ); 00208 00209 static QString ABISYM( mPrefixPath ); 00210 static QString ABISYM( mPluginPath ); 00211 static QString ABISYM( mPkgDataPath ); 00212 static QString ABISYM( mThemeName ); 00213 static QStringList ABISYM( mDefaultSvgPaths ); 00214 00215 static QString ABISYM( mConfigPath ); 00216 }; 00217 00218 #endif