23 #include <QTime> |
23 #include <QTime> |
24 #include <qdatastream.h> |
24 #include <qdatastream.h> |
25 #include <smfmusicrating.h> |
25 #include <smfmusicrating.h> |
26 #include <smfartists.h> |
26 #include <smfartists.h> |
27 #include <smfalbum.h> |
27 #include <smfalbum.h> |
|
28 #include <smfcomment.h> |
28 #include <QStringList> |
29 #include <QStringList> |
29 #include <QSharedData> |
30 #include <QSharedData> |
30 #include <smfclientglobal.h> |
31 #include <smfclientglobal.h> |
31 |
32 |
32 class SmfTrackInfoPrivate; |
33 class SmfTrackInfoPrivate; |
33 |
34 |
34 /** |
35 /** |
35 * @ingroup smf_common_group |
36 * @ingroup smf_common_group |
36 * The track info class represents information about a music track |
37 * The track info class represents information about a music track |
37 */ |
38 */ |
38 class SMFCLIENT_EXPORT SmfTrackInfo : public QObject |
39 class SMFCLIENT_EXPORT SmfTrackInfo |
39 { |
40 { |
40 Q_OBJECT |
|
41 public: |
41 public: |
42 /** |
42 /** |
43 * Constructor with default argument |
43 * Constructor with default argument |
44 * @param aParent The parent object |
44 */ |
45 * (parent should be of type SmfMusicServicePlugin) |
45 SmfTrackInfo( ); |
46 */ |
|
47 SmfTrackInfo(QObject *aParent = 0 ); |
|
48 |
46 |
49 /** |
47 /** |
50 * Copy Constructor |
48 * Copy Constructor |
51 * @param aOther The reference object |
49 * @param aOther The reference object |
52 */ |
50 */ |
53 SmfTrackInfo( const SmfTrackInfo &aOther ); |
51 SmfTrackInfo( const SmfTrackInfo &aOther ); |
|
52 |
|
53 /** |
|
54 * Overloaded = operator |
|
55 * @param aOther The reference object |
|
56 */ |
|
57 SmfTrackInfo& operator=( const SmfTrackInfo &aOther ); |
54 |
58 |
55 /** |
59 /** |
56 * Destructor |
60 * Destructor |
57 */ |
61 */ |
58 ~SmfTrackInfo( ); |
62 ~SmfTrackInfo( ); |
|
63 |
|
64 /** |
|
65 * Method to get the track title |
|
66 * @return The title of the track |
|
67 */ |
|
68 QString title( ) const; |
|
69 |
|
70 /** |
|
71 * Method to get the track album |
|
72 * @return The album of the track |
|
73 */ |
|
74 SmfAlbum album( ) const; |
|
75 |
|
76 /** |
|
77 * Method to get the track's artists |
|
78 * @return The artists of the track |
|
79 */ |
|
80 SmfArtists artists( ) const; |
|
81 |
|
82 /** |
|
83 * Method to get the genre of the track |
|
84 * @return The genre of the track |
|
85 */ |
|
86 QString genre( ) const; |
|
87 |
|
88 /** |
|
89 * Method to get the track's tag |
|
90 * @return The tag of the track |
|
91 */ |
|
92 QStringList tags( ) const; |
|
93 |
|
94 /** |
|
95 * Method to get the release year of the track |
|
96 * @return The release year of the track |
|
97 */ |
|
98 QDateTime year( ) const; |
|
99 |
|
100 /** |
|
101 * Method to get the track's rating |
|
102 * @return The rating of the track |
|
103 */ |
|
104 SmfMusicRating rating( ) const; |
|
105 |
|
106 /** |
|
107 * Method to get the comments on the track |
|
108 * @return The comments on the track |
|
109 */ |
|
110 QList<SmfComment> comments( ) const; |
|
111 |
|
112 /** |
|
113 * Method to get the track's duration |
|
114 * @return The duration of the track |
|
115 */ |
|
116 QTime duration( ) const; |
59 |
117 |
60 /** |
118 /** |
61 * Method to get the id of the track |
119 * Method to get the id of the track |
62 * @return The ID value |
120 * @return The ID value |
63 */ |
121 */ |
64 QString id( ) const; |
122 QString id( ) const; |
65 |
123 |
66 /** |
124 /** |
67 * Method to get the track title |
|
68 * @return The title of the track |
|
69 */ |
|
70 QString title( ) const; |
|
71 |
|
72 /** |
|
73 * Method to get the track album |
|
74 * @return The album of the track |
|
75 */ |
|
76 SmfAlbum album( ) const; |
|
77 |
|
78 /** |
|
79 * Method to get the track's artists |
|
80 * @return The artists of the track |
|
81 */ |
|
82 SmfArtists artists( ) const; |
|
83 |
|
84 /** |
|
85 * Method to get the genre of the track |
|
86 * @return The genre of the track |
|
87 */ |
|
88 QString genre( ) const; |
|
89 |
|
90 /** |
|
91 * Method to get the track's tag |
|
92 * @return The tag of the track |
|
93 */ |
|
94 QStringList tags( ) const; |
|
95 |
|
96 /** |
|
97 * Method to get the release year of the track |
|
98 * @return The release year of the track |
|
99 */ |
|
100 QDateTime year( ) const; |
|
101 |
|
102 /** |
|
103 * Method to get the track's rating |
|
104 * @return The rating of the track |
|
105 */ |
|
106 SmfMusicRating rating( ) const; |
|
107 |
|
108 /** |
|
109 * Method to get the comments on the track |
|
110 * @return The comments on the track |
|
111 */ |
|
112 QStringList comments( ) const; |
|
113 |
|
114 /** |
|
115 * Method to get the track's duration |
|
116 * @return The duration of the track |
|
117 */ |
|
118 QTime duration( ) const; |
|
119 |
|
120 /** |
|
121 * Method to set the track title |
125 * Method to set the track title |
122 * @param aTitle The new title of the track |
126 * @param aTitle The new title of the track |
123 */ |
127 */ |
124 void setTitle( const QString &aTitle ); |
128 void setTitle( const QString &aTitle ); |
125 |
129 |
161 |
165 |
162 /** |
166 /** |
163 * Method to set the comments on the track |
167 * Method to set the comments on the track |
164 * @param aComment The new comment of the track |
168 * @param aComment The new comment of the track |
165 */ |
169 */ |
166 void setComment( const QStringList &aComments ); |
170 void setComment( const QList<SmfComment> &aComments ); |
167 |
171 |
168 /** |
172 /** |
169 * Method to set the duration of the track |
173 * Method to set the duration of the track |
170 * @param aDuration The new duration of the track |
174 * @param aDuration The new duration of the track |
171 */ |
175 */ |
172 void setDuration( const QTime &aDuration ); |
176 void setDuration( const QTime &aDuration ); |
|
177 |
|
178 /** |
|
179 * Method to set the id of the track |
|
180 * @param aId The ID value |
|
181 */ |
|
182 void setId( const QString &aId ); |
173 |
183 |
174 private: |
184 private: |
175 QSharedDataPointer<SmfTrackInfoPrivate> d; |
185 QSharedDataPointer<SmfTrackInfoPrivate> d; |
176 |
186 |
177 friend QDataStream &operator<<( QDataStream &aDataStream, |
187 friend QDataStream &operator<<( QDataStream &aDataStream, |