Subversion Repositories Scribus

Rev

Rev 4194 | Rev 4602 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4430 cbradney 1
/*
2
For general Scribus (>=1.3.2) copyright and licensing information please refer
3
to the COPYING file provided with the program. Following this notice may exist
4
a copyright and/or license notice that predates the release of Scribus 1.3.2
5
for which a new license (GPL+exception) is in place.
6
*/
1693 craig 7
#ifndef SCPATHS_H
8
#define SCPATHS_H
9
 
3484 avox 10
#include <qstring.h>
11
#include <qstringlist.h>
2969 craig 12
#include "scribusapi.h"
1693 craig 13
 
2969 craig 14
class SCRIBUS_API ScPaths
1693 craig 15
{
16
public:
17
        /**
18
         * @brief Get a reference to the ScPaths instance
19
         *        creating it if necessary.
20
         * @sa ScPaths::destroy()
21
         */
22
        static const ScPaths& instance();
23
        /**
24
         * @brief Destroy the ScPaths instance, if any.
25
         * @sa ScPaths::instnace()
26
         */
27
        static void destroy();
28
 
4194 fschmid 29
        /*** The separator used between path list entries in environment variables */
30
        static const char envPathSeparator;
31
 
1693 craig 32
        /** @brief Return path to documentation directory */
33
        const QString& docDir() const;
34
        /** @brief Return path to icons directory*/
35
        const QString& iconDir() const;
3794 cbradney 36
        /** @brief Return path to the Scribus font directory */
37
        const QString& fontDir() const;
1693 craig 38
        /** @brief Return path to lib directory containing translations,
39
         *         keysets, etc. */
40
        const QString& libDir() const;
41
        /** @brief Return path to dir containing plugins. */
42
        const QString& pluginDir() const;
43
        /** @brief Return path to dir containing sample Python scripts */
44
        const QString& sampleScriptDir() const;
45
        /** @brief Return path to dir containing "official" Python scripts */
46
        const QString& scriptDir() const;
47
        /** @brief Return path to containing stock templates */
48
        const QString& templateDir() const;
2707 subik 49
        /** @brief Return path to the Scribus share directory */
50
        const QString& shareDir() const;
1693 craig 51
 
3096 fschmid 52
        /** @brief Return paths to system font directories*/
53
        static QStringList getSystemFontDirs(void);
54
        /** @brief Return paths to system icc profiles directories*/
55
        static QStringList getSystemProfilesDirs(void);
56
 
1693 craig 57
protected:
58
        /** @brief Constructor. Use ScPaths::instance() instead. */
59
        ScPaths();
60
        /** @brief Destructor. Use ScPaths::destroy() instead. */
61
        ~ScPaths();
62
 
3096 fschmid 63
        /** @brief Return path to a special directory, should be used only on Windows*/
64
        static QString getSpecialDir(int folder);
65
 
1693 craig 66
        /** @brief Pointer to existing instance of ScPaths, if any. */
67
        static ScPaths* m_instance;
68
 
69
        // Members to hold system paths
70
        QString m_docDir;
71
        QString m_iconDir;
3794 cbradney 72
        QString m_fontDir;
1693 craig 73
        QString m_libDir;
74
        QString m_pluginDir;
75
        QString m_sampleScriptDir;
76
        QString m_scriptDir;
77
        QString m_templateDir;
2707 subik 78
        QString m_shareDir;
1693 craig 79
};
80
#endif