author | llornkcor <llornkcor> | 2002-06-29 05:31:39 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-06-29 05:31:39 (UTC) |
commit | 0252b90a4b2e7be6186518eaa12ea03ef26ae08c (patch) (unidiff) | |
tree | 89ee92dbbe5475da4c527a9fb67fd1bb9ccb1b14 /core/multimedia/opieplayer/audiowidget.cpp | |
parent | 444ccb7e2adcb9b6690c6f9bba2c9185213e3ee7 (diff) | |
download | opie-0252b90a4b2e7be6186518eaa12ea03ef26ae08c.zip opie-0252b90a4b2e7be6186518eaa12ea03ef26ae08c.tar.gz opie-0252b90a4b2e7be6186518eaa12ea03ef26ae08c.tar.bz2 |
take out resource intensive animated button, that I bet no one knew was there anyway.
Diffstat (limited to 'core/multimedia/opieplayer/audiowidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/audiowidget.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/core/multimedia/opieplayer/audiowidget.cpp b/core/multimedia/opieplayer/audiowidget.cpp index 54e7ceb..b96b1ef 100644 --- a/core/multimedia/opieplayer/audiowidget.cpp +++ b/core/multimedia/opieplayer/audiowidget.cpp | |||
@@ -73,19 +73,19 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : | |||
73 | // layout->setMargin( 2); | 73 | // layout->setMargin( 2); |
74 | QString backgroundPix, buttonsAllPix, buttonsBigPix, controlsPix, animatedPix; | 74 | QString backgroundPix, buttonsAllPix, buttonsBigPix, controlsPix, animatedPix; |
75 | backgroundPix=cfg.readEntry( " backgroundPix", "opieplayer/metalFinish"); | 75 | backgroundPix=cfg.readEntry( " backgroundPix", "opieplayer/metalFinish"); |
76 | buttonsAllPix=cfg.readEntry( "buttonsAllPix","opieplayer/mediaButtonsAll"); | 76 | buttonsAllPix=cfg.readEntry( "buttonsAllPix","opieplayer/mediaButtonsAll"); |
77 | buttonsBigPix=cfg.readEntry( "buttonsBigPix","opieplayer/mediaButtonsBig"); | 77 | buttonsBigPix=cfg.readEntry( "buttonsBigPix","opieplayer/mediaButtonsBig"); |
78 | controlsPix=cfg.readEntry( "controlsPix","opieplayer/mediaControls"); | 78 | controlsPix=cfg.readEntry( "controlsPix","opieplayer/mediaControls"); |
79 | animatedPix=cfg.readEntry( "animatedPix", "opieplayer/animatedButton"); | 79 | // animatedPix=cfg.readEntry( "animatedPix", "opieplayer/animatedButton"); |
80 | 80 | ||
81 | setBackgroundPixmap( Resource::loadPixmap( backgroundPix) ); | 81 | setBackgroundPixmap( Resource::loadPixmap( backgroundPix) ); |
82 | pixmaps[0] = new QPixmap( Resource::loadPixmap( buttonsAllPix ) ); | 82 | pixmaps[0] = new QPixmap( Resource::loadPixmap( buttonsAllPix ) ); |
83 | pixmaps[1] = new QPixmap( Resource::loadPixmap( buttonsBigPix ) ); | 83 | pixmaps[1] = new QPixmap( Resource::loadPixmap( buttonsBigPix ) ); |
84 | pixmaps[2] = new QPixmap( Resource::loadPixmap( controlsPix ) ); | 84 | pixmaps[2] = new QPixmap( Resource::loadPixmap( controlsPix ) ); |
85 | pixmaps[3] = new QPixmap( Resource::loadPixmap( animatedPix) ); | 85 | // pixmaps[3] = new QPixmap( Resource::loadPixmap( animatedPix) ); |
86 | 86 | ||
87 | songInfo = new Ticker( this ); | 87 | songInfo = new Ticker( this ); |
88 | songInfo->setFocusPolicy( QWidget::NoFocus ); | 88 | songInfo->setFocusPolicy( QWidget::NoFocus ); |
89 | songInfo->setGeometry( QRect( 7, 3, 220, 20 ) ); | 89 | songInfo->setGeometry( QRect( 7, 3, 220, 20 ) ); |
90 | // layout->addMultiCellWidget( songInfo, 0, 0, 0, 2 ); | 90 | // layout->addMultiCellWidget( songInfo, 0, 0, 0, 2 ); |
91 | 91 | ||
@@ -117,13 +117,13 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : | |||
117 | 117 | ||
118 | } | 118 | } |
119 | 119 | ||
120 | 120 | ||
121 | AudioWidget::~AudioWidget() { | 121 | AudioWidget::~AudioWidget() { |
122 | mediaPlayerState->isStreaming = FALSE; | 122 | mediaPlayerState->isStreaming = FALSE; |
123 | for ( int i = 0; i < 4; i++ ) | 123 | for ( int i = 0; i < 3; i++ ) |
124 | delete pixmaps[i]; | 124 | delete pixmaps[i]; |
125 | } | 125 | } |
126 | 126 | ||
127 | 127 | ||
128 | static bool audioSliderBeingMoved = FALSE; | 128 | static bool audioSliderBeingMoved = FALSE; |
129 | 129 | ||
@@ -217,18 +217,18 @@ void AudioWidget::paintButton( QPainter *p, int i ) { | |||
217 | 217 | ||
218 | 218 | ||
219 | void AudioWidget::timerEvent( QTimerEvent * ) { | 219 | void AudioWidget::timerEvent( QTimerEvent * ) { |
220 | static int frame = 0; | 220 | static int frame = 0; |
221 | if ( !mediaPlayerState->paused() && audioButtons[ AudioPlay ].isDown ) { | 221 | if ( !mediaPlayerState->paused() && audioButtons[ AudioPlay ].isDown ) { |
222 | frame = frame >= 7 ? 0 : frame + 1; | 222 | frame = frame >= 7 ? 0 : frame + 1; |
223 | int x = audioButtons[AudioPlay].xPos; | 223 | // int x = audioButtons[AudioPlay].xPos; |
224 | int y = audioButtons[AudioPlay].yPos; | 224 | // int y = audioButtons[AudioPlay].yPos; |
225 | QPainter p( this ); | 225 | // QPainter p( this ); |
226 | // Optimize to only draw the little bit of the changing images which is different | 226 | // // Optimize to only draw the little bit of the changing images which is different |
227 | p.drawPixmap( x + 14, y + 8, *pixmaps[3], 32 * frame, 0, 32, 32 ); | 227 | // p.drawPixmap( x + 14, y + 8, *pixmaps[3], 32 * frame, 0, 32, 32 ); |
228 | p.drawPixmap( x + 37, y + 37, *pixmaps[2], 18 * AudioPlay, 0, 6, 3 ); | 228 | // p.drawPixmap( x + 37, y + 37, *pixmaps[2], 18 * AudioPlay, 0, 6, 3 ); |
229 | } | 229 | } |
230 | } | 230 | } |
231 | 231 | ||
232 | 232 | ||
233 | void AudioWidget::mouseMoveEvent( QMouseEvent *event ) { | 233 | void AudioWidget::mouseMoveEvent( QMouseEvent *event ) { |
234 | for ( int i = 0; i < numButtons; i++ ) { | 234 | for ( int i = 0; i < numButtons; i++ ) { |