author | simon <simon> | 2002-12-09 15:10:48 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-09 15:10:48 (UTC) |
commit | 80902b6ade54252e05cf948040a11b2e975f6759 (patch) (side-by-side diff) | |
tree | d251490e8e1e83af1cd8522736cc02a772463f0f /noncore/multimedia/opieplayer2/videowidget.cpp | |
parent | e487238141c57df63252e41a47b409cbb1f9ae83 (diff) | |
download | opie-80902b6ade54252e05cf948040a11b2e975f6759.zip opie-80902b6ade54252e05cf948040a11b2e975f6759.tar.gz opie-80902b6ade54252e05cf948040a11b2e975f6759.tar.bz2 |
- paintButton is no more a duplicated method but centralized in the
base class now :)
Diffstat (limited to 'noncore/multimedia/opieplayer2/videowidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index 3baa087..a483434 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp @@ -247,19 +247,8 @@ void VideoWidget::setToggleButton( int i, bool down ) { toggleButton( i ); } } -void VideoWidget::paintButton( QPainter &p, int i ) { - - Button &button = buttons[ i ]; - - if ( button.isDown ) { - p.drawPixmap( upperLeftOfButtonMask, button.pixDown ); - } else { - p.drawPixmap( upperLeftOfButtonMask, button.pixUp ); - } -} - void VideoWidget::mouseMoveEvent( QMouseEvent *event ) { for ( unsigned int i = 0; i < buttons.count(); i++ ) { if ( event->state() == QMouseEvent::LeftButton ) { // The test to see if the mouse click is inside the button or not @@ -402,16 +391,16 @@ void VideoWidget::paintEvent( QPaintEvent * pe) { QPainter p( &pix ); p.translate( -pe->rect().topLeft().x(), -pe->rect().topLeft().y() ); p.drawTiledPixmap( pe->rect(), pixBg, pe->rect().topLeft() ); for ( unsigned int i = 0; i < buttons.count(); i++ ) { - paintButton( p, i ); + paintButton( p, buttons[ i ] ); } QPainter p2( this ); p2.drawPixmap( pe->rect().topLeft(), pix ); } else { QPainter p( this ); for ( unsigned int i = 0; i < buttons.count(); i++ ) - paintButton( p, i ); + paintButton( p, buttons[ i ] ); } //slider->repaint( TRUE ); } } |