equal
deleted
inserted
replaced
|
1 /** |
|
2 * @file smfmusicrating.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 music rating class represents an instance of rating |
|
18 * about a music track |
|
19 */ |
|
20 |
|
21 #ifndef SMFMUSICRATING_H_ |
|
22 #define SMFMUSICRATING_H_ |
|
23 |
|
24 #include <QObject> |
|
25 #include "SmfClientGlobal.h" |
|
26 class SmfTrackInfo; |
|
27 /** |
|
28 * Rating value, services should define their own scale |
|
29 */ |
|
30 class SMFCLIENT_EXPORT SmfMusicRating : QObject |
|
31 { |
|
32 Q_OBJECT |
|
33 |
|
34 public: |
|
35 /** |
|
36 * Constructs the rating for the given track |
|
37 */ |
|
38 SmfMusicRating(SmfTrackInfo* track); |
|
39 /** |
|
40 * Gets the rating |
|
41 */ |
|
42 int getRating(); |
|
43 |
|
44 /** |
|
45 * Gets the max for the rating scale |
|
46 */ |
|
47 int getMax(); |
|
48 |
|
49 /** |
|
50 * Gets the min for the rating scale |
|
51 */ |
|
52 int getMin(); |
|
53 |
|
54 /** |
|
55 * Gets the rating |
|
56 */ |
|
57 void setRating(int rating); |
|
58 |
|
59 /** |
|
60 * Sets the max for the rating scale |
|
61 */ |
|
62 void setMax(int max); |
|
63 |
|
64 /** |
|
65 * Sets the min for the rating scale |
|
66 */ |
|
67 void setMin(int min); |
|
68 |
|
69 private: |
|
70 int m_rating; |
|
71 int m_max; |
|
72 int m_min; |
|
73 }; |
|
74 /** |
|
75 * Externalization |
|
76 */ |
|
77 QDataStream &operator<<(QDataStream &, const SmfMusicRating&); |
|
78 /** |
|
79 * Internalization |
|
80 */ |
|
81 QDataStream &operator>>(QDataStream &, SmfMusicRating&); |
|
82 #endif /* SMFMUSICRATING_H_ */ |