Scribus Developer Documentation - API
logo-pen

Scribus Developer Documentation - API

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>
00011 #include <QStringList>
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;
00057     QString dictDir() const;
00058 
00060     static QStringList getSystemFontDirs(void);
00062     static QStringList getSystemProfilesDirs(void);
00064     static QStringList getSystemCreateSwatchesDirs(void);
00065 
00067     static QString getApplicationDataDir(void);
00069     static QString getUserDocumentDir(void);
00071     static QString getTempFileDir(void);
00072 
00073 
00074 protected:
00076     ScPaths();
00078     ~ScPaths();
00079 
00081     static QString getSpecialDir(int folder);
00082 
00084     static ScPaths* m_instance;
00085 
00086     // Members to hold system paths
00087     QString m_docDir;
00088     QString m_iconDir;
00089     QString m_fontDir;
00090     QString m_libDir;
00091     QString m_pluginDir;
00092     QString m_sampleScriptDir;
00093     QString m_scriptDir;
00094     QString m_templateDir;
00095     QString m_shareDir;
00096 };
00097 #endif
Created with personalized Doxygen. This is documentation for GPL software Scribus - Open Source Desktop Publishing.