Subversion Repositories Scribus

Rev

Rev 2707 | Rev 3096 | 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
 
4
#include "qstring.h"
2969 craig 5
#include "qstringlist.h"
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
 
23
        /** @brief Return path to documentation directory */
24
        const QString& docDir() const;
25
        /** @brief Return path to icons directory*/
26
        const QString& iconDir() const;
27
        /** @brief Return path to lib directory containing translations,
28
         *         keysets, etc. */
29
        const QString& libDir() const;
30
        /** @brief Return path to dir containing plugins. */
31
        const QString& pluginDir() const;
32
        /** @brief Return path to dir containing sample Python scripts */
33
        const QString& sampleScriptDir() const;
34
        /** @brief Return path to dir containing "official" Python scripts */
35
        const QString& scriptDir() const;
36
        /** @brief Return path to containing stock templates */
37
        const QString& templateDir() const;
2707 subik 38
        /** @brief Return path to the Scribus share directory */
39
        const QString& shareDir() const;
1693 craig 40
 
41
protected:
42
        /** @brief Constructor. Use ScPaths::instance() instead. */
43
        ScPaths();
44
        /** @brief Destructor. Use ScPaths::destroy() instead. */
45
        ~ScPaths();
46
 
47
        /** @brief Pointer to existing instance of ScPaths, if any. */
48
        static ScPaths* m_instance;
49
 
50
        // Members to hold system paths
51
        QString m_docDir;
52
        QString m_iconDir;
53
        QString m_libDir;
54
        QString m_pluginDir;
55
        QString m_sampleScriptDir;
56
        QString m_scriptDir;
57
        QString m_templateDir;
2707 subik 58
        QString m_shareDir;
1693 craig 59
};
60
#endif