summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp7
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp6
2 files changed, 9 insertions, 4 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp
index 446fa45..7c49733 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.cpp
+++ b/noncore/multimedia/opieplayer2/audiowidget.cpp
@@ -38,26 +38,28 @@
#include <qwidget.h>
#include <qpixmap.h>
#include <qbutton.h>
#include <qpainter.h>
#include <qframe.h>
#include <qlayout.h>
#include <stdlib.h>
#include <stdio.h>
#include "audiowidget.h"
#include "mediaplayerstate.h"
+#include "playlistwidget.h"
extern MediaPlayerState *mediaPlayerState;
+extern PlayListWidget *playList;
static const int xo = -2; // movable x offset
static const int yo = 22; // movable y offset
Ticker::Ticker( QWidget* parent=0 ) : QFrame( parent ) {
setFrameStyle( WinPanel | Sunken );
setText( "No Song" );
}
Ticker::~Ticker() {
}
@@ -216,24 +218,25 @@ AudioWidget::~AudioWidget() {
for ( int i = 0; i < 10; i++ ) {
delete buttonPixUp[i];
delete buttonPixDown[i];
}
delete pixBg;
delete imgUp;
delete imgDn;
delete imgButtonMask;
for ( int i = 0; i < 10; i++ ) {
delete masks[i];
}
+// mediaPlayerState->setPlaying(false);
}
namespace {
QPixmap *combineImageWithBackground( QImage img, QPixmap bg, QPoint offset ) {
QPixmap pix( img.width(), img.height() );
QPainter p( &pix );
p.drawTiledPixmap( pix.rect(), bg, offset );
p.drawImage( 0, 0, img );
return new QPixmap( pix );
}
@@ -460,26 +463,26 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) {
// setToggleButton( i, FALSE );
mediaPlayerState->setPaused( FALSE );
return;
} else if( !mediaPlayerState->isPaused ) {
// setToggleButton( i, TRUE );
mediaPlayerState->setPaused( TRUE );
return;
} else {
// setToggleButton( i, TRUE );
// mediaPlayerState->setPlaying( videoButtons[i].isDown );
}
case AudioStop: mediaPlayerState->setPlaying(FALSE); return;
- case AudioNext: mediaPlayerState->setNext(); return;
- case AudioPrevious: mediaPlayerState->setPrev(); return;
+ case AudioNext: if(playList->whichList() ==0) mediaPlayerState->setNext(); return;
+ case AudioPrevious: if(playList->whichList() ==0) mediaPlayerState->setPrev(); return;
case AudioLoop: mediaPlayerState->setLooping(audioButtons[i].isDown); return;
case AudioVolumeUp: emit moreReleased(); return;
case AudioVolumeDown: emit lessReleased(); return;
case AudioPlayList: mediaPlayerState->setList(); return;
case AudioForward: emit forwardReleased(); return;
case AudioBack: emit backReleased(); return;
}
}
}
}
}
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index ffda2e4..8e3a365 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -35,34 +35,36 @@
#include <qpe/resource.h>
#include <qpe/mediaplayerplugininterface.h>
#include <qpe/config.h>
#include <qwidget.h>
#include <qpainter.h>
#include <qpixmap.h>
#include <qslider.h>
#include <qdrawutil.h>
#include "videowidget.h"
#include "mediaplayerstate.h"
+#include "playlistwidget.h"
#ifdef Q_WS_QWS
# define USE_DIRECT_PAINTER
# include <qdirectpainter_qws.h>
# include <qgfxraster_qws.h>
#endif
extern MediaPlayerState *mediaPlayerState;
+extern PlayListWidget *playList;
static const int xo = 2; // movable x offset
static const int yo = 0; // movable y offset
struct MediaButton {
bool isToggle, isHeld, isDown;
};
MediaButton videoButtons[] = {
{ FALSE, FALSE, FALSE }, // stop
@@ -329,26 +331,26 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) {
mediaPlayerState->setPaused( FALSE );
return;
} else if( !mediaPlayerState->isPaused ) {
setToggleButton( i, TRUE );
mediaPlayerState->setPaused( TRUE );
return;
} else {
return;
}
}
case VideoStop: mediaPlayerState->setPlaying( FALSE ); return;
- case VideoNext: mediaPlayerState->setNext(); return;
- case VideoPrevious: mediaPlayerState->setPrev(); return;
+ case VideoNext: if(playList->whichList() ==0) mediaPlayerState->setNext(); return;
+ case VideoPrevious: if(playList->whichList() ==0) mediaPlayerState->setPrev(); return;
case VideoVolUp: emit moreReleased(); return;
case VideoVolDown: emit lessReleased(); return;
case VideoFullscreen: mediaPlayerState->setFullscreen( TRUE ); makeVisible(); return;
}
}
}
}
}
void VideoWidget::mousePressEvent( QMouseEvent *event ) {
mouseMoveEvent( event );
}