summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp4
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index 41844e1..26777e6 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -62,33 +62,33 @@ const int yo = 0; // movable y offset
const MediaWidget::SkinButtonInfo skinInfo[] =
{
{ MediaWidget::Play, "play", MediaWidget::ToggleButton },
{ MediaWidget::Stop, "stop", MediaWidget::NormalButton },
{ MediaWidget::Next, "fwd", MediaWidget::NormalButton },
{ MediaWidget::Previous, "back", MediaWidget::NormalButton },
{ MediaWidget::VolumeUp, "up", MediaWidget::NormalButton },
{ MediaWidget::VolumeDown, "down", MediaWidget::NormalButton },
{ MediaWidget::FullScreen, "full", MediaWidget::ToggleButton }
};
const uint buttonCount = sizeof( skinInfo ) / sizeof( skinInfo[ 0 ] );
}
VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name )
- : MediaWidget( playList, mediaPlayerState, parent, name ), scaledWidth( 0 ), scaledHeight( 0 )
+ : MediaWidget( playList, mediaPlayerState, parent, name ), scaledWidth( 0 ), scaledHeight( 0 ), videoSliderBeingMoved( false )
{
setCaption( tr("OpiePlayer - Video") );
videoFrame = new XineVideoWidget ( this, "Video frame" );
connect ( videoFrame, SIGNAL( videoResized ( const QSize & )), this, SIGNAL( videoResized ( const QSize & )));
connect ( videoFrame, SIGNAL( clicked () ), this, SLOT ( backToNormal() ) );
Config cfg("OpiePlayer");
cfg.setGroup("Options");
skin = cfg.readEntry("Skin","default");
QString skinPath = "opieplayer2/skins/" + skin;
backgroundPixmap = QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) );
imgUp = QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) );
@@ -176,34 +176,32 @@ void VideoWidget::resizeEvent( QResizeEvent * ) {
QPixmap *pixUp = combineVImageWithBackground( imgUp, backgroundPixmap, p );
QPixmap *pixDn = combineVImageWithBackground( imgDn, backgroundPixmap, p );
for ( ButtonVector::iterator it = buttons.begin(); it != buttons.end(); ++it ) {
Button &button = *it;
if ( !button.mask.isNull() ) {
button.pixUp = maskVPixToMask( *pixUp, button.mask );
button.pixDown = maskVPixToMask( *pixDn, button.mask );
}
}
delete pixUp;
delete pixDn;
}
-static bool videoSliderBeingMoved = FALSE;
-
void VideoWidget::sliderPressed() {
videoSliderBeingMoved = TRUE;
}
void VideoWidget::sliderReleased() {
videoSliderBeingMoved = FALSE;
if ( slider->width() == 0 ) {
return;
}
long val = long((double)slider->value() * mediaPlayerState.length() / slider->width());
mediaPlayerState.setPosition( val );
}
void VideoWidget::setPosition( long i ) {
updateSlider( i, mediaPlayerState.length() );
}
diff --git a/noncore/multimedia/opieplayer2/videowidget.h b/noncore/multimedia/opieplayer2/videowidget.h
index 7d50ea0..bed2116 100644
--- a/noncore/multimedia/opieplayer2/videowidget.h
+++ b/noncore/multimedia/opieplayer2/videowidget.h
@@ -81,22 +81,24 @@ protected:
void keyReleaseEvent( QKeyEvent *e);
private:
// Ticker songInfo;
QImage imgUp;
QImage imgDn;
QString skin;
QString backgroundPix;
QSlider *slider;
QImage *currentFrame;
int scaledWidth;
int scaledHeight;
XineVideoWidget* videoFrame;
+
+ bool videoSliderBeingMoved;
};
#endif // VIDEO_WIDGET_H