summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp2
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp38
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.h1
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.cpp1
4 files changed, 26 insertions, 16 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp
index 689366e..300a5c8 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.cpp
+++ b/noncore/multimedia/opieplayer2/audiowidget.cpp
@@ -160,9 +160,9 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) );
connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) );
connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( setPaused(bool) ) );
connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) );
-
+
// Intialise state
setLength( mediaPlayerState->length() );
setPosition( mediaPlayerState->position() );
setLooping( mediaPlayerState->fullscreen() );
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index bce6b89..48caf00 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -85,14 +85,19 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) :
setCaption( tr("OpiePlayer - Video") );
Config cfg("OpiePlayer");
cfg.setGroup("VideoWidget");
- QString backgroundPix, Button0aPix, Button0bPix, controlsPix;
- backgroundPix=cfg.readEntry( "backgroundPix", "opieplayer/metalFinish");
+ QString Button0aPix, Button0bPix, controlsPix;
+ //backgroundPix=cfg.readEntry( "backgroundPix", "opieplayer/metalFinish");
Button0aPix=cfg.readEntry( "Button0aPix", "opieplayer/mediaButton0a");
Button0bPix=cfg.readEntry( "Button0bPix","opieplayer/mediaButton0b");
controlsPix=cfg.readEntry( "controlsPix","opieplayer/mediaControls0" );
+ cfg.setGroup("AudioWidget");
+ QString skin = cfg.readEntry("Skin","default");
+ QString skinPath = "opieplayer/skins/" + skin;
+ backgroundPix = QString("%1/background").arg(skinPath) ;
+
setBackgroundPixmap( Resource::loadPixmap( backgroundPix) );
pixmaps[0] = new QPixmap( Resource::loadPixmap( Button0aPix ) );
pixmaps[1] = new QPixmap( Resource::loadPixmap( Button0bPix ) );
pixmaps[2] = new QPixmap( Resource::loadPixmap( controlsPix) );
@@ -122,9 +127,9 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) :
setPaused( mediaPlayerState->paused() );
setPlaying( mediaPlayerState->playing() );
videoFrame = new XineVideoWidget( 240, 155 ,this, "Video frame" );
- videoFrame->setGeometry( QRect( 0, 15 , 240 ,170 ) );
+
}
VideoWidget::~VideoWidget() {
@@ -268,19 +273,19 @@ void VideoWidget::mouseReleaseEvent( QMouseEvent *event ) {
}
void VideoWidget::makeVisible() {
- if ( mediaPlayerState->fullscreen() ) {
- setBackgroundMode( QWidget::NoBackground );
- showFullScreen();
- resize( qApp->desktop()->size() );
- slider->hide();
- } else {
- setBackgroundPixmap( Resource::loadPixmap( "opieplayer/metalFinish" ) );
- showNormal();
- showMaximized();
- slider->show();
- }
+ if ( mediaPlayerState->fullscreen() ) {
+ setBackgroundMode( QWidget::NoBackground );
+ showFullScreen();
+ resize( qApp->desktop()->size() );
+ slider->hide();
+ } else {
+ setBackgroundPixmap( Resource::loadPixmap( backgroundPix ) );
+ showNormal();
+ showMaximized();
+ slider->show();
+ }
}
void VideoWidget::paintEvent( QPaintEvent * ) {
@@ -289,11 +294,14 @@ void VideoWidget::paintEvent( QPaintEvent * ) {
if ( mediaPlayerState->fullscreen() ) {
// Clear the background
p.setBrush( QBrush( Qt::black ) );
videoFrame->setGeometry( QRect( 0, 0 , 240 ,340 ) );
-
+
} else {
+
+ videoFrame->setGeometry( QRect( 0, 15 , 240 ,170 ) );
// draw the buttons
+
for ( int i = 0; i < numButtons; i++ ) {
paintButton( &p, i );
}
// draw the slider
diff --git a/noncore/multimedia/opieplayer2/videowidget.h b/noncore/multimedia/opieplayer2/videowidget.h
index 8f98889..0122d5d 100644
--- a/noncore/multimedia/opieplayer2/videowidget.h
+++ b/noncore/multimedia/opieplayer2/videowidget.h
@@ -85,8 +85,9 @@ private:
void paintButton( QPainter *p, int i );
void toggleButton( int );
void setToggleButton( int, bool );
+ QString backgroundPix;
QSlider *slider;
QPixmap *pixmaps[3];
QImage *currentFrame;
int scaledWidth;
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp
index 3be9fa4..3faeab1 100644
--- a/noncore/multimedia/opieplayer2/xinecontrol.cpp
+++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp
@@ -44,8 +44,9 @@ XineControl::XineControl( QObject *parent, const char *name )
libXine = new XINE::Lib(videoUI->vidWidget() );
connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( pause(bool) ) );
connect( this, SIGNAL( positionChanged( int position ) ), mediaPlayerState, SLOT( updatePosition( long p ) ) );
+ connect(this, SIGNAL( postitionChanged(int position) ), mediaPlayerState, SLOT( setPosition( long p ) ) );
connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( stop( bool ) ) );
connect( mediaPlayerState, SIGNAL( fullscreenToggled( bool ) ), this, SLOT( setFullscreen( bool ) ) );
connect( mediaPlayerState, SIGNAL( positionChanged( long ) ), this, SLOT( seekTo( long ) ) );