54 |
56 |
55 bool setCurrentAlbum( int index ); |
57 bool setCurrentAlbum( int index ); |
56 int currentAlbumIndex() const; |
58 int currentAlbumIndex() const; |
57 int albumSongsCount() const; |
59 int albumSongsCount() const; |
58 QString albumSongData( int index, MpMpxCollectionData::DataType type ) const; |
60 QString albumSongData( int index, MpMpxCollectionData::DataType type ) const; |
|
61 bool hasItemProperty( int index, MpMpxCollectionData:: DataProperty type ) const; |
|
62 bool hasAlbumSongProperty( int index, MpMpxCollectionData:: DataProperty type ) const; |
59 |
63 |
60 void setMpxMedia( const CMPXMedia& entries, bool reopen ); |
64 void setMpxMedia( const CMPXMedia& entries, bool reopen ); |
|
65 void incrementalOpenUpdate(); |
61 const CMPXMedia& containerMedia(); |
66 const CMPXMedia& containerMedia(); |
62 void setContext( TCollectionContext context ); |
67 void setContext( TCollectionContext context ); |
63 void setAlbumContent( const CMPXMedia& albumContent ); |
68 void setAlbumContent( const CMPXMedia& albumContent ); |
64 int itemIndex( int itemUniqueId ); |
69 int itemIndex( int itemUniqueId ); |
65 int albumSongIndex( int songUniqueId ); |
70 int albumSongIndex( int songUniqueId ); |
|
71 QList<int> songIndex( int songUniqueId ); |
|
72 void setCorruptValue( QModelIndex index, bool tBone ); |
|
73 void setReloadAlbumContent( bool reloadAlbum ); |
66 |
74 |
67 private: |
75 private: |
|
76 |
68 void loadAlbumsLookup(); |
77 void loadAlbumsLookup(); |
69 void loadAlbumSongsLookup(); |
78 void loadAlbumSongsLookup(); |
70 void DoGetDataL( int index, MpMpxCollectionData::DataType type, QString& data ) const; |
79 void setReloadRange( int index ); |
|
80 int itemId2( int index); |
|
81 void DoGetDataL( int index, MpMpxCollectionData::DataType type, QString& data ); |
71 bool DoIsAutoPlaylistL(); |
82 bool DoIsAutoPlaylistL(); |
72 bool DoIsAutoPlaylistL( int index ); |
83 bool DoIsAutoPlaylistL( int index ); |
73 int DoGetItemCountL( int index ); |
84 int DoGetItemCountL( int index ); |
74 int DoGetContainerIdL(); |
85 int DoGetContainerIdL(); |
75 int DoGetItemIdL( int index ); |
86 int DoGetItemIdL( int index ); |
|
87 int DoGetItemId2L( int index ); |
76 int DoGetAlbumSongIdL( int index ); |
88 int DoGetAlbumSongIdL( int index ); |
77 void DoRemoveItemL( int index ); |
89 void DoRemoveItemL( int index ); |
78 bool DoTestCachedItemL( int itemId ); |
90 bool DoTestCachedItemL( int itemId ); |
79 |
91 |
80 bool DoSetCurrentAlbumL( int index ); |
92 bool DoSetCurrentAlbumL( int index ); |
81 void DoGetAlbumSongDataL( int index, MpMpxCollectionData::DataType type, QString& data ) const; |
93 void DoGetAlbumSongDataL( int index, MpMpxCollectionData::DataType type, QString& data ) const; |
|
94 bool DoHasItemPropertyL( int index, MpMpxCollectionData:: DataProperty type ) const; |
|
95 bool DoHasAlbumSongPropertyL( int index, MpMpxCollectionData:: DataProperty type ) const; |
82 |
96 |
83 void SetCollectionContextL(); |
97 void SetCollectionContextL(); |
84 void DoSetMpxMediaL( const CMPXMedia& entries ); |
98 void DoSetMpxMediaL( const CMPXMedia& entries ); |
85 void DoSetAlbumContentL( const CMPXMedia& albumContent ); |
99 void DoSetAlbumContentL( const CMPXMedia& albumContent ); |
|
100 void DoSetCorruptValueL( QModelIndex index, bool tBone ); |
86 |
101 |
87 private: |
102 private: |
88 |
103 |
89 MpMpxCollectionData *q_ptr; |
104 MpMpxCollectionData *q_ptr; |
90 |
105 |
94 CMPXMediaArray *iMediaArray; // Not owned |
109 CMPXMediaArray *iMediaArray; // Not owned |
95 CMPXMedia *iCachedRemovedItem; // Owned |
110 CMPXMedia *iCachedRemovedItem; // Owned |
96 |
111 |
97 int iCurrentAlbumIndex; |
112 int iCurrentAlbumIndex; |
98 int iAlbumSongCount; |
113 int iAlbumSongCount; |
99 QHash<int, int> albumIdIndexMapping; |
114 QHash<int, int> iAlbumIdIndexMapping; |
100 QHash<int, int> albumSongIdIndexMapping; |
115 QHash<int, int> iAlbumSongIdIndexMapping; |
|
116 QHash<int, int> iSongIdIndexMapping; |
|
117 bool iReloadAlbumContent; |
101 |
118 |
|
119 bool iNeedReload; |
|
120 QPair<int, int> iReloadRange; |
|
121 |
102 }; |
122 }; |
103 |
123 |
104 #endif // MPMPXCOLLECTIONDATA_P_H |
124 #endif // MPMPXCOLLECTIONDATA_P_H |
105 |
125 |