summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/mediaplayer.cpp
Side-by-side diff
Diffstat (limited to 'core/multimedia/opieplayer/mediaplayer.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/multimedia/opieplayer/mediaplayer.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/core/multimedia/opieplayer/mediaplayer.cpp b/core/multimedia/opieplayer/mediaplayer.cpp
index 6c743ec..15f6928 100644
--- a/core/multimedia/opieplayer/mediaplayer.cpp
+++ b/core/multimedia/opieplayer/mediaplayer.cpp
@@ -10,34 +10,36 @@
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
-#include <qmessagebox.h>
-
#include "mediaplayer.h"
#include "playlistwidget.h"
#include "audiowidget.h"
#include "loopcontrol.h"
#include "audiodevice.h"
-
#include "mediaplayerstate.h"
+/* OPIE */
+#include <opie2/odebug.h>
+
+/* QT */
+#include <qmessagebox.h>
extern AudioWidget *audioUI;
extern PlayListWidget *playList;
extern LoopControl *loopControl;
extern MediaPlayerState *mediaPlayerState;
MediaPlayer::MediaPlayer( QObject *parent, const char *name )
: QObject( parent, name ), volumeDirection( 0 ), currentFile( NULL ) {
// QPEApplication::grabKeyboard();
connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
@@ -64,36 +66,36 @@ void MediaPlayer::pauseCheck( bool b ) {
if ( b && !mediaPlayerState->playing() )
mediaPlayerState->setPaused( FALSE );
}
void MediaPlayer::play() {
mediaPlayerState->setPlaying( FALSE );
mediaPlayerState->setPlaying( TRUE );
}
void MediaPlayer::setPlaying( bool play ) {
- // qDebug("MediaPlayer setPlaying %d", play);
+ // odebug << "MediaPlayer setPlaying " << play << "" << oendl;
if ( !play ) {
mediaPlayerState->setPaused( FALSE );
loopControl->stop( FALSE );
return;
}
if ( mediaPlayerState->paused() ) {
mediaPlayerState->setPaused( FALSE );
return;
}
- // qDebug("about to ctrash");
+ // odebug << "about to ctrash" << oendl;
const DocLnk *playListCurrent = playList->current();
if ( playListCurrent != NULL ) {
loopControl->stop( TRUE );
currentFile = playListCurrent;
}
if ( currentFile == NULL ) {
QMessageBox::critical( 0, tr( "No file"), tr( "Error: There is no file selected" ) );
mediaPlayerState->setPlaying( FALSE );
return;
}
@@ -182,37 +184,37 @@ void MediaPlayer::stopChangingVolume() {
killTimers();
// Get rid of the on-screen display stuff
drawnOnScreenDisplay = FALSE;
onScreenDisplayVolume = 0;
int w = audioUI->width();
int h = audioUI->height();
audioUI->repaint( (w - 200) / 2, h - yoff, 200 + 9, 70, FALSE );
}
void MediaPlayer::timerEvent( QTimerEvent * ) {
-// qDebug("timer");
+// odebug << "timer" << oendl;
if ( volumeDirection == +1 )
AudioDevice::increaseVolume();
else if ( volumeDirection == -1 )
AudioDevice::decreaseVolume();
// Display an on-screen display volume
unsigned int l, r, v; bool m;
AudioDevice::getVolume( l, r, m );
v = ((l + r) * 11) / (2*0xFFFF);
if ( drawnOnScreenDisplay && onScreenDisplayVolume == v ) {
-// qDebug("returning %d, %d, %d, %d", v, l, r, m);
+// odebug << "returning " << v << ", " << l << ", " << r << ", " << m << "" << oendl;
return;
}
int w = audioUI->width();
int h = audioUI->height();
if ( drawnOnScreenDisplay ) {
if ( onScreenDisplayVolume > v )
audioUI->repaint( (w - 200) / 2 + v * 20 + 0, h - yoff + 40,
(onScreenDisplayVolume - v) * 20 + 9, 30, FALSE );
}
@@ -240,25 +242,25 @@ void MediaPlayer::timerEvent( QTimerEvent * ) {
void MediaPlayer::keyReleaseEvent( QKeyEvent *e) {
switch ( e->key() ) {
////////////////////////////// Zaurus keys
case Key_Home:
break;
case Key_F9: //activity
break;
case Key_F10: //contacts
break;
case Key_F11: //menu
break;
case Key_F12: //home
- // qDebug("Blank here");
+ // odebug << "Blank here" << oendl;
break;
case Key_F13: //mail
break;
}
}
void MediaPlayer::doBlank() {
}
void MediaPlayer::doUnblank() {