-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 4 |
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 | |||
@@ -172,49 +172,49 @@ QPixmap *combineVImageWithBackground( QImage img, QPixmap bg, QPoint offset ) { | |||
172 | p.drawTiledPixmap( pix.rect(), bg, offset ); | 172 | p.drawTiledPixmap( pix.rect(), bg, offset ); |
173 | p.drawImage( 0, 0, img ); | 173 | p.drawImage( 0, 0, img ); |
174 | return new QPixmap( pix ); | 174 | return new QPixmap( pix ); |
175 | } | 175 | } |
176 | 176 | ||
177 | QPixmap *maskVPixToMask( QPixmap pix, QBitmap mask ) { | 177 | QPixmap *maskVPixToMask( QPixmap pix, QBitmap mask ) { |
178 | QPixmap *pixmap = new QPixmap( pix ); | 178 | QPixmap *pixmap = new QPixmap( pix ); |
179 | pixmap->setMask( mask ); | 179 | pixmap->setMask( mask ); |
180 | return pixmap; | 180 | return pixmap; |
181 | } | 181 | } |
182 | 182 | ||
183 | void VideoWidget::resizeEvent( QResizeEvent * ) { | 183 | void VideoWidget::resizeEvent( QResizeEvent * ) { |
184 | int h = height(); | 184 | int h = height(); |
185 | int w = width(); | 185 | int w = width(); |
186 | int Vh = 160; | 186 | int Vh = 160; |
187 | //videoFrame->height(); | 187 | //videoFrame->height(); |
188 | int Vw = 220; | 188 | int Vw = 220; |
189 | //videoFrame->width(); | 189 | //videoFrame->width(); |
190 | // songInfo.setGeometry( QRect( 2, 10, w - 4, 20 ) ); | 190 | // songInfo.setGeometry( QRect( 2, 10, w - 4, 20 ) ); |
191 | 191 | ||
192 | slider->setFixedWidth( w - 110 ); | 192 | slider->setFixedWidth( w - 110 ); |
193 | slider->setGeometry( QRect( 15, h - 30, w - 90, 20 ) ); | 193 | slider->setGeometry( QRect( 15, h - 30, w - 90, 20 ) ); |
194 | slider->setBackgroundOrigin( QWidget::ParentOrigin ); | 194 | slider->setBackgroundOrigin( QWidget::ParentOrigin ); |
195 | slider->setFocusPolicy( QWidget::NoFocus ); | 195 | slider->setFocusPolicy( QWidget::NoFocus ); |
196 | make slider->setBackgroundPixmap( *pixBg ); | 196 | slider->setBackgroundPixmap( *pixBg ); |
197 | 197 | ||
198 | // time.setGeometry( QRect( w - 85, h - 30, 70, 20 ) ); | 198 | // time.setGeometry( QRect( w - 85, h - 30, 70, 20 ) ); |
199 | xoff = 0;// ( imgUp->width() ) / 2; | 199 | xoff = 0;// ( imgUp->width() ) / 2; |
200 | yoff = 180;//(( Vh - imgUp->height() ) / 2) - 10; | 200 | yoff = 180;//(( Vh - imgUp->height() ) / 2) - 10; |
201 | QPoint p( xoff, yoff ); | 201 | QPoint p( xoff, yoff ); |
202 | 202 | ||
203 | 203 | ||
204 | QPixmap *pixUp = combineVImageWithBackground( *imgUp, *pixBg, p ); | 204 | QPixmap *pixUp = combineVImageWithBackground( *imgUp, *pixBg, p ); |
205 | QPixmap *pixDn = combineVImageWithBackground( *imgDn, *pixBg, p ); | 205 | QPixmap *pixDn = combineVImageWithBackground( *imgDn, *pixBg, p ); |
206 | 206 | ||
207 | for ( int i = 0; i < 7; i++ ) { | 207 | for ( int i = 0; i < 7; i++ ) { |
208 | if ( !masks[i]->isNull() ) { | 208 | if ( !masks[i]->isNull() ) { |
209 | delete buttonPixUp[i]; | 209 | delete buttonPixUp[i]; |
210 | delete buttonPixDown[i]; | 210 | delete buttonPixDown[i]; |
211 | buttonPixUp[i] = maskVPixToMask( *pixUp, *masks[i] ); | 211 | buttonPixUp[i] = maskVPixToMask( *pixUp, *masks[i] ); |
212 | buttonPixDown[i] = maskVPixToMask( *pixDn, *masks[i] ); | 212 | buttonPixDown[i] = maskVPixToMask( *pixDn, *masks[i] ); |
213 | } | 213 | } |
214 | } | 214 | } |
215 | 215 | ||
216 | delete pixUp; | 216 | delete pixUp; |
217 | delete pixDn; | 217 | delete pixDn; |
218 | } | 218 | } |
219 | 219 | ||
220 | static bool videoSliderBeingMoved = FALSE; | 220 | static bool videoSliderBeingMoved = FALSE; |
@@ -440,27 +440,27 @@ void VideoWidget::keyReleaseEvent( QKeyEvent *e) { | |||
440 | break; | 440 | break; |
441 | case Key_Up: | 441 | case Key_Up: |
442 | // toggleButton(5); | 442 | // toggleButton(5); |
443 | // emit moreClicked(); | 443 | // emit moreClicked(); |
444 | // emit moreReleased(); | 444 | // emit moreReleased(); |
445 | // toggleButton(5); | 445 | // toggleButton(5); |
446 | break; | 446 | break; |
447 | case Key_Right: | 447 | case Key_Right: |
448 | mediaPlayerState->setNext(); | 448 | mediaPlayerState->setNext(); |
449 | break; | 449 | break; |
450 | case Key_Left: | 450 | case Key_Left: |
451 | mediaPlayerState->setPrev(); | 451 | mediaPlayerState->setPrev(); |
452 | break; | 452 | break; |
453 | case Key_Escape: | 453 | case Key_Escape: |
454 | break; | 454 | break; |
455 | 455 | ||
456 | }; | 456 | }; |
457 | } | 457 | } |
458 | 458 | ||
459 | XineVideoWidget* VideoWidget::vidWidget() { | 459 | XineVideoWidget* VideoWidget::vidWidget() { |
460 | return videoFrame; | 460 | return videoFrame; |
461 | } | 461 | } |
462 | 462 | ||
463 | 463 | ||
464 | void VideoWidget::setFullscreen ( bool b ) { | 464 | void VideoWidget::setFullscreen ( bool b ) { |
465 | setToggleButton( VideoFullscreen, b ); | 465 | setToggleButton( VideoFullscreen, b ); |
466 | } | 466 | } |