summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/mediaplayer.cpp38
-rw-r--r--core/multimedia/opieplayer/mediaplayer.h6
-rw-r--r--core/multimedia/opieplayer/playlistwidget.cpp51
-rw-r--r--core/multimedia/opieplayer/playlistwidget.h4
-rw-r--r--core/multimedia/opieplayer/videowidget.cpp2
5 files changed, 90 insertions, 11 deletions
diff --git a/core/multimedia/opieplayer/mediaplayer.cpp b/core/multimedia/opieplayer/mediaplayer.cpp
index ab46a7d..b9e438b 100644
--- a/core/multimedia/opieplayer/mediaplayer.cpp
+++ b/core/multimedia/opieplayer/mediaplayer.cpp
@@ -47,3 +47,5 @@ MediaPlayer::MediaPlayer( QObject *parent, const char *name )
47 : QObject( parent, name ), volumeDirection( 0 ), currentFile( NULL ) { 47 : QObject( parent, name ), volumeDirection( 0 ), currentFile( NULL ) {
48 QPEApplication::grabKeyboard(); 48
49// QPEApplication::grabKeyboard();
50 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
49 51
@@ -62,4 +64,2 @@ MediaPlayer::MediaPlayer( QObject *parent, const char *name )
62MediaPlayer::~MediaPlayer() { 64MediaPlayer::~MediaPlayer() {
63 QPEApplication::grabKeyboard();
64 QPEApplication::ungrabKeyboard();
65} 65}
@@ -187 +187,33 @@ void MediaPlayer::timerEvent( QTimerEvent * ) {
187 187
188void MediaPlayer::keyReleaseEvent( QKeyEvent *e) {
189 switch ( e->key() ) {
190////////////////////////////// Zaurus keys
191 case Key_Home:
192 break;
193 case Key_F9: //activity
194 break;
195 case Key_F10: //contacts
196 break;
197 case Key_F11: //menu
198 break;
199 case Key_F12: //home
200 qDebug("Blank here");
201 break;
202 case Key_F13: //mail
203 break;
204 }
205}
206
207void MediaPlayer::doBlank() {
208
209}
210
211void MediaPlayer::doUnblank() {
212
213}
214
215void MediaPlayer::cleanUp() {
216// QPEApplication::grabKeyboard();
217// QPEApplication::ungrabKeyboard();
218
219}
diff --git a/core/multimedia/opieplayer/mediaplayer.h b/core/multimedia/opieplayer/mediaplayer.h
index 0354d21..cf9daea 100644
--- a/core/multimedia/opieplayer/mediaplayer.h
+++ b/core/multimedia/opieplayer/mediaplayer.h
@@ -49,4 +49,6 @@ protected:
49 void timerEvent( QTimerEvent *e ); 49 void timerEvent( QTimerEvent *e );
50// void keyReleaseEvent( QKeyEvent *e); 50 void keyReleaseEvent( QKeyEvent *e);
51 51 void doBlank();
52 void doUnblank();
53 void cleanUp();
52private: 54private:
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp
index faa6e3f..70b7cef 100644
--- a/core/multimedia/opieplayer/playlistwidget.cpp
+++ b/core/multimedia/opieplayer/playlistwidget.cpp
@@ -21,2 +21,3 @@
21#define QTOPIA_INTERNAL_FSLP 21#define QTOPIA_INTERNAL_FSLP
22#include <qpe/qcopenvelope_qws.h>
22 23
@@ -64,2 +65,13 @@
64 65
66#include <unistd.h>
67#include <sys/file.h>
68#include <sys/ioctl.h>
69#include <sys/soundcard.h>
70
71// for setBacklight()
72#include <linux/fb.h>
73#include <sys/types.h>
74#include <sys/stat.h>
75#include <stdlib.h>
76
65#define BUTTONS_ON_TOOLBAR 77#define BUTTONS_ON_TOOLBAR
@@ -1055,9 +1067,16 @@ void PlayListWidget::keyReleaseEvent( QKeyEvent *e)
1055 case Key_F9: //activity 1067 case Key_F9: //activity
1056 if(audioUI->isHidden()) 1068// if(audioUI->isHidden())
1057 audioUI->showMaximized(); 1069// audioUI->showMaximized();
1058 break; 1070 break;
1059 case Key_F10: //contacts 1071 case Key_F10: //contacts
1060 if( videoUI->isHidden()) 1072// if( videoUI->isHidden())
1061 videoUI->showMaximized(); 1073// videoUI->showMaximized();
1062 1074 break;
1075 case Key_F11: //menu
1076 break;
1077 case Key_F12: //home
1078// doBlank();
1079 break;
1080 case Key_F13: //mail
1081// doUnblank();
1063 break; 1082 break;
@@ -1066 +1085,23 @@ void PlayListWidget::keyReleaseEvent( QKeyEvent *e)
1066} 1085}
1086
1087void PlayListWidget::doBlank() {
1088 qDebug("do blanking");
1089 fd=open("/dev/fb0",O_RDWR);
1090 if (fd != -1) {
1091 ioctl(fd,FBIOBLANK,1);
1092// close(fd);
1093 }
1094}
1095
1096void PlayListWidget::doUnblank() {
1097 // this crashes opieplayer with a segfault
1098// int fd;
1099// fd=open("/dev/fb0",O_RDWR);
1100 qDebug("do unblanking");
1101 if (fd != -1) {
1102 ioctl(fd,FBIOBLANK,0);
1103 close(fd);
1104 }
1105 QCopEnvelope h("QPE/System", "setBacklight(int)");
1106 h <<-3;// v[1]; // -3 Force on
1107}
diff --git a/core/multimedia/opieplayer/playlistwidget.h b/core/multimedia/opieplayer/playlistwidget.h
index 16b9905..f22770f 100644
--- a/core/multimedia/opieplayer/playlistwidget.h
+++ b/core/multimedia/opieplayer/playlistwidget.h
@@ -59,2 +59,3 @@ public:
59 QPushButton *tbDeletePlaylist; 59 QPushButton *tbDeletePlaylist;
60 int fd;
60public slots: 61public slots:
@@ -71,2 +72,5 @@ void keyReleaseEvent( QKeyEvent *e);
71private: 72private:
73 void doBlank();
74 void doUnblank();
75
72 void initializeStates(); 76 void initializeStates();
diff --git a/core/multimedia/opieplayer/videowidget.cpp b/core/multimedia/opieplayer/videowidget.cpp
index d0cb764..3bce996 100644
--- a/core/multimedia/opieplayer/videowidget.cpp
+++ b/core/multimedia/opieplayer/videowidget.cpp
@@ -434,3 +434,3 @@ void VideoWidget::keyReleaseEvent( QKeyEvent *e)
434 case Key_F10: //contacts 434 case Key_F10: //contacts
435 hide(); 435// hide();
436 break; 436 break;