Diffstat (limited to 'core/multimedia/opieplayer/videowidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/videowidget.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/core/multimedia/opieplayer/videowidget.cpp b/core/multimedia/opieplayer/videowidget.cpp index 12ae4fd..1f128a4 100644 --- a/core/multimedia/opieplayer/videowidget.cpp +++ b/core/multimedia/opieplayer/videowidget.cpp | |||
@@ -1,34 +1,33 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of the Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | |||
21 | #include <qpe/resource.h> | 20 | #include <qpe/resource.h> |
22 | #include <qpe/mediaplayerplugininterface.h> | 21 | #include "mediaplayerplugininterface.h" |
23 | #include <qwidget.h> | 22 | #include <qwidget.h> |
24 | #include <qpainter.h> | 23 | #include <qpainter.h> |
25 | #include <qpixmap.h> | 24 | #include <qpixmap.h> |
26 | #include <qslider.h> | 25 | #include <qslider.h> |
27 | #include <qdrawutil.h> | 26 | #include <qdrawutil.h> |
28 | #include "videowidget.h" | 27 | #include "videowidget.h" |
29 | #include "mediaplayerstate.h" | 28 | #include "mediaplayerstate.h" |
30 | 29 | ||
31 | 30 | ||
32 | #ifdef Q_WS_QWS | 31 | #ifdef Q_WS_QWS |
33 | # define USE_DIRECT_PAINTER | 32 | # define USE_DIRECT_PAINTER |
34 | # include <qdirectpainter_qws.h> | 33 | # include <qdirectpainter_qws.h> |
@@ -58,25 +57,25 @@ MediaButton videoButtons[] = { | |||
58 | { 5+3*32+xo, 200+yo, TRUE, FALSE, FALSE, 2 }, // pause | 57 | { 5+3*32+xo, 200+yo, TRUE, FALSE, FALSE, 2 }, // pause |
59 | { 5+4*32+xo, 200+yo, FALSE, FALSE, FALSE, 3 }, // next | 58 | { 5+4*32+xo, 200+yo, FALSE, FALSE, FALSE, 3 }, // next |
60 | { 5+5*32+xo, 200+yo, FALSE, FALSE, FALSE, 8 }, // playlist | 59 | { 5+5*32+xo, 200+yo, FALSE, FALSE, FALSE, 8 }, // playlist |
61 | { 5+6*32+xo, 200+yo, TRUE, FALSE, FALSE, 9 } // fullscreen | 60 | { 5+6*32+xo, 200+yo, TRUE, FALSE, FALSE, 9 } // fullscreen |
62 | }; | 61 | }; |
63 | 62 | ||
64 | 63 | ||
65 | static const int numButtons = (sizeof(videoButtons)/sizeof(MediaButton)); | 64 | static const int numButtons = (sizeof(videoButtons)/sizeof(MediaButton)); |
66 | 65 | ||
67 | 66 | ||
68 | VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) : | 67 | VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) : |
69 | QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) { | 68 | QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) { |
70 | setCaption( tr("MediaPlayer") ); | 69 | setCaption( tr("OpiePlayer") ); |
71 | setBackgroundPixmap( Resource::loadPixmap( "mpegplayer/metalFinish" ) ); | 70 | setBackgroundPixmap( Resource::loadPixmap( "mpegplayer/metalFinish" ) ); |
72 | pixmaps[0] = new QPixmap( Resource::loadPixmap( "mpegplayer/mediaButton0a" ) ); | 71 | pixmaps[0] = new QPixmap( Resource::loadPixmap( "mpegplayer/mediaButton0a" ) ); |
73 | pixmaps[1] = new QPixmap( Resource::loadPixmap( "mpegplayer/mediaButton0b" ) ); | 72 | pixmaps[1] = new QPixmap( Resource::loadPixmap( "mpegplayer/mediaButton0b" ) ); |
74 | pixmaps[2] = new QPixmap( Resource::loadPixmap( "mpegplayer/mediaControls0" ) ); | 73 | pixmaps[2] = new QPixmap( Resource::loadPixmap( "mpegplayer/mediaControls0" ) ); |
75 | currentFrame = new QImage( 220 + 2, 160, (QPixmap::defaultDepth() == 16) ? 16 : 32 ); | 74 | currentFrame = new QImage( 220 + 2, 160, (QPixmap::defaultDepth() == 16) ? 16 : 32 ); |
76 | 75 | ||
77 | slider = new QSlider( Qt::Horizontal, this ); | 76 | slider = new QSlider( Qt::Horizontal, this ); |
78 | slider->setMinValue( 0 ); | 77 | slider->setMinValue( 0 ); |
79 | slider->setMaxValue( 1 ); | 78 | slider->setMaxValue( 1 ); |
80 | slider->setBackgroundPixmap( Resource::loadPixmap( "mpegplayer/metalFinish" ) ); | 79 | slider->setBackgroundPixmap( Resource::loadPixmap( "mpegplayer/metalFinish" ) ); |
81 | slider->setFocusPolicy( QWidget::NoFocus ); | 80 | slider->setFocusPolicy( QWidget::NoFocus ); |
82 | slider->setGeometry( QRect( 7, 250, 220, 20 ) ); | 81 | slider->setGeometry( QRect( 7, 250, 220, 20 ) ); |