author | harlekin <harlekin> | 2002-08-16 13:39:04 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-08-16 13:39:04 (UTC) |
commit | 10006a500ed73c7640572b05d9b403e5739bfa0c (patch) (unidiff) | |
tree | 870535988a6f603e9087e770778503d94baabfd6 /noncore/multimedia/opieplayer2/mediaplayer.cpp | |
parent | 5144bf5607a246441f5b37dd0bbb9564017ce017 (diff) | |
download | opie-10006a500ed73c7640572b05d9b403e5739bfa0c.zip opie-10006a500ed73c7640572b05d9b403e5739bfa0c.tar.gz opie-10006a500ed73c7640572b05d9b403e5739bfa0c.tar.bz2 |
playing arround with blank
Diffstat (limited to 'noncore/multimedia/opieplayer2/mediaplayer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.cpp | 49 |
1 files changed, 30 insertions, 19 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp index 8dadf96..858b51f 100644 --- a/noncore/multimedia/opieplayer2/mediaplayer.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp | |||
@@ -4,2 +4,3 @@ | |||
4 | #include <qpe/config.h> | 4 | #include <qpe/config.h> |
5 | #include <qpe/qcopenvelope_qws.h> | ||
5 | 6 | ||
@@ -18,2 +19,6 @@ | |||
18 | 19 | ||
20 | // for setBacklight() | ||
21 | #include <linux/fb.h> | ||
22 | #include <sys/file.h> | ||
23 | #include <sys/ioctl.h> | ||
19 | 24 | ||
@@ -30,3 +35,3 @@ MediaPlayer::MediaPlayer( QObject *parent, const char *name ) | |||
30 | 35 | ||
31 | xineControl = new XineControl(); | 36 | // xineControl = new XineControl(); |
32 | // QPEApplication::grabKeyboard(); // EVIL | 37 | // QPEApplication::grabKeyboard(); // EVIL |
@@ -40,2 +45,3 @@ MediaPlayer::MediaPlayer( QObject *parent, const char *name ) | |||
40 | connect( mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) ); | 45 | connect( mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) ); |
46 | connect( mediaPlayerState, SIGNAL( blankToggled( bool ) ), this, SLOT ( blank( bool ) ) ); | ||
41 | 47 | ||
@@ -52,3 +58,3 @@ MediaPlayer::MediaPlayer( QObject *parent, const char *name ) | |||
52 | volControl = new VolumeControl; | 58 | volControl = new VolumeControl; |
53 | 59 | xineControl = new XineControl(); | |
54 | } | 60 | } |
@@ -73,3 +79,2 @@ void MediaPlayer::setPlaying( bool play ) { | |||
73 | if ( !play ) { | 79 | if ( !play ) { |
74 | // mediaPlayerState->setPaused( FALSE ); | ||
75 | return; | 80 | return; |
@@ -100,8 +105,2 @@ void MediaPlayer::setPlaying( bool play ) { | |||
100 | 105 | ||
101 | // QString fileInfo = mediaPlayerState->curDecoder()->fileInfo(); | ||
102 | |||
103 | // if ( !fileInfo.isEmpty() ) | ||
104 | // tickerText += ", " + fileInfo; | ||
105 | // audioUI->setTickerText( tickerText + "." ); | ||
106 | |||
107 | audioUI->setTickerText( currentFile->file( ) ); | 106 | audioUI->setTickerText( currentFile->file( ) ); |
@@ -251,2 +250,20 @@ void MediaPlayer::timerEvent( QTimerEvent * ) { | |||
251 | 250 | ||
251 | |||
252 | void MediaPlayer::blank( bool b ) { | ||
253 | fd=open("/dev/fb0",O_RDWR); | ||
254 | if (fd != -1) { | ||
255 | |||
256 | if ( !b ) { | ||
257 | qDebug("do blanking"); | ||
258 | ioctl( fd, FBIOBLANK, 3 ); | ||
259 | isBlanked = TRUE; | ||
260 | } else { | ||
261 | qDebug("do unblanking"); | ||
262 | ioctl( fd, FBIOBLANK, 0); | ||
263 | isBlanked = FALSE; | ||
264 | } | ||
265 | close( fd ); | ||
266 | } | ||
267 | } | ||
268 | |||
252 | void MediaPlayer::keyReleaseEvent( QKeyEvent *e) { | 269 | void MediaPlayer::keyReleaseEvent( QKeyEvent *e) { |
@@ -264,5 +281,8 @@ void MediaPlayer::keyReleaseEvent( QKeyEvent *e) { | |||
264 | qDebug("Blank here"); | 281 | qDebug("Blank here"); |
282 | // mediaPlayerState->toggleBlank(); | ||
265 | break; | 283 | break; |
266 | case Key_F13: //mail | 284 | case Key_F13: //mail |
267 | break; | 285 | qDebug("Blank here"); |
286 | // mediaPlayerState->toggleBlank(); | ||
287 | break; | ||
268 | } | 288 | } |
@@ -270,10 +290,2 @@ void MediaPlayer::keyReleaseEvent( QKeyEvent *e) { | |||
270 | 290 | ||
271 | void MediaPlayer::doBlank() { | ||
272 | |||
273 | } | ||
274 | |||
275 | void MediaPlayer::doUnblank() { | ||
276 | |||
277 | } | ||
278 | |||
279 | void MediaPlayer::cleanUp() { | 291 | void MediaPlayer::cleanUp() { |
@@ -281,3 +293,2 @@ void MediaPlayer::cleanUp() { | |||
281 | // QPEApplication::ungrabKeyboard(); | 293 | // QPEApplication::ungrabKeyboard(); |
282 | |||
283 | } | 294 | } |