|
Quantum GIS API Documentation
1.7.5-Wroclaw
|
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 /* $Id$ */ 00016 #ifndef QGSAPPLICATION_H 00017 #define QGSAPPLICATION_H 00018 00019 #include <QApplication> 00020 #include <QEvent> 00021 00022 #include <qgis.h> 00023 00024 #define ABISYM(x) x ## VERSION_INT 00025 00030 class CORE_EXPORT QgsApplication: public QApplication 00031 { 00032 Q_OBJECT 00033 public: 00035 QgsApplication( int & argc, char ** argv, bool GUIenabled, QString customConfigPath = QString() ); 00036 virtual ~QgsApplication(); 00037 00039 virtual bool event( QEvent * event ); 00040 00042 virtual bool notify( QObject * receiver, QEvent * event ); 00043 00045 static void setFileOpenEventReceiver( QObject * receiver ); 00046 00056 static void setThemeName( const QString theThemeName ); 00057 00064 static const QString themeName() ; 00065 00067 static const QString authorsFilePath(); 00068 00073 static const QString contributorsFilePath(); 00074 00077 static const QString sponsorsFilePath(); 00078 00081 static const QString donorsFilePath(); 00082 00087 static const QString translatorsFilePath(); 00088 00090 static const QString developerPath(); 00091 00093 static const QString helpAppPath(); 00094 00096 static const QString i18nPath(); 00097 00099 static const QString qgisMasterDbFilePath(); 00100 00102 static const QString qgisSettingsDirPath(); 00103 00105 static const QString qgisUserDbFilePath(); 00106 00108 static const QString splashPath(); 00109 00111 static const QString iconsPath(); 00112 00114 static const QString srsDbFilePath(); 00115 00118 static const QStringList svgPaths(); 00119 00122 Q_DECL_DEPRECATED static const QString svgPath(); 00123 00125 static const QString prefixPath(); 00126 00128 static const QString pluginPath(); 00129 00131 static const QString pkgDataPath(); 00132 00134 static const QString activeThemePath(); 00135 00137 static const QString defaultThemePath(); 00138 00142 static QString iconPath( QString iconFile ); 00143 00145 static const QString userStyleV2Path(); 00146 00148 static const QString defaultStyleV2Path(); 00149 00151 static void setPrefixPath( const QString thePrefixPath, bool useDefaultPaths = false ); 00152 00154 static void setPluginPath( const QString thePluginPath ); 00155 00157 static void setPkgDataPath( const QString thePkgDataPath ); 00158 00160 static void setDefaultSvgPaths( const QStringList& pathList ); 00161 00163 static void initQgis(); 00164 00166 static void exitQgis(); 00167 00169 typedef enum ENDIAN 00170 { 00171 XDR = 0, // network, or big-endian, byte order 00172 NDR = 1 // little-endian byte order 00173 } 00174 endian_t; 00175 00177 static endian_t endian(); 00178 00187 static QString reportStyleSheet(); 00190 static QString showSettings(); 00197 static void registerOgrDrivers(); 00198 00201 static QString absolutePathToRelativePath( QString apath, QString targetPath ); 00204 static QString relativePathToAbsolutePath( QString rpath, QString targetPath ); 00205 00206 private: 00207 static QObject* ABISYM( mFileOpenEventReceiver ); 00208 static QStringList ABISYM( mFileOpenEventList ); 00209 00210 static QString ABISYM( mPrefixPath ); 00211 static QString ABISYM( mPluginPath ); 00212 static QString ABISYM( mPkgDataPath ); 00213 static QString ABISYM( mThemeName ); 00214 static QStringList ABISYM( mDefaultSvgPaths ); 00215 00216 static QString ABISYM( mConfigPath ); 00217 }; 00218 00219 #endif
1.7.6.1