Diffstat (limited to 'noncore/multimedia/opieplayer2/playlistwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 35 |
1 files changed, 1 insertions, 34 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index 6dcc842..0cfd720 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp | |||
@@ -1,10 +1,8 @@ | |||
1 | 1 | ||
2 | #define QTOPIA_INTERNAL_FSLP | 2 | #define QTOPIA_INTERNAL_FSLP |
3 | #include <qpe/qcopenvelope_qws.h> | ||
4 | |||
5 | #include <qpe/qpemenubar.h> | 3 | #include <qpe/qpemenubar.h> |
6 | #include <qpe/qpetoolbar.h> | 4 | #include <qpe/qpetoolbar.h> |
7 | #include <qpe/fileselector.h> | 5 | #include <qpe/fileselector.h> |
8 | #include <qpe/qpeapplication.h> | 6 | #include <qpe/qpeapplication.h> |
9 | #include <qpe/lnkproperties.h> | 7 | #include <qpe/lnkproperties.h> |
10 | #include <qpe/storage.h> | 8 | #include <qpe/storage.h> |
@@ -42,23 +40,12 @@ | |||
42 | #include "inputDialog.h" | 40 | #include "inputDialog.h" |
43 | 41 | ||
44 | #include <stdlib.h> | 42 | #include <stdlib.h> |
45 | #include "audiowidget.h" | 43 | #include "audiowidget.h" |
46 | #include "videowidget.h" | 44 | #include "videowidget.h" |
47 | 45 | ||
48 | #include <unistd.h> | ||
49 | #include <sys/file.h> | ||
50 | #include <sys/ioctl.h> | ||
51 | #include <sys/soundcard.h> | ||
52 | |||
53 | // for setBacklight() | ||
54 | #include <linux/fb.h> | ||
55 | #include <sys/types.h> | ||
56 | #include <sys/stat.h> | ||
57 | #include <stdlib.h> | ||
58 | |||
59 | #define BUTTONS_ON_TOOLBAR | 46 | #define BUTTONS_ON_TOOLBAR |
60 | #define SIDE_BUTTONS | 47 | #define SIDE_BUTTONS |
61 | #define CAN_SAVE_LOAD_PLAYLISTS | 48 | #define CAN_SAVE_LOAD_PLAYLISTS |
62 | 49 | ||
63 | extern MediaPlayerState *mediaPlayerState; | 50 | extern MediaPlayerState *mediaPlayerState; |
64 | 51 | ||
@@ -1007,13 +994,13 @@ void PlayListWidget::keyReleaseEvent( QKeyEvent *e) | |||
1007 | // if( videoUI->isHidden()) | 994 | // if( videoUI->isHidden()) |
1008 | // videoUI->showMaximized(); | 995 | // videoUI->showMaximized(); |
1009 | break; | 996 | break; |
1010 | case Key_F11: //menu | 997 | case Key_F11: //menu |
1011 | break; | 998 | break; |
1012 | case Key_F12: //home | 999 | case Key_F12: //home |
1013 | // doBlank(); | 1000 | // doBlank(); |
1014 | break; | 1001 | break; |
1015 | case Key_F13: //mail | 1002 | case Key_F13: //mail |
1016 | // doUnblank(); | 1003 | // doUnblank(); |
1017 | break; | 1004 | break; |
1018 | case Key_Q: //add to playlist | 1005 | case Key_Q: //add to playlist |
1019 | qDebug("Add"); | 1006 | qDebug("Add"); |
@@ -1076,33 +1063,13 @@ void PlayListWidget::keyPressEvent( QKeyEvent *) | |||
1076 | // qDebug("Play"); | 1063 | // qDebug("Play"); |
1077 | // playSelected(); | 1064 | // playSelected(); |
1078 | // break; | 1065 | // break; |
1079 | // } | 1066 | // } |
1080 | } | 1067 | } |
1081 | 1068 | ||
1082 | void PlayListWidget::doBlank() { | ||
1083 | qDebug("do blanking"); | ||
1084 | fd=open("/dev/fb0",O_RDWR); | ||
1085 | if (fd != -1) { | ||
1086 | ioctl(fd,FBIOBLANK,1); | ||
1087 | // close(fd); | ||
1088 | } | ||
1089 | } | ||
1090 | 1069 | ||
1091 | void PlayListWidget::doUnblank() { | ||
1092 | // this crashes opieplayer with a segfault | ||
1093 | // int fd; | ||
1094 | // fd=open("/dev/fb0",O_RDWR); | ||
1095 | qDebug("do unblanking"); | ||
1096 | if (fd != -1) { | ||
1097 | ioctl(fd,FBIOBLANK,0); | ||
1098 | close(fd); | ||
1099 | } | ||
1100 | QCopEnvelope h("QPE/System", "setBacklight(int)"); | ||
1101 | h <<-3;// v[1]; // -3 Force on | ||
1102 | } | ||
1103 | 1070 | ||
1104 | void PlayListWidget::readm3u(const QString &filename) { | 1071 | void PlayListWidget::readm3u(const QString &filename) { |
1105 | 1072 | ||
1106 | qDebug("m3u filename is "+filename); | 1073 | qDebug("m3u filename is "+filename); |
1107 | QFile f(filename); | 1074 | QFile f(filename); |
1108 | 1075 | ||