summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayer.cpp2
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp37
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.h1
-rw-r--r--noncore/multimedia/opieplayer2/xinevideowidget.cpp68
-rw-r--r--noncore/multimedia/opieplayer2/xinevideowidget.h15
5 files changed, 67 insertions, 56 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp
index 93819f2..22afe19 100644
--- a/noncore/multimedia/opieplayer2/mediaplayer.cpp
+++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp
@@ -66,17 +66,17 @@ void MediaPlayer::pauseCheck( bool b ) {
66 66
67void MediaPlayer::play() { 67void MediaPlayer::play() {
68 mediaPlayerState->setPlaying( FALSE ); 68 mediaPlayerState->setPlaying( FALSE );
69 mediaPlayerState->setPlaying( TRUE ); 69 mediaPlayerState->setPlaying( TRUE );
70} 70}
71 71
72void MediaPlayer::setPlaying( bool play ) { 72void MediaPlayer::setPlaying( bool play ) {
73 if ( !play ) { 73 if ( !play ) {
74 //mediaPlayerState->setPaused( TRUE ); 74 // mediaPlayerState->setPaused( FALSE );
75 return; 75 return;
76 } 76 }
77 77
78 if ( mediaPlayerState->paused() ) { 78 if ( mediaPlayerState->paused() ) {
79 mediaPlayerState->setPaused( FALSE ); 79 mediaPlayerState->setPaused( FALSE );
80 return; 80 return;
81 } 81 }
82 82
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index 238770b..c2080e6 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -79,17 +79,19 @@ const char *skinV_mask_file_names[7] = {
79static const int numVButtons = (sizeof(videoButtons)/sizeof(MediaButton)); 79static const int numVButtons = (sizeof(videoButtons)/sizeof(MediaButton));
80 80
81 81
82VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) : 82VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) :
83QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) { 83QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) {
84 setCaption( tr("OpiePlayer - Video") ); 84 setCaption( tr("OpiePlayer - Video") );
85 85
86 videoFrame = new XineVideoWidget ( this, "Video frame" ); 86 videoFrame = new XineVideoWidget ( this, "Video frame" );
87
87 connect ( videoFrame, SIGNAL( videoResized ( const QSize & )), this, SIGNAL( videoResized ( const QSize & ))); 88 connect ( videoFrame, SIGNAL( videoResized ( const QSize & )), this, SIGNAL( videoResized ( const QSize & )));
89 connect ( videoFrame, SIGNAL( clicked () ), this, SLOT ( backToNormal() ) );
88 90
89 Config cfg("OpiePlayer"); 91 Config cfg("OpiePlayer");
90 cfg.setGroup("Options"); 92 cfg.setGroup("Options");
91 skin = cfg.readEntry("Skin","default"); 93 skin = cfg.readEntry("Skin","default");
92 94
93 QString skinPath = "opieplayer2/skins/" + skin; 95 QString skinPath = "opieplayer2/skins/" + skin;
94 pixBg = new QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); 96 pixBg = new QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) );
95 imgUp = new QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) ); 97 imgUp = new QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) );
@@ -338,18 +340,17 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) {
338 setToggleButton( i, FALSE ); 340 setToggleButton( i, FALSE );
339 mediaPlayerState->setPaused( FALSE ); 341 mediaPlayerState->setPaused( FALSE );
340 return; 342 return;
341 } else if( !mediaPlayerState->isPaused ) { 343 } else if( !mediaPlayerState->isPaused ) {
342 setToggleButton( i, TRUE ); 344 setToggleButton( i, TRUE );
343 mediaPlayerState->setPaused( TRUE ); 345 mediaPlayerState->setPaused( TRUE );
344 return; 346 return;
345 } else { 347 } else {
346 // setToggleButton( i, TRUE ); 348 return;
347 // mediaPlayerState->setPlaying( videoButtons[i].isDown );
348 } 349 }
349 } 350 }
350 351
351 case VideoStop: mediaPlayerState->setPlaying( FALSE ); return; 352 case VideoStop: mediaPlayerState->setPlaying( FALSE ); return;
352 case VideoNext: mediaPlayerState->setNext(); return; 353 case VideoNext: mediaPlayerState->setNext(); return;
353 case VideoPrevious: mediaPlayerState->setPrev(); return; 354 case VideoPrevious: mediaPlayerState->setPrev(); return;
354 case VideoVolUp: emit moreReleased(); return; 355 case VideoVolUp: emit moreReleased(); return;
355 case VideoVolDown: emit lessReleased(); return; 356 case VideoVolDown: emit lessReleased(); return;
@@ -373,30 +374,36 @@ void VideoWidget::mouseReleaseEvent( QMouseEvent *event ) {
373} 374}
374 375
375void VideoWidget::showEvent( QShowEvent* ) { 376void VideoWidget::showEvent( QShowEvent* ) {
376 QMouseEvent event( QEvent::MouseMove, QPoint( 0, 0 ), 0, 0 ); 377 QMouseEvent event( QEvent::MouseMove, QPoint( 0, 0 ), 0, 0 );
377 mouseMoveEvent( &event ); 378 mouseMoveEvent( &event );
378} 379}
379 380
380 381
382 void VideoWidget::backToNormal() {
383 mediaPlayerState->setFullscreen( FALSE );
384 makeVisible();
385 }
386
381void VideoWidget::makeVisible() { 387void VideoWidget::makeVisible() {
382 if ( mediaPlayerState->fullscreen() ) { 388 if ( mediaPlayerState->fullscreen() ) {
383 setBackgroundMode( QWidget::NoBackground ); 389 setBackgroundMode( QWidget::NoBackground );
384 showFullScreen(); 390 showFullScreen();
385 resize( qApp->desktop()->size() ); 391 resize( qApp->desktop()->size() );
386 slider->hide(); 392 slider->hide();
387 videoFrame-> setGeometry ( 0, 0, width ( ), height ( )); 393 videoFrame-> setGeometry ( 0, 0, width ( ), height ( ));
388 } else { 394
389 showNormal(); 395 } else {
390 showMaximized(); 396 showNormal();
391 slider->show(); 397 showMaximized();
392 videoFrame->setGeometry( QRect( 10, 20, 220, 160 ) ); 398 slider->show();
393 qApp->processEvents(); 399 videoFrame->setGeometry( QRect( 0, 30, 240, 170 ) );
394 } 400 qApp->processEvents();
401 }
395} 402}
396 403
397 404
398void VideoWidget::paintEvent( QPaintEvent * pe) { 405void VideoWidget::paintEvent( QPaintEvent * pe) {
399 QPainter p( this ); 406 QPainter p( this );
400 407
401 if ( mediaPlayerState->fullscreen() ) { 408 if ( mediaPlayerState->fullscreen() ) {
402 // Clear the background 409 // Clear the background
diff --git a/noncore/multimedia/opieplayer2/videowidget.h b/noncore/multimedia/opieplayer2/videowidget.h
index b35558b..990fa5f 100644
--- a/noncore/multimedia/opieplayer2/videowidget.h
+++ b/noncore/multimedia/opieplayer2/videowidget.h
@@ -61,16 +61,17 @@ public:
61 XineVideoWidget* vidWidget(); 61 XineVideoWidget* vidWidget();
62public slots: 62public slots:
63 void updateSlider( long, long ); 63 void updateSlider( long, long );
64 void sliderPressed( ); 64 void sliderPressed( );
65 void sliderReleased( ); 65 void sliderReleased( );
66 void setPlaying( bool b); 66 void setPlaying( bool b);
67 void setFullscreen( bool b ); 67 void setFullscreen( bool b );
68 void makeVisible(); 68 void makeVisible();
69 void backToNormal();
69 void setPosition( long ); 70 void setPosition( long );
70 void setLength( long ); 71 void setLength( long );
71 void setView( char ); 72 void setView( char );
72 73
73signals: 74signals:
74 void moreClicked(); 75 void moreClicked();
75 void lessClicked(); 76 void lessClicked();
76 void moreReleased(); 77 void moreReleased();
diff --git a/noncore/multimedia/opieplayer2/xinevideowidget.cpp b/noncore/multimedia/opieplayer2/xinevideowidget.cpp
index d65006b..3e28e54 100644
--- a/noncore/multimedia/opieplayer2/xinevideowidget.cpp
+++ b/noncore/multimedia/opieplayer2/xinevideowidget.cpp
@@ -1,12 +1,12 @@
1 1
2/* 2/*
3                This file is part of the Opie Project 3                This file is part of the Opie Project
4 4
5              Copyright (c) 2002 Max Reiss <harlekin@handhelds.org> 5              Copyright (c) 2002 Max Reiss <harlekin@handhelds.org>
6 Copyright (c) 2002 LJP <> 6 Copyright (c) 2002 LJP <>
7 Copyright (c) 2002 Holger Freyther <zecke@handhelds.org> 7 Copyright (c) 2002 Holger Freyther <zecke@handhelds.org>
8 =. 8 =.
9 .=l. 9 .=l.
10           .>+-= 10           .>+-=
11 _;:,     .>    :=|. This program is free software; you can 11 _;:,     .>    :=|. This program is free software; you can
12.> <`_,   >  .   <= redistribute it and/or modify it under 12.> <`_,   >  .   <= redistribute it and/or modify it under
@@ -24,17 +24,17 @@
24++=   -.     .`     .: details. 24++=   -.     .`     .: details.
25 :     =  ...= . :.=- 25 :     =  ...= . :.=-
26 -.   .:....=;==+<; You should have received a copy of the GNU 26 -.   .:....=;==+<; You should have received a copy of the GNU
27  -_. . .   )=.  = Library General Public License along with 27  -_. . .   )=.  = Library General Public License along with
28    --        :-=` this library; see the file COPYING.LIB. 28    --        :-=` this library; see the file COPYING.LIB.
29 If not, write to the Free Software Foundation, 29 If not, write to the Free Software Foundation,
30 Inc., 59 Temple Place - Suite 330, 30 Inc., 59 Temple Place - Suite 330,
31 Boston, MA 02111-1307, USA. 31 Boston, MA 02111-1307, USA.
32 32
33*/ 33*/
34 34
35#include <qimage.h> 35#include <qimage.h>
36#include <qpainter.h> 36#include <qpainter.h>
37#include <qgfx_qws.h> 37#include <qgfx_qws.h>
38#include <qdirectpainter_qws.h> 38#include <qdirectpainter_qws.h>
39#include <qgfx_qws.h> 39#include <qgfx_qws.h>
40#include <qsize.h> 40#include <qsize.h>
@@ -45,36 +45,36 @@
45 45
46#include "xinevideowidget.h" 46#include "xinevideowidget.h"
47 47
48 48
49static inline void memcpy_rev ( void *dst, void *src, size_t len ) 49static inline void memcpy_rev ( void *dst, void *src, size_t len )
50{ 50{
51 ((char *) src ) += len; 51 ((char *) src ) += len;
52 52
53 len >>= 1; 53 len >>= 1;
54 while ( len-- ) 54 while ( len-- )
55 *((short int *) dst )++ = *--((short int *) src ); 55 *((short int *) dst )++ = *--((short int *) src );
56} 56}
57 57
58static inline void memcpy_step ( void *dst, void *src, size_t len, size_t step ) 58static inline void memcpy_step ( void *dst, void *src, size_t len, size_t step )
59{ 59{
60 len >>= 1; 60 len >>= 1;
61 while ( len-- ) { 61 while ( len-- ) {
62 *((short int *) dst )++ = *((short int *) src ); 62 *((short int *) dst )++ = *((short int *) src );
63 ((char *) src ) += step; 63 ((char *) src ) += step;
64 } 64 }
65} 65}
66 66
67static inline void memcpy_step_rev ( void *dst, void *src, size_t len, size_t step ) 67static inline void memcpy_step_rev ( void *dst, void *src, size_t len, size_t step )
68{ 68{
69 len >>= 1; 69 len >>= 1;
70 70
71 ((char *) src ) += ( len * step ); 71 ((char *) src ) += ( len * step );
72 72
73 while ( len-- ) { 73 while ( len-- ) {
74 ((char *) src ) -= step; 74 ((char *) src ) -= step;
75 *((short int *) dst )++ = *((short int *) src ); 75 *((short int *) dst )++ = *((short int *) src );
76 } 76 }
77} 77}
78 78
79 79
80XineVideoWidget::XineVideoWidget ( QWidget* parent, const char* name ) 80XineVideoWidget::XineVideoWidget ( QWidget* parent, const char* name )
@@ -108,95 +108,95 @@ void XineVideoWidget::paintEvent ( QPaintEvent * )
108 QPainter p ( this ); 108 QPainter p ( this );
109 p. fillRect ( rect ( ), black ); 109 p. fillRect ( rect ( ), black );
110 if ( m_image ) 110 if ( m_image )
111 p. drawImage ( 0, 0, *m_image ); 111 p. drawImage ( 0, 0, *m_image );
112 //qWarning ( "logo\n" ); 112 //qWarning ( "logo\n" );
113 } 113 }
114 else { 114 else {
115// qWarning ( "paintevent\n" ); 115// qWarning ( "paintevent\n" );
116 116
117 QArray <QRect> qt_bug_workaround_clip_rects; 117 QArray <QRect> qt_bug_workaround_clip_rects;
118 118
119 { 119 {
120 QDirectPainter dp ( this ); 120 QDirectPainter dp ( this );
121 121
122 int rot = dp. transformOrientation ( ) + m_rotation; 122 int rot = dp. transformOrientation ( ) + m_rotation;
123 123
124 uchar *fb = dp. frameBuffer ( ); 124 uchar *fb = dp. frameBuffer ( );
125 uchar *frame = m_buff; // rot == 0 ? m_buff : m_buff + ( m_thisframe. height ( ) - 1 ) * m_bytes_per_line_frame; 125 uchar *frame = m_buff; // rot == 0 ? m_buff : m_buff + ( m_thisframe. height ( ) - 1 ) * m_bytes_per_line_frame;
126 126
127 QRect framerect = qt_screen-> mapToDevice ( QRect ( mapToGlobal ( m_thisframe. topLeft ( )), m_thisframe. size ( )), QSize ( qt_screen-> width ( ), qt_screen-> height ( ))); 127 QRect framerect = qt_screen-> mapToDevice ( QRect ( mapToGlobal ( m_thisframe. topLeft ( )), m_thisframe. size ( )), QSize ( qt_screen-> width ( ), qt_screen-> height ( )));
128 128
129 qt_bug_workaround_clip_rects. resize ( dp. numRects ( )); 129 qt_bug_workaround_clip_rects. resize ( dp. numRects ( ));
130 130
131 for ( int i = dp. numRects ( ) - 1; i >= 0; i-- ) { 131 for ( int i = dp. numRects ( ) - 1; i >= 0; i-- ) {
132 const QRect &clip = dp. rect ( i ); 132 const QRect &clip = dp. rect ( i );
133 133
134 qt_bug_workaround_clip_rects [i] = qt_screen-> mapFromDevice ( clip, QSize ( qt_screen-> width ( ), qt_screen-> height ( ))); 134 qt_bug_workaround_clip_rects [i] = qt_screen-> mapFromDevice ( clip, QSize ( qt_screen-> width ( ), qt_screen-> height ( )));
135 135
136 uchar *dst = fb + ( clip. x ( ) * m_bytes_per_pixel ) + ( clip. y ( ) * m_bytes_per_line_fb ); 136 uchar *dst = fb + ( clip. x ( ) * m_bytes_per_pixel ) + ( clip. y ( ) * m_bytes_per_line_fb );
137 uchar *src = frame; 137 uchar *src = frame;
138 138
139 switch ( rot ) { 139 switch ( rot ) {
140 case 0: src += ( (( clip. x ( ) - framerect. x ( )) * m_bytes_per_pixel ) + (( clip. y ( ) - framerect. y ( )) * m_bytes_per_line_frame ) ); break; 140 case 0: src += ( (( clip. x ( ) - framerect. x ( )) * m_bytes_per_pixel ) + (( clip. y ( ) - framerect. y ( )) * m_bytes_per_line_frame ) ); break;
141 case 1: src += ( (( clip. y ( ) - framerect. y ( )) * m_bytes_per_pixel ) + (( clip. x ( ) - framerect. x ( )) * m_bytes_per_line_frame ) + (( framerect. height ( ) - 1 ) * m_bytes_per_pixel ) ); break; 141 case 1: src += ( (( clip. y ( ) - framerect. y ( )) * m_bytes_per_pixel ) + (( clip. x ( ) - framerect. x ( )) * m_bytes_per_line_frame ) + (( framerect. height ( ) - 1 ) * m_bytes_per_pixel ) ); break;
142 case 2: src += ( (( clip. x ( ) - framerect. x ( )) * m_bytes_per_pixel ) + (( clip. y ( ) - framerect. y ( )) * m_bytes_per_line_frame ) + (( framerect. height ( ) - 1 ) * m_bytes_per_line_frame ) ); break; 142 case 2: src += ( (( clip. x ( ) - framerect. x ( )) * m_bytes_per_pixel ) + (( clip. y ( ) - framerect. y ( )) * m_bytes_per_line_frame ) + (( framerect. height ( ) - 1 ) * m_bytes_per_line_frame ) ); break;
143 case 3: src += ( (( clip. y ( ) - framerect. y ( )) * m_bytes_per_pixel ) + (( clip. x ( ) - framerect. x ( )) * m_bytes_per_line_frame ) ); break; 143 case 3: src += ( (( clip. y ( ) - framerect. y ( )) * m_bytes_per_pixel ) + (( clip. x ( ) - framerect. x ( )) * m_bytes_per_line_frame ) ); break;
144 } 144 }
145 145
146 uint leftfill = 0; 146 uint leftfill = 0;
147 uint framefill = 0; 147 uint framefill = 0;
148 uint rightfill = 0; 148 uint rightfill = 0;
149 uint clipwidth = clip. width ( ) * m_bytes_per_pixel; 149 uint clipwidth = clip. width ( ) * m_bytes_per_pixel;
150 150
151 if ( clip. left ( ) < framerect. left ( )) 151 if ( clip. left ( ) < framerect. left ( ))
152 leftfill = (( framerect. left ( ) - clip. left ( )) * m_bytes_per_pixel ) <? clipwidth; 152 leftfill = (( framerect. left ( ) - clip. left ( )) * m_bytes_per_pixel ) <? clipwidth;
153 if ( clip. right ( ) > framerect. right ( )) 153 if ( clip. right ( ) > framerect. right ( ))
154 rightfill = (( clip. right ( ) - framerect. right ( )) * m_bytes_per_pixel ) <? clipwidth; 154 rightfill = (( clip. right ( ) - framerect. right ( )) * m_bytes_per_pixel ) <? clipwidth;
155 155
156 framefill = clipwidth - ( leftfill + rightfill ); 156 framefill = clipwidth - ( leftfill + rightfill );
157 157
158 for ( int y = clip. top ( ); y <= clip. bottom ( ); y++ ) { 158 for ( int y = clip. top ( ); y <= clip. bottom ( ); y++ ) {
159 if (( y < framerect. top ( )) || ( y > framerect. bottom ( ))) { 159 if (( y < framerect. top ( )) || ( y > framerect. bottom ( ))) {
160 memset ( dst, 0, clipwidth ); 160 memset ( dst, 0, clipwidth );
161 } 161 }
162 else { 162 else {
163 if ( leftfill ) 163 if ( leftfill )
164 memset ( dst, 0, leftfill ); 164 memset ( dst, 0, leftfill );
165 165
166 if ( framefill ) { 166 if ( framefill ) {
167 switch ( rot ) { 167 switch ( rot ) {
168 case 0: memcpy ( dst + leftfill, src, framefill ); break; 168 case 0: memcpy ( dst + leftfill, src, framefill ); break;
169 case 1: memcpy_step ( dst + leftfill, src, framefill, m_bytes_per_line_frame ); break; 169 case 1: memcpy_step ( dst + leftfill, src, framefill, m_bytes_per_line_frame ); break;
170 case 2: memcpy_rev ( dst + leftfill, src, framefill ); break; 170 case 2: memcpy_rev ( dst + leftfill, src, framefill ); break;
171 case 3: memcpy_step_rev ( dst + leftfill, src, framefill, m_bytes_per_line_frame ); break; 171 case 3: memcpy_step_rev ( dst + leftfill, src, framefill, m_bytes_per_line_frame ); break;
172 } 172 }
173 } 173 }
174 if ( rightfill ) 174 if ( rightfill )
175 memset ( dst + leftfill + framefill, 0, rightfill ); 175 memset ( dst + leftfill + framefill, 0, rightfill );
176 } 176 }
177 177
178 dst += m_bytes_per_line_fb; 178 dst += m_bytes_per_line_fb;
179 179
180 switch ( rot ) { 180 switch ( rot ) {
181 case 0: src += m_bytes_per_line_frame; break; 181 case 0: src += m_bytes_per_line_frame; break;
182 case 1: src -= m_bytes_per_pixel; break; 182 case 1: src -= m_bytes_per_pixel; break;
183 case 2: src -= m_bytes_per_line_frame; break; 183 case 2: src -= m_bytes_per_line_frame; break;
184 case 3: src += m_bytes_per_pixel; break; 184 case 3: src += m_bytes_per_pixel; break;
185 } 185 }
186 } 186 }
187 } 187 }
188 } 188 }
189 //qWarning ( " ||| painting |||" ); 189 //qWarning ( " ||| painting |||" );
190 { 190 {
191 // QVFB hack by MArtin Jones 191 // QVFB hack by MArtin Jones
192 QPainter p ( this ); 192 QPainter p ( this );
193 193
194 for ( int i = qt_bug_workaround_clip_rects. size ( ) - 1; i >= 0; i-- ) { 194 for ( int i = qt_bug_workaround_clip_rects. size ( ) - 1; i >= 0; i-- ) {
195 p. fillRect ( QRect ( mapFromGlobal ( qt_bug_workaround_clip_rects [i]. topLeft ( )), qt_bug_workaround_clip_rects [i]. size ( )), QBrush ( NoBrush ) ); 195 p. fillRect ( QRect ( mapFromGlobal ( qt_bug_workaround_clip_rects [i]. topLeft ( )), qt_bug_workaround_clip_rects [i]. size ( )), QBrush ( NoBrush ) );
196 } 196 }
197 } 197 }
198 } 198 }
199 //qWarning( "painting >>>" ); 199 //qWarning( "painting >>>" );
200} 200}
201 201
202 202
@@ -226,43 +226,45 @@ void XineVideoWidget::setImage ( uchar* img, int w, int h, int bpl )
226 226
227 repaint ((( m_thisframe & m_lastframe ) != m_lastframe ) ? m_lastframe : m_thisframe, false ); 227 repaint ((( m_thisframe & m_lastframe ) != m_lastframe ) ? m_lastframe : m_thisframe, false );
228} 228}
229 229
230void XineVideoWidget::resizeEvent ( QResizeEvent * ) 230void XineVideoWidget::resizeEvent ( QResizeEvent * )
231{ 231{
232 QSize s = size ( ); 232 QSize s = size ( );
233 bool fs = ( s == qApp-> desktop ( )-> size ( )); 233 bool fs = ( s == qApp-> desktop ( )-> size ( ));
234 234
235 m_rotation = fs ? -qt_screen-> transformOrientation ( ) : 0; 235 m_rotation = fs ? -qt_screen-> transformOrientation ( ) : 0;
236 236
237 if ( fs && qt_screen-> isTransformed ( )) { 237 if ( fs && qt_screen-> isTransformed ( )) {
238 s = qt_screen-> mapToDevice ( s ); 238 s = qt_screen-> mapToDevice ( s );
239 } 239 }
240 240
241// qDebug ( "\n\nResize: %dx%d, Rot: %d", s.width(),s.height(),m_rotation ); 241// qDebug ( "\n\nResize: %dx%d, Rot: %d", s.width(),s.height(),m_rotation );
242 242
243 emit videoResized ( s ); 243 emit videoResized ( s );
244} 244}
245 245
246 246
247void XineVideoWidget::mousePressEvent ( QMouseEvent *me ) 247void XineVideoWidget::mousePressEvent ( QMouseEvent *me )
248{ 248{
249 QWidget *p = parentWidget ( ); 249 QWidget *p = parentWidget ( );
250 250
251 if ( p ) { 251 if ( p ) {
252 QMouseEvent pme ( QEvent::MouseButtonPress, mapToParent ( me-> pos ( )), me-> globalPos ( ), me-> button ( ), me-> state ( )); 252 // QMouseEvent pme ( QEvent::MouseButtonPress, mapToParent ( me-> pos ( )), me-> globalPos ( ), me-> button ( ), me-> state ( ));
253 253
254 QApplication::sendEvent ( p, &pme ); 254 // QApplication::sendEvent ( p, &pme );
255 // emit clicked();
255 } 256 }
256} 257}
257 258
258void XineVideoWidget::mouseReleaseEvent ( QMouseEvent *me ) 259void XineVideoWidget::mouseReleaseEvent ( QMouseEvent *me )
259{ 260{
260 QWidget *p = parentWidget ( ); 261 QWidget *p = parentWidget ( );
261 262
262 if ( p ) { 263 if ( p ) {
263 QMouseEvent pme ( QEvent::MouseButtonRelease, mapToParent ( me-> pos ( )), me-> globalPos ( ), me-> button ( ), me-> state ( )); 264 // QMouseEvent pme ( QEvent::MouseButtonRelease, mapToParent ( me-> pos ( )), me-> globalPos ( ), me-> button ( ), me-> state ( ));
264 265
265 QApplication::sendEvent ( p, &pme ); 266 // QApplication::sendEvent ( p, &pme );
267 emit clicked();
266 } 268 }
267} 269}
268 270
diff --git a/noncore/multimedia/opieplayer2/xinevideowidget.h b/noncore/multimedia/opieplayer2/xinevideowidget.h
index 2fc627d..c5101da 100644
--- a/noncore/multimedia/opieplayer2/xinevideowidget.h
+++ b/noncore/multimedia/opieplayer2/xinevideowidget.h
@@ -42,30 +42,31 @@ class XineVideoWidget : public QWidget {
42 Q_OBJECT 42 Q_OBJECT
43public: 43public:
44 XineVideoWidget( QWidget* parent, const char* name ); 44 XineVideoWidget( QWidget* parent, const char* name );
45 ~XineVideoWidget(); 45 ~XineVideoWidget();
46 QImage *image() { return m_image; }; 46 QImage *image() { return m_image; };
47 void setImage( QImage* image ); 47 void setImage( QImage* image );
48 void setImage( uchar* image, int width, int height, int linestep); 48 void setImage( uchar* image, int width, int height, int linestep);
49 void clear() ; 49 void clear() ;
50 50
51protected: 51protected:
52 void paintEvent( QPaintEvent* p ); 52 void paintEvent( QPaintEvent* p );
53 void resizeEvent ( QResizeEvent *r ); 53 void resizeEvent ( QResizeEvent *r );
54 54
55 void mousePressEvent ( QMouseEvent *e ); 55 void mousePressEvent ( QMouseEvent *e );
56 void mouseReleaseEvent ( QMouseEvent *e ); 56 void mouseReleaseEvent ( QMouseEvent *e );
57 57
58signals: 58signals:
59 void videoResized ( const QSize &s ); 59 void clicked();
60 60 void videoResized ( const QSize &s );
61
61private: 62private:
62 QRect m_lastframe; 63 QRect m_lastframe;
63 QRect m_thisframe; 64 QRect m_thisframe;
64 65
65 uchar* m_buff; 66 uchar* m_buff;
66 int m_bytes_per_line_fb; 67 int m_bytes_per_line_fb;
67 int m_bytes_per_line_frame; 68 int m_bytes_per_line_frame;
68 int m_bytes_per_pixel; 69 int m_bytes_per_pixel;
69 QImage* m_image; 70 QImage* m_image;
70 int m_rotation; 71 int m_rotation;
71}; 72};