-rw-r--r-- | core/multimedia/opieplayer/audiowidget.cpp | 16 | ||||
-rw-r--r-- | core/multimedia/opieplayer/videowidget.cpp | 36 |
2 files changed, 26 insertions, 26 deletions
diff --git a/core/multimedia/opieplayer/audiowidget.cpp b/core/multimedia/opieplayer/audiowidget.cpp index cda3f77..3212001 100644 --- a/core/multimedia/opieplayer/audiowidget.cpp +++ b/core/multimedia/opieplayer/audiowidget.cpp | |||
@@ -65,11 +65,11 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : | |||
65 | { | 65 | { |
66 | // QPEApplication::grabKeyboard(); | 66 | // QPEApplication::grabKeyboard(); |
67 | setCaption( tr("OpiePlayer") ); | 67 | setCaption( tr("OpiePlayer") ); |
68 | setBackgroundPixmap( Resource::loadPixmap( "mpegplayer/metalFinish" ) ); | 68 | setBackgroundPixmap( Resource::loadPixmap( "opieplayer/metalFinish" ) ); |
69 | pixmaps[0] = new QPixmap( Resource::loadPixmap( "mpegplayer/mediaButtonsAll" ) ); | 69 | pixmaps[0] = new QPixmap( Resource::loadPixmap( "opieplayer/mediaButtonsAll" ) ); |
70 | pixmaps[1] = new QPixmap( Resource::loadPixmap( "mpegplayer/mediaButtonsBig" ) ); | 70 | pixmaps[1] = new QPixmap( Resource::loadPixmap( "opieplayer/mediaButtonsBig" ) ); |
71 | pixmaps[2] = new QPixmap( Resource::loadPixmap( "mpegplayer/mediaControls" ) ); | 71 | pixmaps[2] = new QPixmap( Resource::loadPixmap( "opieplayer/mediaControls" ) ); |
72 | pixmaps[3] = new QPixmap( Resource::loadPixmap( "mpegplayer/animatedButton" ) ); | 72 | pixmaps[3] = new QPixmap( Resource::loadPixmap( "opieplayer/animatedButton" ) ); |
73 | 73 | ||
74 | songInfo = new Ticker( this ); | 74 | songInfo = new Ticker( this ); |
75 | songInfo->setFocusPolicy( QWidget::NoFocus ); | 75 | songInfo->setFocusPolicy( QWidget::NoFocus ); |
@@ -80,7 +80,7 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : | |||
80 | slider->setFixedHeight( 20 ); | 80 | slider->setFixedHeight( 20 ); |
81 | slider->setMinValue( 0 ); | 81 | slider->setMinValue( 0 ); |
82 | slider->setMaxValue( 1 ); | 82 | slider->setMaxValue( 1 ); |
83 | slider->setBackgroundPixmap( Resource::loadPixmap( "mpegplayer/metalFinish" ) ); | 83 | slider->setBackgroundPixmap( Resource::loadPixmap( "opieplayer/metalFinish" ) ); |
84 | slider->setFocusPolicy( QWidget::NoFocus ); | 84 | slider->setFocusPolicy( QWidget::NoFocus ); |
85 | slider->setGeometry( QRect( 7, 262, 220, 20 ) ); | 85 | slider->setGeometry( QRect( 7, 262, 220, 20 ) ); |
86 | 86 | ||
@@ -153,7 +153,7 @@ void AudioWidget::updateSlider( long i, long max ) { | |||
153 | if ( max == 0 ) | 153 | if ( max == 0 ) |
154 | return; | 154 | return; |
155 | // Will flicker too much if we don't do this | 155 | // Will flicker too much if we don't do this |
156 | // Scale to something reasonable | 156 | // Scale to something reasonable |
157 | int width = slider->width(); | 157 | int width = slider->width(); |
158 | int val = int((double)i * width / max); | 158 | int val = int((double)i * width / max); |
159 | if ( !audioSliderBeingMoved ) { | 159 | if ( !audioSliderBeingMoved ) { |
@@ -333,6 +333,6 @@ void AudioWidget::keyReleaseEvent( QKeyEvent *e) | |||
333 | break; | 333 | break; |
334 | case Key_Escape: | 334 | case Key_Escape: |
335 | break; | 335 | break; |
336 | 336 | ||
337 | }; | 337 | }; |
338 | } | 338 | } |
diff --git a/core/multimedia/opieplayer/videowidget.cpp b/core/multimedia/opieplayer/videowidget.cpp index 23b36e5..70b4a95 100644 --- a/core/multimedia/opieplayer/videowidget.cpp +++ b/core/multimedia/opieplayer/videowidget.cpp | |||
@@ -67,16 +67,16 @@ static const int numButtons = (sizeof(videoButtons)/sizeof(MediaButton)); | |||
67 | VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) : | 67 | VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) : |
68 | QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) { | 68 | QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) { |
69 | setCaption( tr("OpiePlayer") ); | 69 | setCaption( tr("OpiePlayer") ); |
70 | setBackgroundPixmap( Resource::loadPixmap( "mpegplayer/metalFinish" ) ); | 70 | setBackgroundPixmap( Resource::loadPixmap( "opieplayer/metalFinish" ) ); |
71 | pixmaps[0] = new QPixmap( Resource::loadPixmap( "mpegplayer/mediaButton0a" ) ); | 71 | pixmaps[0] = new QPixmap( Resource::loadPixmap( "opieplayer/mediaButton0a" ) ); |
72 | pixmaps[1] = new QPixmap( Resource::loadPixmap( "mpegplayer/mediaButton0b" ) ); | 72 | pixmaps[1] = new QPixmap( Resource::loadPixmap( "opieplayer/mediaButton0b" ) ); |
73 | pixmaps[2] = new QPixmap( Resource::loadPixmap( "mpegplayer/mediaControls0" ) ); | 73 | pixmaps[2] = new QPixmap( Resource::loadPixmap( "opieplayer/mediaControls0" ) ); |
74 | currentFrame = new QImage( 220 + 2, 160, (QPixmap::defaultDepth() == 16) ? 16 : 32 ); | 74 | currentFrame = new QImage( 220 + 2, 160, (QPixmap::defaultDepth() == 16) ? 16 : 32 ); |
75 | 75 | ||
76 | slider = new QSlider( Qt::Horizontal, this ); | 76 | slider = new QSlider( Qt::Horizontal, this ); |
77 | slider->setMinValue( 0 ); | 77 | slider->setMinValue( 0 ); |
78 | slider->setMaxValue( 1 ); | 78 | slider->setMaxValue( 1 ); |
79 | slider->setBackgroundPixmap( Resource::loadPixmap( "mpegplayer/metalFinish" ) ); | 79 | slider->setBackgroundPixmap( Resource::loadPixmap( "opieplayer/metalFinish" ) ); |
80 | slider->setFocusPolicy( QWidget::NoFocus ); | 80 | slider->setFocusPolicy( QWidget::NoFocus ); |
81 | slider->setGeometry( QRect( 7, 250, 220, 20 ) ); | 81 | slider->setGeometry( QRect( 7, 250, 220, 20 ) ); |
82 | 82 | ||
@@ -201,7 +201,7 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) { | |||
201 | } else { | 201 | } else { |
202 | if ( videoButtons[i].isHeld ) { | 202 | if ( videoButtons[i].isHeld ) { |
203 | videoButtons[i].isHeld = FALSE; | 203 | videoButtons[i].isHeld = FALSE; |
204 | if ( !videoButtons[i].isToggle ) | 204 | if ( !videoButtons[i].isToggle ) |
205 | setToggleButton( i, FALSE ); | 205 | setToggleButton( i, FALSE ); |
206 | } | 206 | } |
207 | } | 207 | } |
@@ -214,7 +214,7 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) { | |||
214 | case VideoPlayList: mediaPlayerState->setList(); return; | 214 | case VideoPlayList: mediaPlayerState->setList(); return; |
215 | case VideoFullscreen: mediaPlayerState->setFullscreen( TRUE ); makeVisible(); return; | 215 | case VideoFullscreen: mediaPlayerState->setFullscreen( TRUE ); makeVisible(); return; |
216 | } | 216 | } |
217 | 217 | ||
218 | } | 218 | } |
219 | } | 219 | } |
220 | 220 | ||
@@ -228,7 +228,7 @@ void VideoWidget::mouseReleaseEvent( QMouseEvent *event ) { | |||
228 | if ( mediaPlayerState->fullscreen() ) { | 228 | if ( mediaPlayerState->fullscreen() ) { |
229 | mediaPlayerState->setFullscreen( FALSE ); | 229 | mediaPlayerState->setFullscreen( FALSE ); |
230 | makeVisible(); | 230 | makeVisible(); |
231 | 231 | ||
232 | mouseMoveEvent( event ); | 232 | mouseMoveEvent( event ); |
233 | } | 233 | } |
234 | } | 234 | } |
@@ -241,7 +241,7 @@ void VideoWidget::makeVisible() { | |||
241 | resize( qApp->desktop()->size() ); | 241 | resize( qApp->desktop()->size() ); |
242 | slider->hide(); | 242 | slider->hide(); |
243 | } else { | 243 | } else { |
244 | setBackgroundPixmap( Resource::loadPixmap( "mpegplayer/metalFinish" ) ); | 244 | setBackgroundPixmap( Resource::loadPixmap( "opieplayer/metalFinish" ) ); |
245 | showNormal(); | 245 | showNormal(); |
246 | showMaximized(); | 246 | showMaximized(); |
247 | slider->show(); | 247 | slider->show(); |
@@ -253,7 +253,7 @@ void VideoWidget::paintEvent( QPaintEvent * ) { | |||
253 | QPainter p( this ); | 253 | QPainter p( this ); |
254 | 254 | ||
255 | if ( mediaPlayerState->fullscreen() ) { | 255 | if ( mediaPlayerState->fullscreen() ) { |
256 | // Clear the background | 256 | // Clear the background |
257 | p.setBrush( QBrush( Qt::black ) ); | 257 | p.setBrush( QBrush( Qt::black ) ); |
258 | p.drawRect( rect() ); | 258 | p.drawRect( rect() ); |
259 | 259 | ||
@@ -288,7 +288,7 @@ void VideoWidget::closeEvent( QCloseEvent* ) { | |||
288 | bool VideoWidget::playVideo() { | 288 | bool VideoWidget::playVideo() { |
289 | bool result = FALSE; | 289 | bool result = FALSE; |
290 | 290 | ||
291 | int stream = 0; | 291 | int stream = 0; |
292 | 292 | ||
293 | int sw = mediaPlayerState->curDecoder()->videoWidth( stream ); | 293 | int sw = mediaPlayerState->curDecoder()->videoWidth( stream ); |
294 | int sh = mediaPlayerState->curDecoder()->videoHeight( stream ); | 294 | int sh = mediaPlayerState->curDecoder()->videoHeight( stream ); |
@@ -310,18 +310,18 @@ bool VideoWidget::playVideo() { | |||
310 | 310 | ||
311 | if ( mediaPlayerState->scaled() ) { | 311 | if ( mediaPlayerState->scaled() ) { |
312 | // maintain aspect ratio | 312 | // maintain aspect ratio |
313 | if ( w * sh > sw * h ) | 313 | if ( w * sh > sw * h ) |
314 | w = sw * h / sh; | 314 | w = sw * h / sh; |
315 | else | 315 | else |
316 | h = sh * w / sw; | 316 | h = sh * w / sw; |
317 | } else { | 317 | } else { |
318 | w = sw; | 318 | w = sw; |
319 | h = sh; | 319 | h = sh; |
320 | } | 320 | } |
321 | 321 | ||
322 | w--; // we can't allow libmpeg to overwrite. | 322 | w--; // we can't allow libmpeg to overwrite. |
323 | QPoint roff = qt_screen->mapToDevice( p.offset(), QSize( qt_screen->width(), qt_screen->height() ) ); | 323 | QPoint roff = qt_screen->mapToDevice( p.offset(), QSize( qt_screen->width(), qt_screen->height() ) ); |
324 | 324 | ||
325 | int ox = roff.x() - height() + 2 + (height() - w) / 2; | 325 | int ox = roff.x() - height() + 2 + (height() - w) / 2; |
326 | int oy = roff.y() + (width() - h) / 2; | 326 | int oy = roff.y() + (width() - h) / 2; |
327 | int sx = 0, sy = 0; | 327 | int sx = 0, sy = 0; |
@@ -346,13 +346,13 @@ bool VideoWidget::playVideo() { | |||
346 | 346 | ||
347 | if ( mediaPlayerState->scaled() ) { | 347 | if ( mediaPlayerState->scaled() ) { |
348 | // maintain aspect ratio | 348 | // maintain aspect ratio |
349 | if ( w * sh > sw * h ) | 349 | if ( w * sh > sw * h ) |
350 | w = sw * h / sh; | 350 | w = sw * h / sh; |
351 | else | 351 | else |
352 | h = sh * w / sw; | 352 | h = sh * w / sw; |
353 | } else { | 353 | } else { |
354 | w = sw; | 354 | w = sw; |
355 | h = sh; | 355 | h = sh; |
356 | } | 356 | } |
357 | 357 | ||
358 | int bytes = ( dd == 16 ) ? 2 : 4; | 358 | int bytes = ( dd == 16 ) ? 2 : 4; |
@@ -394,7 +394,7 @@ bool VideoWidget::playVideo() { | |||
394 | h = 160; | 394 | h = 160; |
395 | 395 | ||
396 | // maintain aspect ratio | 396 | // maintain aspect ratio |
397 | if ( w * sh > sw * h ) | 397 | if ( w * sh > sw * h ) |
398 | w = sw * h / sh; | 398 | w = sw * h / sh; |
399 | else | 399 | else |
400 | h = sh * w / sw; | 400 | h = sh * w / sw; |
@@ -467,6 +467,6 @@ void VideoWidget::keyReleaseEvent( QKeyEvent *e) | |||
467 | break; | 467 | break; |
468 | case Key_Escape: | 468 | case Key_Escape: |
469 | break; | 469 | break; |
470 | 470 | ||
471 | }; | 471 | }; |
472 | } | 472 | } |