1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Stub of Metadata of song |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef MPSONGDATA_H |
|
19 #define MPSONGDATA_H |
|
20 |
|
21 #include <QObject> |
|
22 #include <QString> |
|
23 #include <QPixmap> |
|
24 |
|
25 |
|
26 //forward declartions |
|
27 class QIcon; |
|
28 |
|
29 //class declaration |
|
30 class MpSongData : public QObject |
|
31 { |
|
32 Q_OBJECT |
|
33 |
|
34 public: |
|
35 explicit MpSongData( QObject *parent=0 ); |
|
36 virtual ~MpSongData(); |
|
37 |
|
38 bool setTitle( const QString &title ); |
|
39 bool setAlbum( const QString &album ); |
|
40 bool setArtist( const QString &artist ); |
|
41 bool setComment( const QString &comment ); |
|
42 void setAlbumArtUri( const QString &albumArtUri ); |
|
43 bool setYear( int date ); |
|
44 bool setGenre( const QString &genre ); |
|
45 bool setComposer( const QString &compoer ); |
|
46 bool setAlbumTrack( const QString &albumtrack ); |
|
47 void setLink( const QString &link ); |
|
48 bool setMusicURL( const QString &musicURL ); |
|
49 |
|
50 // inform details view when basic information is ready to accelerate UI update |
|
51 void commitPlaybackInfo(); |
|
52 // inform details view when details information is ready |
|
53 void commitSongDetailInfo(); |
|
54 |
|
55 public slots: |
|
56 void thumbnailReady( const QPixmap& pixmap, void *data, int id, int error ); |
|
57 |
|
58 int reservedLength() const { return mLink.length() + mTitle.length() + mArtist.length(); } |
|
59 |
|
60 QString title() const; |
|
61 QString album() const; |
|
62 QString artist() const; |
|
63 QString comment() const; |
|
64 void albumArt( QPixmap& pixmap ); |
|
65 QString year() const; |
|
66 QString genre() const; |
|
67 QString composer() const; |
|
68 QString albumTrack() const; |
|
69 QString musicURL() const; |
|
70 QString link() const; |
|
71 QString albumArtBase64() const; |
|
72 |
|
73 signals: |
|
74 void albumArtReady(); |
|
75 void playbackInfoChanged(); |
|
76 void songDetailInfoChanged(); |
|
77 |
|
78 private: |
|
79 QString mTitle; |
|
80 QString mAlbum; |
|
81 QString mArtist; |
|
82 QString mComment; |
|
83 QString mComposer; |
|
84 QString mGenre; |
|
85 QString mYear; |
|
86 QString mAlbumTrack; |
|
87 QPixmap mAlbumArt; |
|
88 int mReqId; |
|
89 QString currentAAUri; |
|
90 QPixmap mDefaultAlbumArt; |
|
91 QString mLink; |
|
92 QString mMusicURL; |
|
93 |
|
94 Q_DISABLE_COPY(MpSongData) |
|
95 }; |
|
96 |
|
97 #endif // MPSONGDATA_H |
|