Diffstat (limited to 'noncore/multimedia/opieplayer2/videowidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index 3e677c6..77eab71 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp | |||
@@ -254,30 +254,24 @@ void VideoWidget::updateSlider( long i, long max ) { | |||
254 | if ( slider->maxValue() != width ) { | 254 | if ( slider->maxValue() != width ) { |
255 | slider->setMaxValue( width ); | 255 | slider->setMaxValue( width ); |
256 | } | 256 | } |
257 | } | 257 | } |
258 | } | 258 | } |
259 | 259 | ||
260 | void VideoWidget::setToggleButton( int i, bool down ) { | 260 | void VideoWidget::setToggleButton( int i, bool down ) { |
261 | if ( down != buttons[i].isDown ) { | 261 | if ( down != buttons[i].isDown ) { |
262 | toggleButton( i ); | 262 | toggleButton( i ); |
263 | } | 263 | } |
264 | } | 264 | } |
265 | 265 | ||
266 | void VideoWidget::toggleButton( int i ) { | ||
267 | buttons[i].isDown = !buttons[i].isDown; | ||
268 | QPainter p(this); | ||
269 | paintButton ( p, i ); | ||
270 | } | ||
271 | |||
272 | void VideoWidget::paintButton( QPainter &p, int i ) { | 266 | void VideoWidget::paintButton( QPainter &p, int i ) { |
273 | 267 | ||
274 | if ( buttons[i].isDown ) { | 268 | if ( buttons[i].isDown ) { |
275 | p.drawPixmap( upperLeftOfButtonMask, *buttonPixDown[i] ); | 269 | p.drawPixmap( upperLeftOfButtonMask, *buttonPixDown[i] ); |
276 | } else { | 270 | } else { |
277 | p.drawPixmap( upperLeftOfButtonMask, *buttonPixUp[i] ); | 271 | p.drawPixmap( upperLeftOfButtonMask, *buttonPixUp[i] ); |
278 | } | 272 | } |
279 | } | 273 | } |
280 | 274 | ||
281 | void VideoWidget::mouseMoveEvent( QMouseEvent *event ) { | 275 | void VideoWidget::mouseMoveEvent( QMouseEvent *event ) { |
282 | for ( unsigned int i = 0; i < buttons.size(); i++ ) { | 276 | for ( unsigned int i = 0; i < buttons.size(); i++ ) { |
283 | if ( event->state() == QMouseEvent::LeftButton ) { | 277 | if ( event->state() == QMouseEvent::LeftButton ) { |