equal
deleted
inserted
replaced
66 |
66 |
67 This signal is emitted when playback info changes. This includes: |
67 This signal is emitted when playback info changes. This includes: |
68 title, artist and album name. |
68 title, artist and album name. |
69 */ |
69 */ |
70 |
70 |
|
71 /*! |
|
72 \fn void fileCorrupted() |
|
73 |
|
74 This signal is emitted when a file is found corrupted. Call by |
|
75 PlayBackWrapper. |
|
76 */ |
|
77 |
71 |
78 |
72 |
79 |
73 /*! |
80 /*! |
74 Constructs a new MpPlaybackData. |
81 Constructs a new MpPlaybackData. |
75 */ |
82 */ |
172 */ |
179 */ |
173 bool MpPlaybackData::setArtist( const QString& artist ) |
180 bool MpPlaybackData::setArtist( const QString& artist ) |
174 { |
181 { |
175 TX_ENTRY_ARGS( "artist = " << artist ) |
182 TX_ENTRY_ARGS( "artist = " << artist ) |
176 bool change = false; |
183 bool change = false; |
177 // data is different or mArtist was not set befor or it was reset. |
184 // data is different or mArtist was not set before or it was reset. |
178 // When artist is empty and mArtist is empty mArtist should be unknown text. |
|
179 if ( artist != mArtist || mArtist.isNull()) { |
185 if ( artist != mArtist || mArtist.isNull()) { |
180 change = true; |
186 change = true; |
181 if ( artist.isEmpty() ){ |
187 mArtist = artist; |
182 mArtist = hbTrId( "txt_mus_other_unknown3" ); |
|
183 } |
|
184 else { |
|
185 mArtist = artist; |
|
186 } |
|
187 } |
188 } |
188 TX_EXIT |
189 TX_EXIT |
189 return change; |
190 return change; |
190 } |
191 } |
191 |
192 |
203 */ |
204 */ |
204 bool MpPlaybackData::setAlbum( const QString& album ) |
205 bool MpPlaybackData::setAlbum( const QString& album ) |
205 { |
206 { |
206 TX_ENTRY_ARGS( "album = " << album ) |
207 TX_ENTRY_ARGS( "album = " << album ) |
207 bool change = false; |
208 bool change = false; |
208 // data is different or mAlbum was not set befor or it was reset. |
209 // data is different or mAlbum was not set before or it was reset. |
209 // when album is empty and mAlbum is empty mAlbum should be unknown text. |
|
210 if ( album != mAlbum || mAlbum.isNull() ) { |
210 if ( album != mAlbum || mAlbum.isNull() ) { |
211 change = true; |
211 change = true; |
212 if ( album.isEmpty() ){ |
212 mAlbum = album; |
213 mAlbum = hbTrId( "txt_mus_other_unknown4" ); |
|
214 } |
|
215 else{ |
|
216 mAlbum = album; |
|
217 } |
|
218 } |
213 } |
219 TX_EXIT |
214 TX_EXIT |
220 return change; |
215 return change; |
221 } |
216 } |
222 |
217 |
409 emit albumArtReady(); |
404 emit albumArtReady(); |
410 emit playbackInfoChanged(); |
405 emit playbackInfoChanged(); |
411 } |
406 } |
412 |
407 |
413 /*! |
408 /*! |
|
409 Emit fileCorrupted(id) signal when a file with id is corrupted |
|
410 */ |
|
411 void MpPlaybackData::setCorrupted( int id ) |
|
412 { |
|
413 emit fileCorrupted( id ); |
|
414 } |
|
415 |
|
416 /*! |
414 Slot to handle the album art thumb. |
417 Slot to handle the album art thumb. |
415 */ |
418 */ |
416 void MpPlaybackData::thumbnailReady( |
419 void MpPlaybackData::thumbnailReady( |
417 const QPixmap& pixmap, void *data, int id, int error ) |
420 const QPixmap& pixmap, void *data, int id, int error ) |
418 { |
421 { |