summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/mediaplayer.cpp
Side-by-side diff
Diffstat (limited to 'noncore/multimedia/opieplayer2/mediaplayer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayer.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp
index 0f8242b..6a48b82 100644
--- a/noncore/multimedia/opieplayer2/mediaplayer.cpp
+++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp
@@ -25,48 +25,51 @@
extern AudioWidget *audioUI;
extern VideoWidget *videoUI;
extern PlayListWidget *playList;
extern MediaPlayerState *mediaPlayerState;
#define FBIOBLANK 0x4611
MediaPlayer::MediaPlayer( QObject *parent, const char *name )
: QObject( parent, name ), volumeDirection( 0 ), currentFile( NULL ) {
+ playList->setCaption(tr("OpiePlayer: Initializating"));
+
qApp->processEvents();
// QPEApplication::grabKeyboard(); // EVIL
connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( setPlaying( bool ) ) );
connect( mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pauseCheck( bool ) ) );
connect( mediaPlayerState, SIGNAL( next() ), this, SLOT( next() ) );
connect( mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) );
connect( mediaPlayerState, SIGNAL( blankToggled( bool ) ), this, SLOT ( blank( bool ) ) );
connect( audioUI, SIGNAL( moreClicked() ), this, SLOT( startIncreasingVolume() ) );
connect( audioUI, SIGNAL( lessClicked() ), this, SLOT( startDecreasingVolume() ) );
connect( audioUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) );
connect( audioUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) );
connect( videoUI, SIGNAL( moreClicked() ), this, SLOT( startIncreasingVolume() ) );
connect( videoUI, SIGNAL( lessClicked() ), this, SLOT( startDecreasingVolume() ) );
connect( videoUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) );
connect( videoUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) );
volControl = new VolumeControl;
xineControl = new XineControl();
+ playList->setCaption(tr("OpiePlayer"));
}
MediaPlayer::~MediaPlayer() {
delete xineControl;
delete volControl;
}
void MediaPlayer::pauseCheck( bool b ) {
if ( b && !mediaPlayerState->playing() ) {
mediaPlayerState->setPaused( FALSE );
}
}
@@ -254,25 +257,25 @@ void MediaPlayer::blank( bool b ) {
if (fd != -1) {
if ( b ) {
qDebug("do blanking");
ioctl( fd, FBIOBLANK, 3 );
isBlanked = TRUE;
} else {
qDebug("do unblanking");
ioctl( fd, FBIOBLANK, 0);
isBlanked = FALSE;
}
close( fd );
} else {
- qDebug("<< /dev/fb0 could not be opend >>");
+ qDebug("<< /dev/fb0 could not be opened >>");
}
}
void MediaPlayer::keyReleaseEvent( QKeyEvent *e) {
switch ( e->key() ) {
////////////////////////////// Zaurus keys
case Key_Home:
break;
case Key_F9: //activity
break;
case Key_F10: //contacts
break;
@@ -280,16 +283,17 @@ void MediaPlayer::keyReleaseEvent( QKeyEvent *e) {
break;
case Key_F12: //home
qDebug("Blank here");
// mediaPlayerState->toggleBlank();
break;
case Key_F13: //mail
qDebug("Blank here");
// mediaPlayerState->toggleBlank();
break;
}
}
-void MediaPlayer::cleanUp() {
+void MediaPlayer::cleanUp() {// this happens on closing
+
// QPEApplication::grabKeyboard();
// QPEApplication::ungrabKeyboard();
}