Subversion Repositories Scribus

Rev

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

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