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

« back to all changes in this revision

Viewing changes to lib/placetreemodel.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 2009 Aurélien Gâteau <agateau@kde.org>
32
32
 
33
33
class KUrl;
34
34
 
35
 
namespace Gwenview {
36
 
 
 
35
namespace Gwenview
 
36
{
37
37
 
38
38
struct PlaceTreeModelPrivate;
39
 
class GWENVIEWLIB_EXPORT PlaceTreeModel : public QAbstractItemModel {
40
 
        Q_OBJECT
 
39
class GWENVIEWLIB_EXPORT PlaceTreeModel : public QAbstractItemModel
 
40
{
 
41
    Q_OBJECT
41
42
public:
42
 
        PlaceTreeModel(QObject*);
43
 
        ~PlaceTreeModel();
44
 
 
45
 
        virtual int columnCount(const QModelIndex& parent = QModelIndex()) const;
46
 
        virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
47
 
        virtual QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const;
48
 
        virtual QModelIndex parent(const QModelIndex& index) const;
49
 
        virtual int rowCount(const QModelIndex& parent = QModelIndex()) const;
50
 
        virtual bool hasChildren(const QModelIndex& parent) const;
51
 
        virtual bool canFetchMore(const QModelIndex& parent) const;
52
 
        virtual void fetchMore(const QModelIndex& parent);
53
 
 
54
 
        KUrl urlForIndex(const QModelIndex&) const;
 
43
    PlaceTreeModel(QObject*);
 
44
    ~PlaceTreeModel();
 
45
 
 
46
    virtual int columnCount(const QModelIndex& parent = QModelIndex()) const;
 
47
    virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
 
48
    virtual QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const;
 
49
    virtual QModelIndex parent(const QModelIndex& index) const;
 
50
    virtual int rowCount(const QModelIndex& parent = QModelIndex()) const;
 
51
    virtual bool hasChildren(const QModelIndex& parent) const;
 
52
    virtual bool canFetchMore(const QModelIndex& parent) const;
 
53
    virtual void fetchMore(const QModelIndex& parent);
 
54
 
 
55
    KUrl urlForIndex(const QModelIndex&) const;
55
56
 
56
57
private Q_SLOTS:
57
 
        void slotPlacesRowsInserted(const QModelIndex&, int start, int end);
58
 
        void slotPlacesRowsAboutToBeRemoved(const QModelIndex&, int start, int end);
59
 
        void slotDirRowsAboutToBeInserted(const QModelIndex&, int start, int end);
60
 
        void slotDirRowsInserted(const QModelIndex&, int start, int end);
61
 
        void slotDirRowsAboutToBeRemoved(const QModelIndex&, int start, int end);
62
 
        void slotDirRowsRemoved(const QModelIndex&, int start, int end);
 
58
    void slotPlacesRowsInserted(const QModelIndex&, int start, int end);
 
59
    void slotPlacesRowsAboutToBeRemoved(const QModelIndex&, int start, int end);
 
60
    void slotDirRowsAboutToBeInserted(const QModelIndex&, int start, int end);
 
61
    void slotDirRowsInserted(const QModelIndex&, int start, int end);
 
62
    void slotDirRowsAboutToBeRemoved(const QModelIndex&, int start, int end);
 
63
    void slotDirRowsRemoved(const QModelIndex&, int start, int end);
63
64
 
64
65
private:
65
 
        friend struct PlaceTreeModelPrivate;
66
 
        PlaceTreeModelPrivate* const d;
 
66
    friend struct PlaceTreeModelPrivate;
 
67
    PlaceTreeModelPrivate* const d;
67
68
};
68
69
 
69
 
 
70
70
} // namespace
71
71
 
72
72
#endif /* PLACETREEMODEL_H */