author | zecke <zecke> | 2003-10-07 13:01:51 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-10-07 13:01:51 (UTC) |
commit | d72a9cfe61cbc0910373e4604220021ebbcedaeb (patch) (unidiff) | |
tree | 285eb69e028889fe8d9af57d5db5cd4304509a32 | |
parent | 62d81aa76146401087e3ec9dcebd298a7d030c4a (diff) | |
download | opie-d72a9cfe61cbc0910373e4604220021ebbcedaeb.zip opie-d72a9cfe61cbc0910373e4604220021ebbcedaeb.tar.gz opie-d72a9cfe61cbc0910373e4604220021ebbcedaeb.tar.bz2 |
Add a FIXME to the MediaPlayer::blank method
why don't we use ODevice::inst()->setDisplayStatus() ?
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp index 9f51006..4c9afca 100644 --- a/noncore/multimedia/opieplayer2/mediaplayer.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp | |||
@@ -238,96 +238,97 @@ void MediaPlayer::timerEvent( QTimerEvent * ) { | |||
238 | p.setBrush( QColor( 0x10, 0xD0, 0x10 ) ); | 238 | p.setBrush( QColor( 0x10, 0xD0, 0x10 ) ); |
239 | 239 | ||
240 | QFont f; | 240 | QFont f; |
241 | f.setPixelSize( 20 ); | 241 | f.setPixelSize( 20 ); |
242 | f.setBold( TRUE ); | 242 | f.setBold( TRUE ); |
243 | p.setFont( f ); | 243 | p.setFont( f ); |
244 | p.drawText( (w - 200) / 2, h - yoff + 20, tr("Volume") ); | 244 | p.drawText( (w - 200) / 2, h - yoff + 20, tr("Volume") ); |
245 | 245 | ||
246 | for ( unsigned int i = 0; i < 10; i++ ) { | 246 | for ( unsigned int i = 0; i < 10; i++ ) { |
247 | if ( v > i ) { | 247 | if ( v > i ) { |
248 | p.drawRect( ( w - 200 ) / 2 + i * 20 + 0, h - yoff + 40, 9, 30 ); | 248 | p.drawRect( ( w - 200 ) / 2 + i * 20 + 0, h - yoff + 40, 9, 30 ); |
249 | } else { | 249 | } else { |
250 | p.drawRect( ( w - 200 ) / 2 + i * 20 + 3, h - yoff + 50, 3, 10 ); | 250 | p.drawRect( ( w - 200 ) / 2 + i * 20 + 3, h - yoff + 50, 3, 10 ); |
251 | } | 251 | } |
252 | } | 252 | } |
253 | } else { | 253 | } else { |
254 | w = videoUI()->width(); | 254 | w = videoUI()->width(); |
255 | h = videoUI()->height(); | 255 | h = videoUI()->height(); |
256 | 256 | ||
257 | if ( drawnOnScreenDisplay ) { | 257 | if ( drawnOnScreenDisplay ) { |
258 | if ( onScreenDisplayVolume > v ) { | 258 | if ( onScreenDisplayVolume > v ) { |
259 | videoUI()->repaint( (w - 200) / 2 + v * 20 + 0, h - yoff + 40, ( onScreenDisplayVolume - v ) * 20 + 9, 30, FALSE ); | 259 | videoUI()->repaint( (w - 200) / 2 + v * 20 + 0, h - yoff + 40, ( onScreenDisplayVolume - v ) * 20 + 9, 30, FALSE ); |
260 | } | 260 | } |
261 | } | 261 | } |
262 | drawnOnScreenDisplay = TRUE; | 262 | drawnOnScreenDisplay = TRUE; |
263 | onScreenDisplayVolume = v; | 263 | onScreenDisplayVolume = v; |
264 | QPainter p( videoUI() ); | 264 | QPainter p( videoUI() ); |
265 | p.setPen( QColor( 0x10, 0xD0, 0x10 ) ); | 265 | p.setPen( QColor( 0x10, 0xD0, 0x10 ) ); |
266 | p.setBrush( QColor( 0x10, 0xD0, 0x10 ) ); | 266 | p.setBrush( QColor( 0x10, 0xD0, 0x10 ) ); |
267 | 267 | ||
268 | QFont f; | 268 | QFont f; |
269 | f.setPixelSize( 20 ); | 269 | f.setPixelSize( 20 ); |
270 | f.setBold( TRUE ); | 270 | f.setBold( TRUE ); |
271 | p.setFont( f ); | 271 | p.setFont( f ); |
272 | p.drawText( (w - 200) / 2, h - yoff + 20, tr( "Volume" ) ); | 272 | p.drawText( (w - 200) / 2, h - yoff + 20, tr( "Volume" ) ); |
273 | 273 | ||
274 | for ( unsigned int i = 0; i < 10; i++ ) { | 274 | for ( unsigned int i = 0; i < 10; i++ ) { |
275 | if ( v > i ) { | 275 | if ( v > i ) { |
276 | p.drawRect( (w - 200) / 2 + i * 20 + 0, h - yoff + 40, 9, 30 ); | 276 | p.drawRect( (w - 200) / 2 + i * 20 + 0, h - yoff + 40, 9, 30 ); |
277 | } else { | 277 | } else { |
278 | p.drawRect( (w - 200) / 2 + i * 20 + 3, h - yoff + 50, 3, 10 ); | 278 | p.drawRect( (w - 200) / 2 + i * 20 + 3, h - yoff + 50, 3, 10 ); |
279 | } | 279 | } |
280 | } | 280 | } |
281 | } | 281 | } |
282 | } | 282 | } |
283 | 283 | ||
284 | 284 | ||
285 | void MediaPlayer::blank( bool b ) { | 285 | void MediaPlayer::blank( bool b ) { |
286 | // ### FIXME use ODevice::inst()->setDisplayStatus( b ); | ||
286 | fd=open("/dev/fb0",O_RDWR); | 287 | fd=open("/dev/fb0",O_RDWR); |
287 | #ifdef QT_QWS_SL5XXX | 288 | #ifdef QT_QWS_SL5XXX |
288 | fl= open( "/dev/fl", O_RDWR ); | 289 | fl= open( "/dev/fl", O_RDWR ); |
289 | #endif | 290 | #endif |
290 | if (fd != -1) { | 291 | if (fd != -1) { |
291 | if ( b ) { | 292 | if ( b ) { |
292 | qDebug("do blanking"); | 293 | qDebug("do blanking"); |
293 | #ifdef QT_QWS_SL5XXX | 294 | #ifdef QT_QWS_SL5XXX |
294 | ioctl( fd, FBIOBLANK, 1 ); | 295 | ioctl( fd, FBIOBLANK, 1 ); |
295 | if(fl !=-1) { | 296 | if(fl !=-1) { |
296 | ioctl( fl, 2 ); | 297 | ioctl( fl, 2 ); |
297 | ::close(fl); | 298 | ::close(fl); |
298 | } | 299 | } |
299 | #else | 300 | #else |
300 | ioctl( fd, FBIOBLANK, 3 ); | 301 | ioctl( fd, FBIOBLANK, 3 ); |
301 | #endif | 302 | #endif |
302 | isBlanked = TRUE; | 303 | isBlanked = TRUE; |
303 | } else { | 304 | } else { |
304 | qDebug("do unblanking"); | 305 | qDebug("do unblanking"); |
305 | ioctl( fd, FBIOBLANK, 0); | 306 | ioctl( fd, FBIOBLANK, 0); |
306 | #ifdef QT_QWS_SL5XXX | 307 | #ifdef QT_QWS_SL5XXX |
307 | if(fl != -1) { | 308 | if(fl != -1) { |
308 | ioctl( fl, 1); | 309 | ioctl( fl, 1); |
309 | ::close(fl); | 310 | ::close(fl); |
310 | } | 311 | } |
311 | #endif | 312 | #endif |
312 | isBlanked = FALSE; | 313 | isBlanked = FALSE; |
313 | } | 314 | } |
314 | close( fd ); | 315 | close( fd ); |
315 | } else { | 316 | } else { |
316 | qDebug("<< /dev/fb0 could not be opened >>"); | 317 | qDebug("<< /dev/fb0 could not be opened >>"); |
317 | } | 318 | } |
318 | } | 319 | } |
319 | 320 | ||
320 | void MediaPlayer::keyReleaseEvent( QKeyEvent *e) { | 321 | void MediaPlayer::keyReleaseEvent( QKeyEvent *e) { |
321 | switch ( e->key() ) { | 322 | switch ( e->key() ) { |
322 | ////////////////////////////// Zaurus keys | 323 | ////////////////////////////// Zaurus keys |
323 | case Key_Home: | 324 | case Key_Home: |
324 | break; | 325 | break; |
325 | case Key_F9: //activity | 326 | case Key_F9: //activity |
326 | break; | 327 | break; |
327 | case Key_F10: //contacts | 328 | case Key_F10: //contacts |
328 | break; | 329 | break; |
329 | case Key_F11: //menu | 330 | case Key_F11: //menu |
330 | break; | 331 | break; |
331 | case Key_F12: //home | 332 | case Key_F12: //home |
332 | qDebug("Blank here"); | 333 | qDebug("Blank here"); |
333 | // mediaPlayerState->toggleBlank(); | 334 | // mediaPlayerState->toggleBlank(); |