Subversion Repositories Scribus

Rev

Rev 2707 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1693 craig 1
#ifndef SCPATHS_H
2
#define SCPATHS_H
3
 
4
#include "qstring.h"
5
 
6
class ScPaths
7
{
8
public:
9
        /**
10
         * @brief Get a reference to the ScPaths instance
11
         *        creating it if necessary.
12
         * @sa ScPaths::destroy()
13
         */
14
        static const ScPaths& instance();
15
        /**
16
         * @brief Destroy the ScPaths instance, if any.
17
         * @sa ScPaths::instnace()
18
         */
19
        static void destroy();
20
 
21
        /** @brief Return path to documentation directory */
22
        const QString& docDir() const;
23
        /** @brief Return path to icons directory*/
24
        const QString& iconDir() const;
25
        /** @brief Return path to lib directory containing translations,
26
         *         keysets, etc. */
27
        const QString& libDir() const;
28
        /** @brief Return path to dir containing plugins. */
29
        const QString& pluginDir() const;
30
        /** @brief Return path to dir containing sample Python scripts */
31
        const QString& sampleScriptDir() const;
32
        /** @brief Return path to dir containing "official" Python scripts */
33
        const QString& scriptDir() const;
34
        /** @brief Return path to containing stock templates */
35
        const QString& templateDir() const;
36
 
37
protected:
38
        /** @brief Constructor. Use ScPaths::instance() instead. */
39
        ScPaths();
40
        /** @brief Destructor. Use ScPaths::destroy() instead. */
41
        ~ScPaths();
42
 
43
        /** @brief Pointer to existing instance of ScPaths, if any. */
44
        static ScPaths* m_instance;
45
 
46
        // Members to hold system paths
47
        QString m_docDir;
48
        QString m_iconDir;
49
        QString m_libDir;
50
        QString m_pluginDir;
51
        QString m_sampleScriptDir;
52
        QString m_scriptDir;
53
        QString m_templateDir;
54
};
55
#endif