~ubuntu-branches/ubuntu/precise/gwenview/precise-proposed

« back to all changes in this revision

Viewing changes to lib/document/documentfactory.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2011-12-15 14:17:54 UTC
  • mto: This revision was merged to the branch mainline in revision 12.
  • Revision ID: package-import@ubuntu.com-20111215141754-z043hyx69dulbggf
Tags: upstream-4.7.90
ImportĀ upstreamĀ versionĀ 4.7.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
class KUrl;
31
31
 
32
 
namespace Gwenview {
 
32
namespace Gwenview
 
33
{
33
34
 
34
35
struct DocumentFactoryPrivate;
35
36
 
36
 
class GWENVIEWLIB_EXPORT DocumentFactory : public QObject {
37
 
        Q_OBJECT
 
37
class GWENVIEWLIB_EXPORT DocumentFactory : public QObject
 
38
{
 
39
    Q_OBJECT
38
40
public:
39
 
        static DocumentFactory* instance();
40
 
        ~DocumentFactory();
41
 
 
42
 
        Document::Ptr load(const KUrl&);
43
 
 
44
 
        QList<KUrl> modifiedDocumentList() const;
45
 
 
46
 
        bool hasUrl(const KUrl&) const;
47
 
 
48
 
        void clearCache();
49
 
 
50
 
        QUndoGroup* undoGroup();
51
 
 
52
 
        /**
53
 
         * Do not keep document whose url is @url in cache even if it has been
54
 
         * modified
55
 
         */
56
 
        void forget(const KUrl& url);
 
41
    static DocumentFactory* instance();
 
42
    ~DocumentFactory();
 
43
 
 
44
    Document::Ptr load(const KUrl&);
 
45
 
 
46
    QList<KUrl> modifiedDocumentList() const;
 
47
 
 
48
    bool hasUrl(const KUrl&) const;
 
49
 
 
50
    void clearCache();
 
51
 
 
52
    QUndoGroup* undoGroup();
 
53
 
 
54
    /**
 
55
     * Do not keep document whose url is @url in cache even if it has been
 
56
     * modified
 
57
     */
 
58
    void forget(const KUrl& url);
57
59
 
58
60
Q_SIGNALS:
59
 
        void modifiedDocumentListChanged();
60
 
        void documentChanged(const KUrl&);
61
 
        void documentBusyStateChanged(const KUrl&, bool);
 
61
    void modifiedDocumentListChanged();
 
62
    void documentChanged(const KUrl&);
 
63
    void documentBusyStateChanged(const KUrl&, bool);
62
64
 
63
65
private Q_SLOTS:
64
 
        void slotLoaded(const KUrl&);
65
 
        void slotSaved(const KUrl&, const KUrl&);
66
 
        void slotModified(const KUrl&);
67
 
        void slotBusyChanged(const KUrl&, bool);
 
66
    void slotLoaded(const KUrl&);
 
67
    void slotSaved(const KUrl&, const KUrl&);
 
68
    void slotModified(const KUrl&);
 
69
    void slotBusyChanged(const KUrl&, bool);
68
70
 
69
71
private:
70
 
        DocumentFactory();
 
72
    DocumentFactory();
71
73
 
72
 
        DocumentFactoryPrivate* const d;
 
74
    DocumentFactoryPrivate* const d;
73
75
};
74
76
 
75
77
} // namespace