55 Q_D( RadioEngineWrapper ); |
62 Q_D( RadioEngineWrapper ); |
56 d->mObservers.removeAll( observer ); |
63 d->mObservers.removeAll( observer ); |
57 } |
64 } |
58 |
65 |
59 /*! |
66 /*! |
60 * Checks if the radio engine has been constructed properly |
|
61 */ |
|
62 bool RadioEngineWrapper::isEngineConstructed() |
|
63 { |
|
64 Q_D( RadioEngineWrapper ); |
|
65 return d->isEngineConstructed(); |
|
66 } |
|
67 |
|
68 /*! |
|
69 * Returns the settings handler owned by the engine |
67 * Returns the settings handler owned by the engine |
70 */ |
68 */ |
71 RadioSettingsIf& RadioEngineWrapper::settings() |
69 RadioSettingsIf& RadioEngineWrapper::settings() |
72 { |
70 { |
73 Q_D( RadioEngineWrapper ); |
71 Q_D( RadioEngineWrapper ); |
111 } |
109 } |
112 |
110 |
113 /*! |
111 /*! |
114 * Returns the frequency step size from the selected region |
112 * Returns the frequency step size from the selected region |
115 */ |
113 */ |
116 bool RadioEngineWrapper::isFrequencyValid( uint frequency ) |
114 bool RadioEngineWrapper::isFrequencyValid( uint frequency ) const |
117 { |
115 { |
118 Q_D( const RadioEngineWrapper ); |
116 return frequency >= minFrequency() && frequency <= maxFrequency() && frequency % frequencyStepSize() == 0; |
119 return d->mEngineHandler->IsFrequencyValid( frequency ); |
|
120 } |
117 } |
121 |
118 |
122 /*! |
119 /*! |
123 * Checks if the radio engine is on |
120 * Checks if the radio engine is on |
124 */ |
121 */ |
132 * Returns the currently tuned frequency |
129 * Returns the currently tuned frequency |
133 */ |
130 */ |
134 uint RadioEngineWrapper::currentFrequency() const |
131 uint RadioEngineWrapper::currentFrequency() const |
135 { |
132 { |
136 Q_D( const RadioEngineWrapper ); |
133 Q_D( const RadioEngineWrapper ); |
137 return d->mEngineHandler->TunedFrequency(); |
134 return d->mEngineHandler->CurrentFrequency(); |
138 } |
135 } |
139 |
136 |
140 /*! |
137 /*! |
141 * Returns the mute status |
138 * Returns the mute status |
142 */ |
139 */ |
163 Q_D( const RadioEngineWrapper ); |
160 Q_D( const RadioEngineWrapper ); |
164 return d->mUseLoudspeaker; |
161 return d->mUseLoudspeaker; |
165 } |
162 } |
166 |
163 |
167 /*! |
164 /*! |
|
165 * Sets or unsets the engine to manual seek mode |
|
166 */ |
|
167 void RadioEngineWrapper::setManualSeekMode( bool manualSeek ) |
|
168 { |
|
169 Q_D( RadioEngineWrapper ); |
|
170 d->mEngineHandler->SetManualSeekMode( manualSeek ); |
|
171 } |
|
172 |
|
173 /*! |
|
174 * Checks if the engine is in manual seek mode |
|
175 */ |
|
176 bool RadioEngineWrapper::isInManualSeekMode() const |
|
177 { |
|
178 Q_D( const RadioEngineWrapper ); |
|
179 return d->mEngineHandler->IsInManualSeekMode(); |
|
180 } |
|
181 |
|
182 /*! |
|
183 * |
|
184 */ |
|
185 void RadioEngineWrapper::setRdsEnabled( bool rdsEnabled ) |
|
186 { |
|
187 Q_D( RadioEngineWrapper ); |
|
188 d->mEngineHandler->SetRdsEnabled( rdsEnabled ); |
|
189 } |
|
190 |
|
191 /*! |
168 * Tunes to the given frequency |
192 * Tunes to the given frequency |
169 */ |
193 */ |
170 void RadioEngineWrapper::tuneFrequency( uint frequency, const int reason ) |
194 void RadioEngineWrapper::setFrequency( uint frequency, const int reason ) |
171 { |
195 { |
172 Q_D( RadioEngineWrapper ); |
196 Q_D( RadioEngineWrapper ); |
173 d->tuneFrequency( frequency, reason ); |
197 d->setFrequency( frequency, reason ); |
174 } |
198 } |
175 |
199 |
176 /*! |
200 /*! |
177 * Tunes to the given frequency after a delay |
201 * volume increase command for the engine |
178 */ |
202 */ |
179 void RadioEngineWrapper::tuneWithDelay( uint frequency, const int reason ) |
203 void RadioEngineWrapper::increaseVolume() |
180 { |
204 { |
181 Q_D( RadioEngineWrapper ); |
205 Q_D( RadioEngineWrapper ); |
182 d->tuneWithDelay( frequency, reason ); |
206 d->mEngineHandler->IncreaseVolume(); |
|
207 } |
|
208 |
|
209 /*! |
|
210 * volume decrease command for the engine |
|
211 */ |
|
212 void RadioEngineWrapper::decreaseVolume() |
|
213 { |
|
214 Q_D( RadioEngineWrapper ); |
|
215 d->mEngineHandler->DecreaseVolume(); |
183 } |
216 } |
184 |
217 |
185 /*! |
218 /*! |
186 * volume update command for the engine |
219 * volume update command for the engine |
187 */ |
220 */ |