summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp8
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.h1
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.cpp12
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.h1
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp6
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.h1
6 files changed, 12 insertions, 17 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp
index 277d162..8c7e614 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.cpp
+++ b/noncore/multimedia/opieplayer2/audiowidget.cpp
@@ -305,14 +305,6 @@ void AudioWidget::updateSlider( long i, long max ) {
305 } 305 }
306} 306}
307 307
308
309void AudioWidget::setToggleButton( int i, bool down ) {
310 qDebug("setToggleButton %d", i);
311 if ( down != buttons[i].isDown ) {
312 toggleButton( i );
313 }
314}
315
316void AudioWidget::skipFor() { 308void AudioWidget::skipFor() {
317 skipDirection = +1; 309 skipDirection = +1;
318 startTimer( 50 ); 310 startTimer( 50 );
diff --git a/noncore/multimedia/opieplayer2/audiowidget.h b/noncore/multimedia/opieplayer2/audiowidget.h
index 8c433ac..9b276b5 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.h
+++ b/noncore/multimedia/opieplayer2/audiowidget.h
@@ -90,7 +90,6 @@ private slots:
90 void skipBack(); 90 void skipBack();
91 void stopSkip(); 91 void stopSkip();
92private: 92private:
93 void setToggleButton( int, bool );
94 int skipDirection; 93 int skipDirection;
95 QString skin; 94 QString skin;
96 QImage imgUp; 95 QImage imgUp;
diff --git a/noncore/multimedia/opieplayer2/mediawidget.cpp b/noncore/multimedia/opieplayer2/mediawidget.cpp
index 271f788..9c5291b 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.cpp
+++ b/noncore/multimedia/opieplayer2/mediawidget.cpp
@@ -97,7 +97,7 @@ void MediaWidget::paintAllButtons( QPainter &p )
97{ 97{
98 for ( ButtonMap::ConstIterator it = buttons.begin(); 98 for ( ButtonMap::ConstIterator it = buttons.begin();
99 it != buttons.end(); ++it ) 99 it != buttons.end(); ++it )
100 paintButton( *it ); 100 paintButton( p, *it );
101} 101}
102 102
103void MediaWidget::paintButton( const Button &button ) 103void MediaWidget::paintButton( const Button &button )
@@ -114,6 +114,16 @@ void MediaWidget::paintButton( QPainter &p, const Button &button )
114 p.drawPixmap( upperLeftOfButtonMask, button.pixUp ); 114 p.drawPixmap( upperLeftOfButtonMask, button.pixUp );
115} 115}
116 116
117void MediaWidget::setToggleButton( int buttonId, bool down )
118{
119 qDebug("setToggleButton %d", buttonId );
120
121 Button &button = buttons[ buttonId ];
122
123 if ( down != button.isDown )
124 toggleButton( buttonId );
125}
126
117void MediaWidget::toggleButton( int buttonId ) 127void MediaWidget::toggleButton( int buttonId )
118{ 128{
119 Button &button = buttons[ buttonId ]; 129 Button &button = buttons[ buttonId ];
diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h
index 34910fb..b7860dc 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.h
+++ b/noncore/multimedia/opieplayer2/mediawidget.h
@@ -91,6 +91,7 @@ protected:
91 void paintButton( const Button &button ); 91 void paintButton( const Button &button );
92 void paintButton( QPainter &p, const Button &button ); 92 void paintButton( QPainter &p, const Button &button );
93 93
94 void setToggleButton( int buttonId, bool down );
94 void toggleButton( int buttonId ); 95 void toggleButton( int buttonId );
95 96
96 MediaPlayerState &mediaPlayerState; 97 MediaPlayerState &mediaPlayerState;
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index 8f6a8a9..db4a396 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -242,12 +242,6 @@ void VideoWidget::updateSlider( long i, long max ) {
242 } 242 }
243} 243}
244 244
245void VideoWidget::setToggleButton( int i, bool down ) {
246 if ( down != buttons[i].isDown ) {
247 toggleButton( i );
248 }
249}
250
251void VideoWidget::mouseMoveEvent( QMouseEvent *event ) { 245void VideoWidget::mouseMoveEvent( QMouseEvent *event ) {
252 for ( unsigned int i = 0; i < buttons.count(); i++ ) { 246 for ( unsigned int i = 0; i < buttons.count(); i++ ) {
253 if ( event->state() == QMouseEvent::LeftButton ) { 247 if ( event->state() == QMouseEvent::LeftButton ) {
diff --git a/noncore/multimedia/opieplayer2/videowidget.h b/noncore/multimedia/opieplayer2/videowidget.h
index 45279d7..915e9cc 100644
--- a/noncore/multimedia/opieplayer2/videowidget.h
+++ b/noncore/multimedia/opieplayer2/videowidget.h
@@ -101,7 +101,6 @@ private:
101 QString skin; 101 QString skin;
102 102
103 103
104 void setToggleButton( int, bool );
105 104
106 QString backgroundPix; 105 QString backgroundPix;
107 QSlider *slider; 106 QSlider *slider;