summaryrefslogtreecommitdiff
authorsimon <simon>2002-12-09 13:24:25 (UTC)
committer simon <simon>2002-12-09 13:24:25 (UTC)
commit235ef0e11bfd61c0debb530de8598ae38a396914 (patch) (side-by-side diff)
treeee014a888c1130707fadd890d2cc4fa492ed01cb
parent94a4c102d20eb63104a66fd8fba141a716ae3623 (diff)
downloadopie-235ef0e11bfd61c0debb530de8598ae38a396914.zip
opie-235ef0e11bfd61c0debb530de8598ae38a396914.tar.gz
opie-235ef0e11bfd61c0debb530de8598ae38a396914.tar.bz2
- one global variable less
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp7
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.h1
2 files changed, 4 insertions, 4 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp
index 8f34736..adef247 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.cpp
+++ b/noncore/multimedia/opieplayer2/audiowidget.cpp
@@ -63,25 +63,27 @@ const char * const skin_mask_file_names[10] = {
void changeTextColor( QWidget * w) {
QPalette p = w->palette();
p.setBrush( QColorGroup::Background, QColor( 167, 212, 167 ) );
p.setBrush( QColorGroup::Base, QColor( 167, 212, 167 ) );
w->setPalette( p );
}
}
AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name) :
- MediaWidget( playList, mediaPlayerState, parent, name ), songInfo( this ), slider( Qt::Horizontal, this ), time( this ) {
+ MediaWidget( playList, mediaPlayerState, parent, name ), songInfo( this ), slider( Qt::Horizontal, this ), time( this ),
+ audioSliderBeingMoved( false )
+{
Button defaultButton;
defaultButton.isToggle = defaultButton.isHeld = defaultButton.isDown = false;
Button toggleButton;
toggleButton.isToggle = true;
toggleButton.isHeld = toggleButton.isDown = false;
buttons.reserve( 10 );
buttons.push_back( toggleButton ); // play
buttons.push_back( defaultButton ); // stop
buttons.push_back( defaultButton ); // next
buttons.push_back( defaultButton ); // previous
@@ -223,27 +225,24 @@ void AudioWidget::resizeEvent( QResizeEvent * ) {
QPixmap pixDn = combineImageWithBackground( imgDn, pixBg, p );
for ( int i = 0; i < 10; i++ ) {
if ( !masks[i]->isNull() ) {
delete buttonPixUp[i];
delete buttonPixDown[i];
buttonPixUp[i] = maskPixToMask( pixUp, *masks[i] );
buttonPixDown[i] = maskPixToMask( pixDn, *masks[i] );
}
}
}
-static bool audioSliderBeingMoved = FALSE;
-
-
void AudioWidget::sliderPressed() {
audioSliderBeingMoved = TRUE;
}
void AudioWidget::sliderReleased() {
audioSliderBeingMoved = FALSE;
if ( slider.width() == 0 )
return;
long val = long((double)slider.value() * mediaPlayerState.length() / slider.width());
mediaPlayerState.setPosition( val );
}
diff --git a/noncore/multimedia/opieplayer2/audiowidget.h b/noncore/multimedia/opieplayer2/audiowidget.h
index 4598d51..8426490 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.h
+++ b/noncore/multimedia/opieplayer2/audiowidget.h
@@ -98,17 +98,18 @@ private:
QPixmap pixBg;
QImage imgUp;
QImage imgDn;
QBitmap *masks[10];
QPixmap *buttonPixUp[10];
QPixmap *buttonPixDown[10];
QPixmap *pixmaps[4];
OTicker songInfo;
QSlider slider;
QLineEdit time;
bool isStreaming : 1;
+ bool audioSliderBeingMoved : 1;
};
#endif // AUDIO_WIDGET_H