summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/videowidget.cpp
Unidiff
Diffstat (limited to 'noncore/multimedia/opieplayer2/videowidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index 755cd22..c829e03 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -22,34 +22,24 @@
22..}^=.=       =       ; Library General Public License for more 22..}^=.=       =       ; Library General Public License for more
23++=   -.     .`     .: details. 23++=   -.     .`     .: details.
24 :     =  ...= . :.=- 24 :     =  ...= . :.=-
25 -.   .:....=;==+<; You should have received a copy of the GNU 25 -.   .:....=;==+<; You should have received a copy of the GNU
26  -_. . .   )=.  = Library General Public License along with 26  -_. . .   )=.  = Library General Public License along with
27    --        :-=` this library; see the file COPYING.LIB. 27    --        :-=` this library; see the file COPYING.LIB.
28 If not, write to the Free Software Foundation, 28 If not, write to the Free Software Foundation,
29 Inc., 59 Temple Place - Suite 330, 29 Inc., 59 Temple Place - Suite 330,
30 Boston, MA 02111-1307, USA. 30 Boston, MA 02111-1307, USA.
31 31
32*/ 32*/
33 33
34#include <qpe/qpeapplication.h>
35#include <qpe/resource.h>
36#include <qpe/config.h>
37
38
39#include <qwidget.h>
40#include <qpainter.h>
41#include <qpixmap.h>
42#include <qslider.h>
43#include <qdrawutil.h>
44#include "videowidget.h" 34#include "videowidget.h"
45#include "mediaplayerstate.h" 35#include "mediaplayerstate.h"
46#include "playlistwidget.h" 36#include "playlistwidget.h"
47 37
48 38
49#ifdef Q_WS_QWS 39#ifdef Q_WS_QWS
50# define USE_DIRECT_PAINTER 40# define USE_DIRECT_PAINTER
51# include <qdirectpainter_qws.h> 41# include <qdirectpainter_qws.h>
52# include <qgfxraster_qws.h> 42# include <qgfxraster_qws.h>
53#endif 43#endif
54 44
55 45
@@ -65,46 +55,46 @@ const MediaWidget::SkinButtonInfo skinInfo[] =
65 { MediaWidget::Stop, "stop", MediaWidget::NormalButton }, 55 { MediaWidget::Stop, "stop", MediaWidget::NormalButton },
66 { MediaWidget::Next, "fwd", MediaWidget::NormalButton }, 56 { MediaWidget::Next, "fwd", MediaWidget::NormalButton },
67 { MediaWidget::Previous, "back", MediaWidget::NormalButton }, 57 { MediaWidget::Previous, "back", MediaWidget::NormalButton },
68 { MediaWidget::VolumeUp, "up", MediaWidget::NormalButton }, 58 { MediaWidget::VolumeUp, "up", MediaWidget::NormalButton },
69 { MediaWidget::VolumeDown, "down", MediaWidget::NormalButton }, 59 { MediaWidget::VolumeDown, "down", MediaWidget::NormalButton },
70 { MediaWidget::FullScreen, "full", MediaWidget::ToggleButton } 60 { MediaWidget::FullScreen, "full", MediaWidget::ToggleButton }
71}; 61};
72 62
73const uint buttonCount = sizeof( skinInfo ) / sizeof( skinInfo[ 0 ] ); 63const uint buttonCount = sizeof( skinInfo ) / sizeof( skinInfo[ 0 ] );
74 64
75} 65}
76 66
77VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name ) 67VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name )
78 : MediaWidget( playList, mediaPlayerState, parent, name ), scaledWidth( 0 ), scaledHeight( 0 ), videoSliderBeingMoved( false ) 68 : MediaWidget( playList, mediaPlayerState, parent, name ), scaledWidth( 0 ), scaledHeight( 0 ), videoSliderBeingMoved( false )
79{ 69{
80 setCaption( tr("OpiePlayer - Video") ); 70 setCaption( tr("OpiePlayer - Video") );
81 71
82 videoFrame = new XineVideoWidget ( this, "Video frame" ); 72 videoFrame = new XineVideoWidget ( this, "Video frame" );
83 73
84 connect ( videoFrame, SIGNAL( videoResized ( const QSize & )), this, SIGNAL( videoResized ( const QSize & ))); 74 connect ( videoFrame, SIGNAL( videoResized ( const QSize & )), this, SIGNAL( videoResized ( const QSize & )));
85 connect ( videoFrame, SIGNAL( clicked () ), this, SLOT ( backToNormal() ) ); 75 connect ( videoFrame, SIGNAL( clicked () ), this, SLOT ( backToNormal() ) );
86 76
87 slider = 0; 77 slider = 0;
88 78
89 loadSkin(); 79 loadSkin();
90 80
91 setLength( mediaPlayerState.length() ); 81 setLength( mediaPlayerState.length() );
92 setPosition( mediaPlayerState.position() ); 82 setPosition( mediaPlayerState.position() );
93 setFullscreen( mediaPlayerState.isFullscreen() ); 83 setFullscreen( mediaPlayerState.isFullscreen() );
94 setPlaying( mediaPlayerState.isPlaying() ); 84 setPlaying( mediaPlayerState.isPlaying() );
95} 85}
96 86
97 87
98VideoWidget::~VideoWidget() 88VideoWidget::~VideoWidget()
99{ 89{
100} 90}
101 91
102MediaWidget::GUIInfo VideoWidget::guiInfo() 92MediaWidget::GUIInfo VideoWidget::guiInfo()
103{ 93{
104 return GUIInfo( "V" /* infix */, ::skinInfo, ::buttonCount ); 94 return GUIInfo( "V" /* infix */, ::skinInfo, ::buttonCount );
105} 95}
106 96
107void VideoWidget::resizeEvent( QResizeEvent *e ) { 97void VideoWidget::resizeEvent( QResizeEvent *e ) {
108 int h = height(); 98 int h = height();
109 int w = width(); 99 int w = width();
110 //int Vh = 160; 100 //int Vh = 160;