equal
deleted
inserted
replaced
19 */ |
19 */ |
20 |
20 |
21 #ifndef SMFMUSICRATING_H_ |
21 #ifndef SMFMUSICRATING_H_ |
22 #define SMFMUSICRATING_H_ |
22 #define SMFMUSICRATING_H_ |
23 |
23 |
24 #include <QObject> |
|
25 #include <QSharedData> |
24 #include <QSharedData> |
26 #include <smfclientglobal.h> |
25 #include <smfclientglobal.h> |
27 |
26 |
28 class SmfTrackInfo; |
27 class SmfTrackInfo; |
29 class SmfMusicRatingPrivate; |
28 class SmfMusicRatingPrivate; |
38 /** |
37 /** |
39 * @ingroup smf_common_group |
38 * @ingroup smf_common_group |
40 * The music rating class represents an instance of rating |
39 * The music rating class represents an instance of rating |
41 * about a music track |
40 * about a music track |
42 */ |
41 */ |
43 class SMFCLIENT_EXPORT SmfMusicRating : public QObject |
42 class SMFCLIENT_EXPORT SmfMusicRating |
44 { |
43 { |
45 Q_OBJECT |
|
46 public: |
44 public: |
47 /** |
45 /** |
48 * Constructor with default argument |
46 * Constructor with default argument |
49 * @param aParent The parent object |
47 * @param aParent The SmfTrackInfo instance |
50 * (parent should be of type SmfTrackInfo) |
|
51 */ |
48 */ |
52 SmfMusicRating(SmfTrackInfo *aParent = 0); |
49 SmfMusicRating(SmfTrackInfo *aParent = 0); |
53 |
50 |
54 /** |
51 /** |
55 * Copy Constructor |
52 * Copy Constructor |
84 * Method to get the min rating |
81 * Method to get the min rating |
85 * @return The min rating value |
82 * @return The min rating value |
86 */ |
83 */ |
87 int minRating( ) const; |
84 int minRating( ) const; |
88 |
85 |
|
86 /** |
|
87 * Method to set the rating |
|
88 * @param aRating The rating value |
|
89 */ |
|
90 void setRating( const int &aRating ); |
|
91 |
|
92 /** |
|
93 * Method to set the max rating |
|
94 * @param aMax The max rating value |
|
95 */ |
|
96 void setMaxRating( const int &aMax ); |
|
97 |
|
98 /** |
|
99 * Method to set the min rating |
|
100 * @param aMin The min rating value |
|
101 */ |
|
102 void setMinRating( const int &aMin ); |
|
103 |
89 private: |
104 private: |
90 QSharedDataPointer<SmfMusicRatingPrivate> d; |
105 QSharedDataPointer<SmfMusicRatingPrivate> d; |
91 |
106 |
92 friend QDataStream &operator<<( QDataStream &aDataStream, |
107 friend QDataStream &operator<<( QDataStream &aDataStream, |
93 const SmfMusicRating &aMusicRating ); |
108 const SmfMusicRating &aMusicRating ); |
116 * @return reference to the stream |
131 * @return reference to the stream |
117 */ |
132 */ |
118 QDataStream &operator>>( QDataStream &aDataStream, |
133 QDataStream &operator>>( QDataStream &aDataStream, |
119 SmfMusicRating &aMusicRating); |
134 SmfMusicRating &aMusicRating); |
120 |
135 |
|
136 |
121 // Make the class SmfMusicRating known to QMetaType, so that as to register it. |
137 // Make the class SmfMusicRating known to QMetaType, so that as to register it. |
122 Q_DECLARE_METATYPE(SmfMusicRating) |
138 Q_DECLARE_METATYPE(SmfMusicRating) |
123 |
139 |
|
140 |
124 #endif /* SMFMUSICRATING_H_ */ |
141 #endif /* SMFMUSICRATING_H_ */ |