equal
deleted
inserted
replaced
22 #include <QString> |
22 #include <QString> |
23 #include <QDateTime> |
23 #include <QDateTime> |
24 |
24 |
25 // User includes |
25 // User includes |
26 |
26 |
|
27 // Forward declarations |
|
28 class QSqlRecord; |
|
29 |
|
30 // Constants |
|
31 namespace RadioHistoryValue |
|
32 { |
|
33 enum Name |
|
34 { |
|
35 Id, |
|
36 Artist, |
|
37 Title, |
|
38 Station, |
|
39 Frequency, |
|
40 Tagged, |
|
41 FromRds, |
|
42 Time |
|
43 }; |
|
44 } |
|
45 |
27 class RadioHistoryItemPrivate |
46 class RadioHistoryItemPrivate |
28 { |
47 { |
29 public: |
48 public: |
30 |
49 |
31 RadioHistoryItemPrivate(); |
50 RadioHistoryItemPrivate(); |
32 RadioHistoryItemPrivate( const QString& artist, const QString& title ); |
51 RadioHistoryItemPrivate( const QString& artist, const QString& title ); |
33 |
52 |
34 void init( const QString& artist, const QString& title ); |
53 void init( const QString& artist, const QString& title ); |
35 |
54 |
|
55 void initFromRecord( const QSqlRecord& record ); |
|
56 |
36 public: // data |
57 public: // data |
37 |
58 |
38 /** |
59 /** |
39 * Reference count used for implicit sharing. |
60 * Reference count used for implicit sharing. |
40 * Has to be named "ref" instead having the 'm' prefix like all other member variables in Radio |
61 * Has to be named "ref" instead having the 'm' prefix like all other member variables in Radio |
41 * This is because convenience functions like qAtomicAssign() expect it to be named "ref" |
62 * This is because convenience functions like qAtomicAssign() expect it to be named "ref" |
42 */ |
63 */ |
43 QAtomicInt ref; |
64 QAtomicInt ref; |
|
65 |
|
66 int mId; |
44 |
67 |
45 QString mArtist; |
68 QString mArtist; |
46 |
69 |
47 QString mTitle; |
70 QString mTitle; |
48 |
71 |
50 |
73 |
51 QDateTime mTime; |
74 QDateTime mTime; |
52 |
75 |
53 uint mFrequency; |
76 uint mFrequency; |
54 |
77 |
55 int mPlayCount; |
78 bool mTagged; |
56 |
79 |
57 bool mFavorite; |
80 bool mFromRds; |
58 |
81 |
59 }; |
82 }; |
60 |
83 |
61 #endif // RADIOHISTORYITEM_H |
84 #endif // RADIOHISTORYITEM_H |