|
1 /** |
|
2 * @file smftrackinfo.h |
|
3 * @author Nalina Hariharan, Sasken Communication Technologies Ltd - Initial contribution |
|
4 * @version 1.0 |
|
5 * |
|
6 * @section LICENSE |
|
7 * |
|
8 * Copyright (c) 2010 Sasken Communication Technologies Ltd. |
|
9 * All rights reserved. |
|
10 * This component and the accompanying materials are made available |
|
11 * under the terms of the "{License}" |
|
12 * which accompanies this distribution, and is available |
|
13 * at the URL "{LicenseUrl}". |
|
14 * |
|
15 * @section DESCRIPTION |
|
16 * |
|
17 * The track info class represents information about a music track |
|
18 */ |
|
19 |
|
20 #ifndef SMFTRACKINFO_H_ |
|
21 #define SMFTRACKINFO_H_ |
|
22 |
|
23 #include <QTime> |
|
24 #include <qdatastream.h> |
|
25 #include <smfmusicrating.h> |
|
26 #include "SmfClientGlobal.h" |
|
27 /** |
|
28 * Music track info as track id,title, album, artist, genre, |
|
29 * tag, director,release year, rating, comment info |
|
30 */ |
|
31 class SMFCLIENT_EXPORT SmfTrackInfo : public QObject |
|
32 { |
|
33 Q_OBJECT |
|
34 public: |
|
35 /** |
|
36 * Constructs track info |
|
37 */ |
|
38 SmfTrackInfo(QObject* parent=0); |
|
39 /** |
|
40 * Gets track id |
|
41 */ |
|
42 void getId(QString& id); |
|
43 |
|
44 /** |
|
45 * Gets title of the track |
|
46 */ |
|
47 void getTitle(QString& title); |
|
48 |
|
49 /** |
|
50 * Gets album name |
|
51 */ |
|
52 void getAlbum(QString& album); |
|
53 |
|
54 /** |
|
55 * Gets track artist |
|
56 */ |
|
57 void getArtist(QString& artist); |
|
58 |
|
59 /** |
|
60 * Gets track genre |
|
61 */ |
|
62 void getGenre(QString& genre); |
|
63 |
|
64 /** |
|
65 * Gets track tag |
|
66 */ |
|
67 void getTag(QString& tag); |
|
68 |
|
69 /** |
|
70 * Gets director name |
|
71 */ |
|
72 void getDirector(QString& director); |
|
73 |
|
74 /** |
|
75 * Gets release year |
|
76 */ |
|
77 void getYear(QString& year); |
|
78 |
|
79 /** |
|
80 * Gets track rating |
|
81 */ |
|
82 void getRating(SmfMusicRating& rating); |
|
83 |
|
84 /** |
|
85 * Gets comments |
|
86 */ |
|
87 void getComment(QStringList& comment); |
|
88 |
|
89 |
|
90 /** |
|
91 * Sets id |
|
92 */ |
|
93 void setId(QString& id); |
|
94 |
|
95 /** |
|
96 * Sets title |
|
97 */ |
|
98 void setTitle(QString& title); |
|
99 |
|
100 /** |
|
101 * Sets album name |
|
102 */ |
|
103 void setAlbum(QString& album); |
|
104 |
|
105 /** |
|
106 * Sets artist name |
|
107 */ |
|
108 void setArtist(QString& artist); |
|
109 |
|
110 /** |
|
111 * Sets genre |
|
112 */ |
|
113 void setGenre(QString& genre); |
|
114 |
|
115 /** |
|
116 * Sets tag |
|
117 */ |
|
118 void setTag(QString& tag); |
|
119 |
|
120 /** |
|
121 * Sets director name |
|
122 */ |
|
123 void setDirector(QString& director); |
|
124 |
|
125 /** |
|
126 * Sets release year |
|
127 */ |
|
128 void setYear(QString& year); |
|
129 |
|
130 /** |
|
131 * Sets rating |
|
132 */ |
|
133 void setRating(SmfMusicRating& rating); |
|
134 |
|
135 /** |
|
136 * Sets comment |
|
137 */ |
|
138 void setComment(QStringList& comment); |
|
139 |
|
140 private: |
|
141 QString m_id; |
|
142 QString m_title; |
|
143 QString m_albumTitle; |
|
144 QString m_artistName; |
|
145 QString m_genre; |
|
146 QString m_tag; |
|
147 QString m_director; |
|
148 QString m_year; |
|
149 SmfMusicRating m_rating; |
|
150 QString m_comment; |
|
151 }; |
|
152 /** |
|
153 * Externalization |
|
154 */ |
|
155 QDataStream &operator<<(QDataStream &, const SmfTrackInfo&); |
|
156 /** |
|
157 * Internalization |
|
158 */ |
|
159 QDataStream &operator>>(QDataStream &, SmfTrackInfo&); |
|
160 #endif /* SMFTRACKINFO_H_ */ |