author | ar <ar> | 2004-05-02 17:04:41 (UTC) |
---|---|---|
committer | ar <ar> | 2004-05-02 17:04:41 (UTC) |
commit | 4d3379027557e251201b531896974a69ae4c665a (patch) (side-by-side diff) | |
tree | 6e813be1aa29131f8f8e91f532f38f8a381e38f4 /core/multimedia/opieplayer/audiowidget.cpp | |
parent | f8add41b2e0b0371754521b44d95f87fa70a6ff2 (diff) | |
download | opie-4d3379027557e251201b531896974a69ae4c665a.zip opie-4d3379027557e251201b531896974a69ae4c665a.tar.gz opie-4d3379027557e251201b531896974a69ae4c665a.tar.bz2 |
- convert qDebug to odebug
Diffstat (limited to 'core/multimedia/opieplayer/audiowidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/audiowidget.cpp | 63 |
1 files changed, 34 insertions, 29 deletions
diff --git a/core/multimedia/opieplayer/audiowidget.cpp b/core/multimedia/opieplayer/audiowidget.cpp index 7da2d54..376f8d3 100644 --- a/core/multimedia/opieplayer/audiowidget.cpp +++ b/core/multimedia/opieplayer/audiowidget.cpp @@ -18,12 +18,17 @@ ** **********************************************************************/ +#include "audiowidget.h" +#include "mediaplayerstate.h" + +/* OPIE */ #include <qpe/qpeapplication.h> #include <qpe/resource.h> #include <qpe/config.h> +#include <opie2/odebug.h> +/* QT */ #include <qdir.h> -#include "audiowidget.h" -#include "mediaplayerstate.h" +/* STD */ #include <stdlib.h> #include <stdio.h> @@ -72,6 +77,6 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : { setCaption( tr("OpiePlayer") ); - // qDebug("<<<<<audioWidget"); - + // odebug << "<<<<<audioWidget" << oendl; + Config cfg("OpiePlayer"); cfg.setGroup("Options"); @@ -85,7 +90,7 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : if(!QDir(QString(getenv("OPIEDIR")) +"/pics/"+skinPath).exists()) skinPath = "opieplayer2/skins/default"; - - // qDebug("skin path " + skinPath); - + + // odebug << "skin path " + skinPath << oendl; + pixBg = new QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); imgUp = new QImage( Resource::loadImage( QString("%1/skin_up").arg(skinPath) ) ); @@ -104,6 +109,6 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : for ( int y = 0; y < imgUp->height(); y++ ) { uchar *line = dest[y]; - for ( int x = 0; x < imgUp->width(); x++ ) - if ( !qRed( imgMask.pixel( x, y ) ) ) + for ( int x = 0; x < imgUp->width(); x++ ) + if ( !qRed( imgMask.pixel( x, y ) ) ) line[x] = i + 1; } @@ -117,18 +122,18 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : } - QWidget *d = QApplication::desktop(); - int width = d->width(); - int height = d->height(); + QWidget *d = QApplication::desktop(); + int width = d->width(); + int height = d->height(); if( (width != pixBg->width() ) || (height != pixBg->height() ) ) { -// qDebug("<<<<<<<< scale image >>>>>>>>>>>>"); - QImage img; - img = pixBg->convertToImage(); - pixBg->convertFromImage( img.smoothScale( width, height)); - } +// odebug << "<<<<<<<< scale image >>>>>>>>>>>>" << oendl; + QImage img; + img = pixBg->convertToImage(); + pixBg->convertFromImage( img.smoothScale( width, height)); + } setBackgroundPixmap( *pixBg); songInfo.setFocusPolicy( QWidget::NoFocus ); - + // changeTextColor( &songInfo ); // songInfo.setBackgroundColor( QColor( 167, 212, 167 )); @@ -137,5 +142,5 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : //NoFrame // songInfo.setForegroundColor(Qt::white); - + slider.setFixedHeight( 20 ); slider.setMinValue( 0 ); @@ -173,5 +178,5 @@ this->setFocus(); AudioWidget::~AudioWidget() { // setPlaying( false); - + for ( int i = 0; i < 10; i++ ) { if(buttonPixUp[i]) delete buttonPixUp[i]; @@ -254,5 +259,5 @@ void AudioWidget::sliderReleased() { void AudioWidget::setPosition( long i ) { -// qDebug("set position %d",i); +// odebug << "set position " << i << "" << oendl; long length = mediaPlayerState->length(); updateSlider( i, length ); @@ -301,5 +306,5 @@ void AudioWidget::updateSlider( long i, long max ) { this->setFocus(); time.setText( timeAsString( i ) + " / " + timeAsString( max ) ); - + if ( max == 0 ) return; @@ -367,6 +372,6 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) { && y < imgButtonMask->height() && imgButtonMask->pixelIndex( x, y ) == i + 1 ); -// if ( isOnButton && i == AudioVolumeUp ) -// qDebug("on up"); +// if ( isOnButton && i == AudioVolumeUp ) +// odebug << "on up" << oendl; if ( isOnButton && !audioButtons[i].isHeld ) { @@ -374,10 +379,10 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) { toggleButton(i); switch (i) { - case AudioVolumeUp: - // qDebug("more clicked"); - emit moreClicked(); + case AudioVolumeUp: + // odebug << "more clicked" << oendl; + emit moreClicked(); return; case AudioVolumeDown: - // qDebug("less clicked"); + // odebug << "less clicked" << oendl; emit lessClicked(); return; @@ -471,5 +476,5 @@ void AudioWidget::keyReleaseEvent( QKeyEvent *e) case Key_F9: //activity hide(); -// qDebug("Audio F9"); +// odebug << "Audio F9" << oendl; break; case Key_F10: //contacts |