summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index a4e6b6e..9b88299 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -148,97 +148,97 @@ QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) {
setPaused( mediaPlayerState->paused() );
setPlaying( mediaPlayerState->playing() );
qDebug("finished videowidget");
}
VideoWidget::~VideoWidget() {
for ( int i = 0; i < 7; i++ ) {
delete buttonPixUp[i];
delete buttonPixDown[i];
}
delete pixBg;
delete imgUp;
delete imgDn;
delete imgButtonMask;
for ( int i = 0; i < 7; i++ ) {
delete masks[i];
}
}
QPixmap *combineVImageWithBackground( 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 );
}
QPixmap *maskVPixToMask( QPixmap pix, QBitmap mask ) {
QPixmap *pixmap = new QPixmap( pix );
pixmap->setMask( mask );
return pixmap;
}
void VideoWidget::resizeEvent( QResizeEvent * ) {
int h = height();
int w = width();
int Vh = 160;
//videoFrame->height();
int Vw = 220;
//videoFrame->width();
// songInfo.setGeometry( QRect( 2, 10, w - 4, 20 ) );
slider->setFixedWidth( w - 110 );
slider->setGeometry( QRect( 15, h - 30, w - 90, 20 ) );
slider->setBackgroundOrigin( QWidget::ParentOrigin );
slider->setFocusPolicy( QWidget::NoFocus );
-make slider->setBackgroundPixmap( *pixBg );
+ slider->setBackgroundPixmap( *pixBg );
// time.setGeometry( QRect( w - 85, h - 30, 70, 20 ) );
xoff = 0;// ( imgUp->width() ) / 2;
yoff = 180;//(( Vh - imgUp->height() ) / 2) - 10;
QPoint p( xoff, yoff );
QPixmap *pixUp = combineVImageWithBackground( *imgUp, *pixBg, p );
QPixmap *pixDn = combineVImageWithBackground( *imgDn, *pixBg, p );
for ( int i = 0; i < 7; i++ ) {
if ( !masks[i]->isNull() ) {
delete buttonPixUp[i];
delete buttonPixDown[i];
buttonPixUp[i] = maskVPixToMask( *pixUp, *masks[i] );
buttonPixDown[i] = maskVPixToMask( *pixDn, *masks[i] );
}
}
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() );
}
void VideoWidget::setLength( long max ) {
updateSlider( mediaPlayerState->position(), max );
}
void VideoWidget::setView( char view ) {
@@ -416,51 +416,51 @@ void VideoWidget::keyReleaseEvent( QKeyEvent *e) {
case Key_F9: //activity
break;
case Key_F10: //contacts
// hide();
break;
case Key_F11: //menu
break;
case Key_F12: //home
break;
case Key_F13: //mail
break;
case Key_Space: {
if(mediaPlayerState->playing()) {
mediaPlayerState->setPlaying(FALSE);
} else {
mediaPlayerState->setPlaying(TRUE);
}
}
break;
case Key_Down:
// toggleButton(6);
// emit lessClicked();
// emit lessReleased();
// toggleButton(6);
break;
case Key_Up:
// toggleButton(5);
// emit moreClicked();
// emit moreReleased();
// toggleButton(5);
break;
case Key_Right:
mediaPlayerState->setNext();
break;
case Key_Left:
mediaPlayerState->setPrev();
break;
case Key_Escape:
break;
};
}
XineVideoWidget* VideoWidget::vidWidget() {
return videoFrame;
}
-void VideoWidget::setFullscreen ( bool b ) {
+void VideoWidget::setFullscreen ( bool b ) {
setToggleButton( VideoFullscreen, b );
}