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

« back to all changes in this revision

Viewing changes to lib/semanticinfo/semanticinfodirmodel.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:
1
 
// vim: set tabstop=4 shiftwidth=4 noexpandtab:
 
1
// vim: set tabstop=4 shiftwidth=4 expandtab:
2
2
/*
3
3
Gwenview: an image viewer
4
4
Copyright 2008 Aurélien Gâteau <agateau@kde.org>
30
30
 
31
31
class KUrl;
32
32
 
33
 
namespace Gwenview {
34
 
 
 
33
namespace Gwenview
 
34
{
35
35
 
36
36
class AbstractSemanticInfoBackEnd;
37
37
struct SemanticInfo;
40
40
 * Extends KDirModel by providing read/write access to image metadata such as
41
41
 * rating, tags and descriptions.
42
42
 */
43
 
class SemanticInfoDirModel : public KDirModel {
44
 
        Q_OBJECT
 
43
class SemanticInfoDirModel : public KDirModel
 
44
{
 
45
    Q_OBJECT
45
46
public:
46
 
        enum {
47
 
                RatingRole = 0x21a43a51,
48
 
                DescriptionRole = 0x26FB33FA,
49
 
                TagsRole = 0x0462F0A8
50
 
        };
51
 
        SemanticInfoDirModel(QObject* parent);
52
 
        ~SemanticInfoDirModel();
53
 
 
54
 
        void clearSemanticInfoCache();
55
 
 
56
 
        bool semanticInfoAvailableForIndex(const QModelIndex&) const;
57
 
 
58
 
        void retrieveSemanticInfoForIndex(const QModelIndex&);
59
 
 
60
 
        SemanticInfo semanticInfoForIndex(const QModelIndex&) const;
61
 
 
62
 
        virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
63
 
 
64
 
        bool setData(const QModelIndex& index, const QVariant& data, int role = Qt::EditRole);
65
 
 
66
 
        AbstractSemanticInfoBackEnd* semanticInfoBackEnd() const;
 
47
    enum {
 
48
        RatingRole = 0x21a43a51,
 
49
        DescriptionRole = 0x26FB33FA,
 
50
        TagsRole = 0x0462F0A8
 
51
    };
 
52
    SemanticInfoDirModel(QObject* parent);
 
53
    ~SemanticInfoDirModel();
 
54
 
 
55
    void clearSemanticInfoCache();
 
56
 
 
57
    bool semanticInfoAvailableForIndex(const QModelIndex&) const;
 
58
 
 
59
    void retrieveSemanticInfoForIndex(const QModelIndex&);
 
60
 
 
61
    SemanticInfo semanticInfoForIndex(const QModelIndex&) const;
 
62
 
 
63
    virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
 
64
 
 
65
    bool setData(const QModelIndex& index, const QVariant& data, int role = Qt::EditRole);
 
66
 
 
67
    AbstractSemanticInfoBackEnd* semanticInfoBackEnd() const;
67
68
 
68
69
Q_SIGNALS:
69
 
        void semanticInfoRetrieved(const KUrl&, const SemanticInfo&);
 
70
    void semanticInfoRetrieved(const KUrl&, const SemanticInfo&);
70
71
 
71
72
private:
72
 
        SemanticInfoDirModelPrivate* const d;
 
73
    SemanticInfoDirModelPrivate* const d;
73
74
 
74
75
private Q_SLOTS:
75
 
        void slotSemanticInfoRetrieved(const KUrl& url, const SemanticInfo&);
 
76
    void slotSemanticInfoRetrieved(const KUrl& url, const SemanticInfo&);
76
77
 
77
 
        void slotRowsAboutToBeRemoved(const QModelIndex&, int, int);
78
 
        void slotModelAboutToBeReset();
 
78
    void slotRowsAboutToBeRemoved(const QModelIndex&, int, int);
 
79
    void slotModelAboutToBeReset();
79
80
};
80
81
 
81
 
 
82
82
} // namespace
83
83
 
84
84
#endif /* SEMANTICINFODIRMODEL_H */