~schumski-deactivatedaccount-deactivatedaccount/k3b/master

« back to all changes in this revision

Viewing changes to src/projects/k3bdataprojectmodel.h

  • Committer: Sebastian Trueg
  • Date: 2009-02-22 22:39:42 UTC
  • Revision ID: git-v1:6dd604da258355f5620f2f59e0ddb7c52e625553
I finally did it: I moved all K3b classes into the K3b namespace. Now this might sound like completely useless (and it actually is, too)
but I like it better this way and it also forced me to look at nearly each source file to fix the things that my crude scripting skills
did not catch properly.
And on the way I also cleaned up the code, used QFlags a few more times and introduced some d-pointers.

svn path=/trunk/extragear/multimedia/k3b/; revision=930262

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
#include <QtCore/QAbstractItemModel>
19
19
 
20
 
class K3bDataDoc;
21
 
class K3bDataItem;
22
 
class K3bDirItem;
 
20
namespace K3b {
 
21
    class DataDoc;
 
22
}
 
23
namespace K3b {
 
24
    class DataItem;
 
25
}
 
26
namespace K3b {
 
27
    class DirItem;
 
28
}
23
29
 
24
30
namespace K3b {
25
31
    class DataProjectModel : public QAbstractItemModel
27
33
        Q_OBJECT
28
34
 
29
35
    public:
30
 
        DataProjectModel( K3bDataDoc* doc, QObject* parent );
 
36
        DataProjectModel( DataDoc* doc, QObject* parent );
31
37
        ~DataProjectModel();
32
38
 
33
39
        enum Columns {
39
45
            NumColumns
40
46
        };
41
47
 
42
 
        K3bDataDoc* project() const;
 
48
        DataDoc* project() const;
43
49
 
44
 
        K3bDataItem* itemForIndex( const QModelIndex& index ) const;
45
 
        QModelIndex indexForItem( K3bDataItem* item ) const;
 
50
        DataItem* itemForIndex( const QModelIndex& index ) const;
 
51
        QModelIndex indexForItem( DataItem* item ) const;
46
52
 
47
53
        int columnCount( const QModelIndex& parent = QModelIndex() ) const;
48
54
        QVariant data( const QModelIndex& index, int role = Qt::DisplayRole ) const;
61
67
        class Private;
62
68
        Private* const d;
63
69
 
64
 
        Q_PRIVATE_SLOT( d, void _k_aboutToAddItem( K3bDirItem* dir, K3bDataItem* item ) )
65
 
        Q_PRIVATE_SLOT( d, void _k_aboutToRemoveItem( K3bDataItem* item ) )
66
 
        Q_PRIVATE_SLOT( d, void _k_itemAdded( K3bDataItem* item ) )
67
 
        Q_PRIVATE_SLOT( d, void _k_itemRemoved( K3bDataItem* item ) )
 
70
        Q_PRIVATE_SLOT( d, void _k_aboutToAddItem( DirItem* dir, DataItem* item ) )
 
71
        Q_PRIVATE_SLOT( d, void _k_aboutToRemoveItem( DataItem* item ) )
 
72
        Q_PRIVATE_SLOT( d, void _k_itemAdded( DataItem* item ) )
 
73
        Q_PRIVATE_SLOT( d, void _k_itemRemoved( DataItem* item ) )
68
74
    };
69
75
}
70
76