equal
deleted
inserted
replaced
21 #define MPCOLLECTIONTBONELISTDATAMODEL_H |
21 #define MPCOLLECTIONTBONELISTDATAMODEL_H |
22 |
22 |
23 #include <QAbstractListModel> |
23 #include <QAbstractListModel> |
24 |
24 |
25 class MpMpxCollectionData; |
25 class MpMpxCollectionData; |
|
26 class MpPlaybackData; |
26 |
27 |
27 #if defined(BUILD_MPDATA_LIB) |
28 #if defined(BUILD_MPDATA_LIB) |
28 #define MPDATA_EXPORT Q_DECL_EXPORT |
29 #define MPDATA_EXPORT Q_DECL_EXPORT |
29 #else |
30 #else |
30 #define MPDATA_EXPORT Q_DECL_IMPORT |
31 #define MPDATA_EXPORT Q_DECL_IMPORT |
34 { |
35 { |
35 Q_OBJECT |
36 Q_OBJECT |
36 |
37 |
37 public: |
38 public: |
38 |
39 |
39 explicit MpCollectionTBoneListDataModel( MpMpxCollectionData *data, QObject *parent=0 ); |
40 explicit MpCollectionTBoneListDataModel( MpMpxCollectionData *collectionData, |
|
41 MpPlaybackData *playbackData = 0, QObject *parent = 0 ); |
40 virtual ~MpCollectionTBoneListDataModel(); |
42 virtual ~MpCollectionTBoneListDataModel(); |
41 |
43 |
42 int rowCount(const QModelIndex &parent=QModelIndex()) const; |
44 int rowCount(const QModelIndex &parent=QModelIndex()) const; |
43 QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const; |
45 QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const; |
44 |
46 |
45 signals: |
47 signals: |
46 |
48 |
47 void albumDataChanged(); |
49 void albumDataChanged(); |
|
50 void albumDataAvailable(); |
48 |
51 |
49 public slots: |
52 public slots: |
50 |
53 |
51 void refreshModel(); |
54 void refreshModel(); |
|
55 void updateSong(); |
|
56 void updatePlaybackState(); |
52 |
57 |
53 private: |
58 private: |
54 |
59 |
55 MpMpxCollectionData *mCollectionData; // Not own |
60 MpMpxCollectionData *mCollectionData; // Not own |
|
61 MpPlaybackData *mPlaybackData; // Not own |
56 int mRowCount; |
62 int mRowCount; |
|
63 int mCurrentSongId; |
|
64 bool mPlaybackActive; |
57 |
65 |
58 }; |
66 }; |
59 |
67 |
60 #endif // MPCOLLECTIONTBONELISTDATAMODEL_H |
68 #endif // MPCOLLECTIONTBONELISTDATAMODEL_H |
61 |
69 |