-rw-r--r-- | libopie/odevice.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libopie/odevice.h b/libopie/odevice.h index ee0b0ec..791d358 100644 --- a/libopie/odevice.h +++ b/libopie/odevice.h | |||
@@ -179,106 +179,108 @@ public: | |||
179 | virtual ~ODevice ( ); | 179 | virtual ~ODevice ( ); |
180 | 180 | ||
181 | static ODevice *inst ( ); | 181 | static ODevice *inst ( ); |
182 | 182 | ||
183 | // information | 183 | // information |
184 | 184 | ||
185 | QString modelString ( ) const; | 185 | QString modelString ( ) const; |
186 | OModel model ( ) const; | 186 | OModel model ( ) const; |
187 | inline OModel series ( ) const { return (OModel) ( model ( ) & Model_Series_Mask ); } | 187 | inline OModel series ( ) const { return (OModel) ( model ( ) & Model_Series_Mask ); } |
188 | 188 | ||
189 | QString vendorString ( ) const; | 189 | QString vendorString ( ) const; |
190 | OVendor vendor ( ) const; | 190 | OVendor vendor ( ) const; |
191 | 191 | ||
192 | QString systemString ( ) const; | 192 | QString systemString ( ) const; |
193 | OSystem system ( ) const; | 193 | OSystem system ( ) const; |
194 | 194 | ||
195 | QString systemVersionString ( ) const; | 195 | QString systemVersionString ( ) const; |
196 | 196 | ||
197 | virtual Transformation rotation ( ) const; | 197 | virtual Transformation rotation ( ) const; |
198 | virtual ODirection direction ( ) const; | 198 | virtual ODirection direction ( ) const; |
199 | 199 | ||
200 | // system | 200 | // system |
201 | 201 | ||
202 | virtual bool setSoftSuspend ( bool on ); | 202 | virtual bool setSoftSuspend ( bool on ); |
203 | virtual bool suspend ( ); | 203 | virtual bool suspend ( ); |
204 | 204 | ||
205 | virtual bool setDisplayStatus ( bool on ); | 205 | virtual bool setDisplayStatus ( bool on ); |
206 | virtual bool setDisplayBrightness ( int brightness ); | 206 | virtual bool setDisplayBrightness ( int brightness ); |
207 | virtual int displayBrightnessResolution ( ) const; | 207 | virtual int displayBrightnessResolution ( ) const; |
208 | virtual bool setDisplayContrast ( int contrast ); | 208 | virtual bool setDisplayContrast ( int contrast ); |
209 | virtual int displayContrastResolution ( ) const; | 209 | virtual int displayContrastResolution ( ) const; |
210 | 210 | ||
211 | // don't add new virtual methods, use this: | 211 | // don't add new virtual methods, use this: |
212 | ///*virtual */ void boo(int i ) { return virtual_hook(1,&i); }; | 212 | ///*virtual */ void boo(int i ) { return virtual_hook(1,&i); }; |
213 | // and in your subclass do do overwrite | 213 | // and in your subclass do do overwrite |
214 | //protected virtual int virtual_hook(int, void *) | 214 | //protected virtual int virtual_hook(int, void *) |
215 | // which is defined below | 215 | // which is defined below |
216 | 216 | ||
217 | // input / output | 217 | // input / output |
218 | //FIXME playAlarmSound and al might be better -zecke | 218 | //FIXME playAlarmSound and al might be better -zecke |
219 | virtual void alarmSound ( ); | 219 | virtual void alarmSound ( ); |
220 | virtual void keySound ( ); | 220 | virtual void keySound ( ); |
221 | virtual void touchSound ( ); | 221 | virtual void touchSound ( ); |
222 | 222 | ||
223 | virtual QValueList <OLed> ledList ( ) const; | 223 | virtual QValueList <OLed> ledList ( ) const; |
224 | virtual QValueList <OLedState> ledStateList ( OLed led ) const; | 224 | virtual QValueList <OLedState> ledStateList ( OLed led ) const; |
225 | virtual OLedState ledState ( OLed led ) const; | 225 | virtual OLedState ledState ( OLed led ) const; |
226 | virtual bool setLedState ( OLed led, OLedState st ); | 226 | virtual bool setLedState ( OLed led, OLedState st ); |
227 | 227 | ||
228 | virtual bool hasLightSensor ( ) const; | 228 | virtual bool hasLightSensor ( ) const; |
229 | virtual int readLightSensor ( ); | 229 | virtual int readLightSensor ( ); |
230 | virtual int lightSensorResolution ( ) const; | 230 | virtual int lightSensorResolution ( ) const; |
231 | 231 | ||
232 | virtual bool hasHingeSensor ( ) const; | 232 | virtual bool hasHingeSensor ( ) const; |
233 | virtual OHingeStatus readHingeSensor ( ); | 233 | virtual OHingeStatus readHingeSensor ( ); |
234 | 234 | ||
235 | const QStrList &allowedCpuFrequencies() const; | 235 | const QStrList &allowedCpuFrequencies() const; |
236 | bool setCurrentCpuFrequency(uint index); | 236 | bool setCurrentCpuFrequency(uint index); |
237 | 237 | ||
238 | /** | 238 | /** |
239 | * Returns the available buttons on this device. The number and location | 239 | * Returns the available buttons on this device. The number and location |
240 | * of buttons will vary depending on the device. Button numbers will be assigned | 240 | * of buttons will vary depending on the device. Button numbers will be assigned |
241 | * by the device manufacturer and will be from most preferred button to least preffered | 241 | * by the device manufacturer and will be from most preferred button to least preffered |
242 | * button. Note that this list only contains "user mappable" buttons. | 242 | * button. Note that this list only contains "user mappable" buttons. |
243 | * | ||
244 | * @todo ### make const | ||
243 | */ | 245 | */ |
244 | const QValueList<ODeviceButton> &buttons ( ) /* ### make const */; | 246 | const QValueList<ODeviceButton> &buttons ( ) /** /todo ### make const */; |
245 | 247 | ||
246 | /** | 248 | /** |
247 | * Returns the DeviceButton for the \a keyCode. If \a keyCode is not found, it | 249 | * Returns the DeviceButton for the \a keyCode. If \a keyCode is not found, it |
248 | * returns 0L | 250 | * returns 0L |
249 | */ | 251 | */ |
250 | const ODeviceButton *buttonForKeycode ( ushort keyCode ); | 252 | const ODeviceButton *buttonForKeycode ( ushort keyCode ); |
251 | 253 | ||
252 | /** | 254 | /** |
253 | * Reassigns the pressed action for \a button. To return to the factory | 255 | * Reassigns the pressed action for \a button. To return to the factory |
254 | * default pass an empty string as \a qcopMessage. | 256 | * default pass an empty string as \a qcopMessage. |
255 | */ | 257 | */ |
256 | void remapPressedAction ( int button, const OQCopMessage &qcopMessage ); | 258 | void remapPressedAction ( int button, const OQCopMessage &qcopMessage ); |
257 | 259 | ||
258 | /** | 260 | /** |
259 | * Reassigns the held action for \a button. To return to the factory | 261 | * Reassigns the held action for \a button. To return to the factory |
260 | * default pass an empty string as \a qcopMessage. | 262 | * default pass an empty string as \a qcopMessage. |
261 | */ | 263 | */ |
262 | void remapHeldAction ( int button, const OQCopMessage &qcopMessage ); | 264 | void remapHeldAction ( int button, const OQCopMessage &qcopMessage ); |
263 | 265 | ||
264 | /** | 266 | /** |
265 | * How long (in ms) you have to press a button for a "hold" action | 267 | * How long (in ms) you have to press a button for a "hold" action |
266 | */ | 268 | */ |
267 | uint buttonHoldTime ( ) const; | 269 | uint buttonHoldTime ( ) const; |
268 | 270 | ||
269 | signals: | 271 | signals: |
270 | void buttonMappingChanged ( ); | 272 | void buttonMappingChanged ( ); |
271 | 273 | ||
272 | private slots: | 274 | private slots: |
273 | void systemMessage ( const QCString &, const QByteArray & ); | 275 | void systemMessage ( const QCString &, const QByteArray & ); |
274 | 276 | ||
275 | protected: | 277 | protected: |
276 | void reloadButtonMapping ( ); | 278 | void reloadButtonMapping ( ); |
277 | /* ugly virtual hook */ | 279 | /* ugly virtual hook */ |
278 | virtual void virtual_hook( int id, void* data ); | 280 | virtual void virtual_hook( int id, void* data ); |
279 | }; | 281 | }; |
280 | 282 | ||
281 | } | 283 | } |
282 | 284 | ||
283 | #endif | 285 | #endif |
284 | 286 | ||