|
1 /** |
|
2 * Copyright (c) 2010 Sasken Communication Technologies Ltd. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the "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 * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution |
|
11 * |
|
12 * Contributors: |
|
13 * Manasij Roy, Nalina Hariharan |
|
14 * |
|
15 * Description: |
|
16 * The SmfArtists class represents the artists in a track or an album |
|
17 * |
|
18 */ |
|
19 |
|
20 #ifndef SMFARTISTS_H_ |
|
21 #define SMFARTISTS_H_ |
|
22 |
|
23 #include <QImage> |
|
24 #include <QUrl> |
|
25 #include <qdatastream.h> |
|
26 #include <QSharedData> |
|
27 #include <smfclientglobal.h> |
|
28 |
|
29 class SmfArtistsPrivate; |
|
30 |
|
31 /** |
|
32 * @ingroup smf_common_group |
|
33 * The SmfArtists class represents the artists in a track or an album |
|
34 */ |
|
35 class SMFCLIENT_EXPORT SmfArtists : public QObject |
|
36 { |
|
37 Q_OBJECT |
|
38 public: |
|
39 /** |
|
40 * Constructor with default argument |
|
41 * @param aParent The parent object |
|
42 */ |
|
43 SmfArtists( QObject *aParent = 0 ); |
|
44 |
|
45 /** |
|
46 * Copy Constructor |
|
47 * @param aOther The reference object |
|
48 */ |
|
49 SmfArtists( const SmfArtists &aOther ); |
|
50 |
|
51 /** |
|
52 * Overloaded = operator |
|
53 * @param aOther The reference object |
|
54 */ |
|
55 SmfArtists& operator=( const SmfArtists &aOther ); |
|
56 |
|
57 /** |
|
58 * Destructor |
|
59 */ |
|
60 ~SmfArtists( ); |
|
61 |
|
62 /** |
|
63 * Method to get the artists names |
|
64 * @return The list of artists |
|
65 */ |
|
66 QStringList names( ) const; |
|
67 |
|
68 /** |
|
69 * Method to get the image of the artists |
|
70 * @return The image of te artists |
|
71 */ |
|
72 QImage image( ) const; |
|
73 |
|
74 /** |
|
75 * Method to get the url of the artists |
|
76 * @return The url of the artists |
|
77 */ |
|
78 QUrl url( ) const; |
|
79 |
|
80 private: |
|
81 QSharedDataPointer<SmfArtistsPrivate> d; |
|
82 |
|
83 friend QDataStream &operator<<( QDataStream &aDataStream, |
|
84 const SmfArtists &aArtists ); |
|
85 |
|
86 friend QDataStream &operator>>( QDataStream &aDataStream, |
|
87 SmfArtists &aArtists ); |
|
88 |
|
89 }; |
|
90 |
|
91 |
|
92 /** |
|
93 * Method for Externalization. Writes the SmfArtists object to |
|
94 * the stream and returns a reference to the stream. |
|
95 * @param aDataStream Stream to be written |
|
96 * @param aArtists The SmfArtists object to be externalized |
|
97 * @return reference to the written stream |
|
98 */ |
|
99 QDataStream &operator<<( QDataStream &aDataStream, |
|
100 const SmfArtists &aArtists ); |
|
101 |
|
102 /** |
|
103 * Method for Internalization. Reads a SmfArtists object from |
|
104 * the stream and returns a reference to the stream. |
|
105 * @param aDataStream Stream to be read |
|
106 * @param aArtists The SmfArtists object to be internalized |
|
107 * @return reference to the stream |
|
108 */ |
|
109 QDataStream &operator>>( QDataStream &aDataStream, |
|
110 SmfArtists &aArtists); |
|
111 |
|
112 |
|
113 #endif /* SMFARTISTS_H_ */ |