Diffstat (limited to 'core/multimedia/opieplayer/videowidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/videowidget.cpp | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/core/multimedia/opieplayer/videowidget.cpp b/core/multimedia/opieplayer/videowidget.cpp index 164458b..e851044 100644 --- a/core/multimedia/opieplayer/videowidget.cpp +++ b/core/multimedia/opieplayer/videowidget.cpp | |||
@@ -18,13 +18,18 @@ | |||
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | |||
21 | #include "videowidget.h" | ||
22 | #include "mediaplayerstate.h" | ||
23 | |||
24 | /* OPIE */ | ||
20 | #include <qpe/resource.h> | 25 | #include <qpe/resource.h> |
21 | #include <qpe/mediaplayerplugininterface.h> | 26 | #include <qpe/mediaplayerplugininterface.h> |
22 | #include <qpe/config.h> | 27 | #include <qpe/config.h> |
23 | #include <qpe/qpeapplication.h> | 28 | #include <qpe/qpeapplication.h> |
29 | #include <opie2/odebug.h> | ||
24 | 30 | ||
31 | /* QT */ | ||
25 | #include <qdir.h> | 32 | #include <qdir.h> |
26 | #include <qslider.h> | 33 | #include <qslider.h> |
27 | #include "videowidget.h" | ||
28 | #include "mediaplayerstate.h" | ||
29 | 34 | ||
30 | 35 | ||
@@ -83,5 +88,5 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) : | |||
83 | skinPath = "opieplayer2/skins/default"; | 88 | skinPath = "opieplayer2/skins/default"; |
84 | 89 | ||
85 | // qDebug("skin path " + skinPath); | 90 | // odebug << "skin path " + skinPath << oendl; |
86 | 91 | ||
87 | // QString skinPath = "opieplayer2/skins/" + skin; | 92 | // QString skinPath = "opieplayer2/skins/" + skin; |
@@ -97,5 +102,5 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) : | |||
97 | QString filename = QString( QPEApplication::qpeDir() + "/pics/" + skinPath + | 102 | QString filename = QString( QPEApplication::qpeDir() + "/pics/" + skinPath + |
98 | "/skinV_mask_" + skinV_mask_file_names[i] + ".png" ); | 103 | "/skinV_mask_" + skinV_mask_file_names[i] + ".png" ); |
99 | // qDebug("loading "+filename); | 104 | // odebug << "loading "+filename << oendl; |
100 | masks[i] = new QBitmap( filename ); | 105 | masks[i] = new QBitmap( filename ); |
101 | 106 | ||
@@ -112,5 +117,5 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) : | |||
112 | } | 117 | } |
113 | } | 118 | } |
114 | // qDebug("finished loading first pics"); | 119 | // odebug << "finished loading first pics" << oendl; |
115 | for ( int i = 0; i < 7; i++ ) { | 120 | for ( int i = 0; i < 7; i++ ) { |
116 | buttonPixUp[i] = NULL; | 121 | buttonPixUp[i] = NULL; |
@@ -119,14 +124,14 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) : | |||
119 | 124 | ||
120 | 125 | ||
121 | QWidget *d = QApplication::desktop(); | 126 | QWidget *d = QApplication::desktop(); |
122 | int width = d->width(); | 127 | int width = d->width(); |
123 | int height = d->height(); | 128 | int height = d->height(); |
124 | 129 | ||
125 | if( (width != pixBg->width() ) || (height != pixBg->height() ) ) { | 130 | if( (width != pixBg->width() ) || (height != pixBg->height() ) ) { |
126 | // qDebug("<<<<<<<< scale image >>>>>>>>>>>>"); | 131 | // odebug << "<<<<<<<< scale image >>>>>>>>>>>>" << oendl; |
127 | QImage img; | 132 | QImage img; |
128 | img = pixBg->convertToImage(); | 133 | img = pixBg->convertToImage(); |
129 | pixBg->convertFromImage( img.smoothScale( width, height)); | 134 | pixBg->convertFromImage( img.smoothScale( width, height)); |
130 | } | 135 | } |
131 | setBackgroundPixmap( *pixBg ); | 136 | setBackgroundPixmap( *pixBg ); |
132 | 137 | ||
@@ -354,5 +359,5 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) { | |||
354 | 359 | ||
355 | case VideoPlay: { | 360 | case VideoPlay: { |
356 | // qDebug("play"); | 361 | // odebug << "play" << oendl; |
357 | if( !mediaPlayerState->playing()) { | 362 | if( !mediaPlayerState->playing()) { |
358 | mediaPlayerState->setPlaying( true); | 363 | mediaPlayerState->setPlaying( true); |
@@ -362,10 +367,10 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) { | |||
362 | } | 367 | } |
363 | if( mediaPlayerState->isPaused ) { | 368 | if( mediaPlayerState->isPaused ) { |
364 | // qDebug("isPaused"); | 369 | // odebug << "isPaused" << oendl; |
365 | setToggleButton( i, FALSE ); | 370 | setToggleButton( i, FALSE ); |
366 | mediaPlayerState->setPaused( FALSE ); | 371 | mediaPlayerState->setPaused( FALSE ); |
367 | return; | 372 | return; |
368 | } else if( !mediaPlayerState->isPaused ) { | 373 | } else if( !mediaPlayerState->isPaused ) { |
369 | // qDebug("is not paused"); | 374 | // odebug << "is not paused" << oendl; |
370 | setToggleButton( i, TRUE ); | 375 | setToggleButton( i, TRUE ); |
371 | mediaPlayerState->setPaused( TRUE ); | 376 | mediaPlayerState->setPaused( TRUE ); |
@@ -459,5 +464,5 @@ void VideoWidget::closeEvent( QCloseEvent* ) { | |||
459 | bool VideoWidget::playVideo() { | 464 | bool VideoWidget::playVideo() { |
460 | bool result = FALSE; | 465 | bool result = FALSE; |
461 | // qDebug("<<<<<<<<<<<<<<<< play video"); | 466 | // odebug << "<<<<<<<<<<<<<<<< play video" << oendl; |
462 | int stream = 0; | 467 | int stream = 0; |
463 | 468 | ||