author | harlekin <harlekin> | 2002-07-03 15:42:34 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-07-03 15:42:34 (UTC) |
commit | 3035c46ce448317f786d974094f78ce43e594a57 (patch) (side-by-side diff) | |
tree | f0c84f34ee2ecbae4d00ed6cfde3cb955802a470 /noncore/multimedia/opieplayer2/audiowidget.cpp | |
parent | e1e4956ec7ffa9a07f98b03e831f0f9627556a6c (diff) | |
download | opie-3035c46ce448317f786d974094f78ce43e594a57.zip opie-3035c46ce448317f786d974094f78ce43e594a57.tar.gz opie-3035c46ce448317f786d974094f78ce43e594a57.tar.bz2 |
even more code cleanups .-)
Diffstat (limited to 'noncore/multimedia/opieplayer2/audiowidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 1b0de5d..125fd72 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp @@ -52,23 +52,19 @@ void Ticker::drawContents( QPainter *p ) { pmp.drawText( i - pos, 0, INT_MAX, height(), AlignVCenter, scrollText ); } p->drawPixmap( 0, 0, pm ); } - - struct MediaButton { int xPos, yPos; int color; bool isToggle, isBig, isHeld, isDown; }; - - // Layout information for the audioButtons (and if it is a toggle button or not) MediaButton audioButtons[] = { { 3*30-15+xo, 3*30-13+yo, 0, TRUE, TRUE, FALSE, FALSE }, // play { 1*30+xo, 5*30+yo, 2, FALSE, FALSE, FALSE, FALSE }, // stop { 5*30+xo, 5*30+yo, 2, TRUE, FALSE, FALSE, FALSE }, // pause { 6*30-5+xo, 3*30+yo, 1, FALSE, FALSE, FALSE, FALSE }, // next @@ -80,14 +76,13 @@ MediaButton audioButtons[] = { }; static const int numButtons = (sizeof(audioButtons)/sizeof(MediaButton)); AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : - QWidget( parent, name, f ) -{ + QWidget( parent, name, f ) { setCaption( tr("OpiePlayer - Audio") ); Config cfg("OpiePlayer"); cfg.setGroup("AudioWidget"); QString backgroundPix, buttonsAllPix, buttonsBigPix, controlsPix, animatedPix; backgroundPix=cfg.readEntry( " backgroundPix", "opieplayer/metalFinish"); @@ -124,16 +119,14 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : // Intialise state setLength( mediaPlayerState->length() ); setPosition( mediaPlayerState->position() ); setLooping( mediaPlayerState->fullscreen() ); setPaused( mediaPlayerState->paused() ); setPlaying( mediaPlayerState->playing() ); - } - AudioWidget::~AudioWidget() { mediaPlayerState->isStreaming = FALSE; for ( int i = 0; i < 3; i++ ) { delete pixmaps[i]; } } @@ -153,13 +146,12 @@ void AudioWidget::sliderReleased() { return; } long val = long((double)slider->value() * mediaPlayerState->length() / slider->width()); mediaPlayerState->setPosition( val ); } - void AudioWidget::setPosition( long i ) { // qDebug("set position %d",i); updateSlider( i, mediaPlayerState->length() ); } |