Diffstat (limited to 'noncore/multimedia/opieplayer2/videowidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index af06079..188b18d 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp | |||
@@ -32,7 +32,6 @@ | |||
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <qpe/resource.h> | 34 | #include <qpe/resource.h> |
35 | #include <qpe/mediaplayerplugininterface.h> | ||
36 | #include <qpe/config.h> | 35 | #include <qpe/config.h> |
37 | 36 | ||
38 | #include <qwidget.h> | 37 | #include <qwidget.h> |
@@ -87,7 +86,6 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) : | |||
87 | cfg.setGroup("VideoWidget"); | 86 | cfg.setGroup("VideoWidget"); |
88 | 87 | ||
89 | QString Button0aPix, Button0bPix, controlsPix; | 88 | QString Button0aPix, Button0bPix, controlsPix; |
90 | //backgroundPix=cfg.readEntry( "backgroundPix", "opieplayer/metalFinish"); | ||
91 | Button0aPix=cfg.readEntry( "Button0aPix", "opieplayer/mediaButton0a"); | 89 | Button0aPix=cfg.readEntry( "Button0aPix", "opieplayer/mediaButton0a"); |
92 | Button0bPix=cfg.readEntry( "Button0bPix","opieplayer/mediaButton0b"); | 90 | Button0bPix=cfg.readEntry( "Button0bPix","opieplayer/mediaButton0b"); |
93 | controlsPix=cfg.readEntry( "controlsPix","opieplayer/mediaControls0" ); | 91 | controlsPix=cfg.readEntry( "controlsPix","opieplayer/mediaControls0" ); |
@@ -106,13 +104,15 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) : | |||
106 | slider = new QSlider( Qt::Horizontal, this ); | 104 | slider = new QSlider( Qt::Horizontal, this ); |
107 | slider->setMinValue( 0 ); | 105 | slider->setMinValue( 0 ); |
108 | slider->setMaxValue( 1 ); | 106 | slider->setMaxValue( 1 ); |
109 | slider->setBackgroundPixmap( Resource::loadPixmap( backgroundPix ) ); | 107 | |
108 | slider->setBackgroundPixmap( *this->backgroundPixmap () ); //Resource::loadPixmap( backgroundPix ) ); | ||
109 | slider->setBackgroundOrigin( QWidget::ParentOrigin); | ||
110 | slider->setFocusPolicy( QWidget::NoFocus ); | 110 | slider->setFocusPolicy( QWidget::NoFocus ); |
111 | slider->setGeometry( QRect( 7, 250, 220, 20 ) ); | 111 | slider->setGeometry( QRect( 7, 250, 220, 20 ) ); |
112 | 112 | ||
113 | videoFrame = new XineVideoWidget ( this, "Video frame" ); | 113 | videoFrame = new XineVideoWidget ( this, "Video frame" ); |
114 | 114 | ||
115 | connect ( videoFrame, SIGNAL( videoResized ( const QSize & )), this, SIGNAL( videoResized ( const QSize & ))); | 115 | connect ( videoFrame, SIGNAL( videoResized ( const QSize & )), this, SIGNAL( videoResized ( const QSize & ))); |
116 | 116 | ||
117 | connect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); | 117 | connect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); |
118 | connect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); | 118 | connect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); |
@@ -244,7 +244,9 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) { | |||
244 | videoButtons[i].isHeld = FALSE; | 244 | videoButtons[i].isHeld = FALSE; |
245 | if ( !videoButtons[i].isToggle ) | 245 | if ( !videoButtons[i].isToggle ) |
246 | setToggleButton( i, FALSE ); | 246 | setToggleButton( i, FALSE ); |
247 | qDebug("button toggled3 %d",i); | ||
247 | } | 248 | } |
249 | |||
248 | } | 250 | } |
249 | switch (i) { | 251 | switch (i) { |
250 | case VideoPlay: mediaPlayerState->setPlaying(videoButtons[i].isDown); return; | 252 | case VideoPlay: mediaPlayerState->setPlaying(videoButtons[i].isDown); return; |
@@ -319,21 +321,6 @@ void VideoWidget::closeEvent( QCloseEvent* ) { | |||
319 | } | 321 | } |
320 | 322 | ||
321 | 323 | ||
322 | bool VideoWidget::playVideo() { | ||
323 | bool result = FALSE; | ||
324 | |||
325 | int stream = 0; | ||
326 | |||
327 | int sw = 240; | ||
328 | int sh = 320; | ||
329 | int dd = QPixmap::defaultDepth(); | ||
330 | int w = height(); | ||
331 | int h = width(); | ||
332 | |||
333 | return true; | ||
334 | } | ||
335 | |||
336 | |||
337 | 324 | ||
338 | void VideoWidget::keyReleaseEvent( QKeyEvent *e) | 325 | void VideoWidget::keyReleaseEvent( QKeyEvent *e) |
339 | { | 326 | { |
@@ -389,6 +376,6 @@ XineVideoWidget* VideoWidget::vidWidget() { | |||
389 | 376 | ||
390 | 377 | ||
391 | void VideoWidget::setFullscreen ( bool b ) | 378 | void VideoWidget::setFullscreen ( bool b ) |
392 | { | 379 | { |
393 | setToggleButton( VideoFullscreen, b ); | 380 | setToggleButton( VideoFullscreen, b ); |
394 | } \ No newline at end of file | 381 | } |