38 RadioStationPrivate::RadioStationPrivate( const RadioStationPrivate& other ) : |
48 RadioStationPrivate::RadioStationPrivate( const RadioStationPrivate& other ) : |
39 QSharedData( other ), |
49 QSharedData( other ), |
40 mPresetIndex( other.mPresetIndex ), |
50 mPresetIndex( other.mPresetIndex ), |
41 mFrequency( other.mFrequency ), |
51 mFrequency( other.mFrequency ), |
42 mName( other.mName ), |
52 mName( other.mName ), |
43 mRenamedByUser( other.mRenamedByUser ), |
|
44 mGenre( other.mGenre ), |
53 mGenre( other.mGenre ), |
45 mUrl( other.mUrl ), |
54 mUrl( other.mUrl ), |
46 mPiCode( other.mPiCode ), |
55 mPiCode( other.mPiCode ), |
47 mType( other.mType ), |
56 mType( other.mType ), |
48 mPsType( other.mPsType ), |
57 mPsType( other.mPsType ), |
49 mRadioText( other.mRadioText ), |
58 mRadioText( other.mRadioText ), |
50 mDynamicPsText( other.mDynamicPsText ), |
59 mDynamicPsText( other.mDynamicPsText ), |
51 mChangeFlags( other.mChangeFlags ), |
60 mChangeFlags( other.mChangeFlags ), |
52 mCallSignCheckDone( other.mCallSignCheckDone ), |
|
53 mLastPsNameChangeTime( other.mLastPsNameChangeTime ) |
61 mLastPsNameChangeTime( other.mLastPsNameChangeTime ) |
54 { |
62 { |
|
63 setRenamedByUser( other.isRenamedByUser() ); |
|
64 setCallSignCheckDone( other.isCallSignCheckDone() ); |
|
65 setStationHasSentRds( other.hasStationSentRds() ); |
|
66 |
55 // Protect the shared null preset index to make debugging easier |
67 // Protect the shared null preset index to make debugging easier |
56 if ( mPresetIndex == RadioStation::SharedNull ) { |
68 if ( mPresetIndex == RadioStation::SharedNull ) { |
57 mPresetIndex = RadioStation::Invalid; |
69 mPresetIndex = RadioStation::Invalid; |
58 } |
70 } |
59 } |
71 } |
68 /*! |
80 /*! |
69 * |
81 * |
70 */ |
82 */ |
71 void RadioStationPrivate::init( int presetIndex, uint frequency ) |
83 void RadioStationPrivate::init( int presetIndex, uint frequency ) |
72 { |
84 { |
73 mPresetIndex = presetIndex; |
85 mPresetIndex = presetIndex; |
74 mFrequency = frequency; |
86 mFrequency = frequency; |
75 mRenamedByUser = false; |
87 mGenre = -1; |
76 mGenre = -1; |
88 mPiCode = -1; |
77 mPiCode = -1; |
89 mType = 0; |
78 mType = 0; |
90 mPsType = RadioStation::Unknown; |
79 mPsType = RadioStation::Unknown; |
91 mChangeFlags = RadioStation::NoChange; |
80 mChangeFlags = RadioStation::NoChange; |
92 mStationInfo = 0; |
81 mCallSignCheckDone = false; |
|
82 } |
93 } |
83 |
94 |
84 /*! |
95 /*! |
85 * \reimp |
96 * \reimp |
86 */ |
97 */ |
224 /*! |
231 /*! |
225 * \reimp |
232 * \reimp |
226 */ |
233 */ |
227 void RadioStationPrivate::setLocalStation( bool localStation ) |
234 void RadioStationPrivate::setLocalStation( bool localStation ) |
228 { |
235 { |
229 if ( localStation ) { |
236 SET_FLAG_VALUE( mType, RadioStation::LocalStation, localStation ); |
230 mType |= RadioStation::LocalStation; |
237 } |
231 } else { |
238 |
232 mType &= ~RadioStation::LocalStation; |
239 /*! |
233 } |
240 * \reimp |
234 } |
241 */ |
|
242 bool RadioStationPrivate::hasStationSentRds() const |
|
243 { |
|
244 return mStationInfo.testFlag( StationSendsRds ); |
|
245 } |
|
246 |
|
247 /*! |
|
248 * \reimp |
|
249 */ |
|
250 void RadioStationPrivate::setStationHasSentRds( bool hasSentRds ) |
|
251 { |
|
252 SET_FLAG_VALUE( mStationInfo, StationSendsRds, hasSentRds ); |
|
253 } |
|
254 |
|
255 /*! |
|
256 * |
|
257 */ |
|
258 bool RadioStationPrivate::isCallSignCheckDone() const |
|
259 { |
|
260 return mStationInfo.testFlag( CallSignCheckDone ); |
|
261 } |
|
262 |
|
263 /*! |
|
264 * |
|
265 */ |
|
266 void RadioStationPrivate::setCallSignCheckDone( bool checkDone ) |
|
267 { |
|
268 SET_FLAG_VALUE( mStationInfo, CallSignCheckDone, checkDone ); |
|
269 } |