summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/mediaplayer.cpp
Unidiff
Diffstat (limited to 'core/multimedia/opieplayer/mediaplayer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/mediaplayer.cpp38
1 files changed, 35 insertions, 3 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
@@ -42,13 +42,15 @@ extern PlayListWidget *playList;
42extern LoopControl *loopControl; 42extern LoopControl *loopControl;
43extern MediaPlayerState *mediaPlayerState; 43extern MediaPlayerState *mediaPlayerState;
44 44
45 45
46MediaPlayer::MediaPlayer( QObject *parent, const char *name ) 46MediaPlayer::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
50 connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( setPlaying( bool ) ) ); 52 connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( setPlaying( bool ) ) );
51 connect( mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pauseCheck( bool ) ) ); 53 connect( mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pauseCheck( bool ) ) );
52 connect( mediaPlayerState, SIGNAL( next() ), this, SLOT( next() ) ); 54 connect( mediaPlayerState, SIGNAL( next() ), this, SLOT( next() ) );
53 connect( mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) ); 55 connect( mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) );
54 56
@@ -57,14 +59,12 @@ MediaPlayer::MediaPlayer( QObject *parent, const char *name )
57 connect( audioUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) ); 59 connect( audioUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) );
58 connect( audioUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) ); 60 connect( audioUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) );
59} 61}
60 62
61 63
62MediaPlayer::~MediaPlayer() { 64MediaPlayer::~MediaPlayer() {
63 QPEApplication::grabKeyboard();
64 QPEApplication::ungrabKeyboard();
65} 65}
66 66
67 67
68void MediaPlayer::pauseCheck( bool b ) { 68void MediaPlayer::pauseCheck( bool b ) {
69 // Only pause if playing 69 // Only pause if playing
70 if ( b && !mediaPlayerState->playing() ) 70 if ( b && !mediaPlayerState->playing() )
@@ -182,6 +182,38 @@ void MediaPlayer::timerEvent( QTimerEvent * ) {
182 if ( volumeDirection == +1 ) 182 if ( volumeDirection == +1 )
183 AudioDevice::increaseVolume(); 183 AudioDevice::increaseVolume();
184 else if ( volumeDirection == -1 ) 184 else if ( volumeDirection == -1 )
185 AudioDevice::decreaseVolume(); 185 AudioDevice::decreaseVolume();
186} 186}
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}