Back to index

scribus-ng  1.3.4.dfsg+svn20071115
scpaths.h
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 #ifndef SCPATHS_H
00008 #define SCPATHS_H
00009 
00010 #include <qstring.h>
00011 #include <qstringlist.h>
00012 #include "scribusapi.h"
00013 
00014 class SCRIBUS_API ScPaths
00015 {
00016 public:
00022        static const ScPaths& instance();
00027        static void destroy();
00028 
00029        /*** The separator used between path list entries in environment variables */
00030        static const char envPathSeparator;
00031 
00032        static QString separatorsToSlashes(const QString& path);
00033 
00035        const QString& docDir() const;
00037        const QString& iconDir() const;
00039        const QString& fontDir() const;
00042        const QString& libDir() const;
00044        const QString& pluginDir() const;
00046        const QString& sampleScriptDir() const;
00048        const QString& scriptDir() const;
00050        const QString& templateDir() const;
00052        const QString& shareDir() const;
00053 
00055        QString translationDir() const;
00056 
00058        static QStringList getSystemFontDirs(void);
00060        static QStringList getSystemProfilesDirs(void);
00062        static QStringList getSystemCreateSwatchesDirs(void);
00063 
00065        static QString getApplicationDataDir(void);
00067        static QString getUserDocumentDir(void);
00069        static QString getTempFileDir(void);
00070 
00071 
00072 protected:
00074        ScPaths();
00076        ~ScPaths();
00077 
00079        static QString getSpecialDir(int folder);
00080 
00082        static ScPaths* m_instance;
00083 
00084        // Members to hold system paths
00085        QString m_docDir;
00086        QString m_iconDir;
00087        QString m_fontDir;
00088        QString m_libDir;
00089        QString m_pluginDir;
00090        QString m_sampleScriptDir;
00091        QString m_scriptDir;
00092        QString m_templateDir;
00093        QString m_shareDir;
00094 };
00095 #endif