summaryrefslogtreecommitdiff
Unidiff
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
@@ -164,65 +164,65 @@ VideoWidget::~VideoWidget() {
164 for ( int i = 0; i < 7; i++ ) { 164 for ( int i = 0; i < 7; i++ ) {
165 delete masks[i]; 165 delete masks[i];
166 } 166 }
167} 167}
168 168
169QPixmap *combineVImageWithBackground( QImage img, QPixmap bg, QPoint offset ) { 169QPixmap *combineVImageWithBackground( QImage img, QPixmap bg, QPoint offset ) {
170 QPixmap pix( img.width(), img.height() ); 170 QPixmap pix( img.width(), img.height() );
171 QPainter p( &pix ); 171 QPainter p( &pix );
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
177QPixmap *maskVPixToMask( QPixmap pix, QBitmap mask ) { 177QPixmap *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
183void VideoWidget::resizeEvent( QResizeEvent * ) { 183void 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 );
196make 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
220static bool videoSliderBeingMoved = FALSE; 220static bool videoSliderBeingMoved = FALSE;
221 221
222void VideoWidget::sliderPressed() { 222void VideoWidget::sliderPressed() {
223 videoSliderBeingMoved = TRUE; 223 videoSliderBeingMoved = TRUE;
224} 224}
225 225
226void VideoWidget::sliderReleased() { 226void VideoWidget::sliderReleased() {
227 videoSliderBeingMoved = FALSE; 227 videoSliderBeingMoved = FALSE;
228 if ( slider->width() == 0 ) { 228 if ( slider->width() == 0 ) {
@@ -432,35 +432,35 @@ void VideoWidget::keyReleaseEvent( QKeyEvent *e) {
432 } 432 }
433 } 433 }
434 break; 434 break;
435 case Key_Down: 435 case Key_Down:
436// toggleButton(6); 436// toggleButton(6);
437// emit lessClicked(); 437// emit lessClicked();
438// emit lessReleased(); 438// emit lessReleased();
439// toggleButton(6); 439// toggleButton(6);
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
459XineVideoWidget* VideoWidget::vidWidget() { 459XineVideoWidget* VideoWidget::vidWidget() {
460 return videoFrame; 460 return videoFrame;
461} 461}
462 462
463 463
464void VideoWidget::setFullscreen ( bool b ) { 464void VideoWidget::setFullscreen ( bool b ) {
465 setToggleButton( VideoFullscreen, b ); 465 setToggleButton( VideoFullscreen, b );
466} 466}