summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/videowidget.cpp
authorsimon <simon>2002-12-08 22:39:53 (UTC)
committer simon <simon>2002-12-08 22:39:53 (UTC)
commit8b72df0bb25ca5a0791756b2444fc6a1ce361082 (patch) (side-by-side diff)
tree19a7b23fe1d5256d461fe988ba82c359d75a8caf /noncore/multimedia/opieplayer2/videowidget.cpp
parentbada5d6377a428a96527d465903df7fbabc9d337 (diff)
downloadopie-8b72df0bb25ca5a0791756b2444fc6a1ce361082.zip
opie-8b72df0bb25ca5a0791756b2444fc6a1ce361082.tar.gz
opie-8b72df0bb25ca5a0791756b2444fc6a1ce361082.tar.bz2
- merged xoff/yoff into a QPointe member variable, shared in the base class
Diffstat (limited to 'noncore/multimedia/opieplayer2/videowidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index 459f592..6ab6d7b 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -180,12 +180,12 @@ void VideoWidget::resizeEvent( QResizeEvent * ) {
slider->setFocusPolicy( QWidget::NoFocus );
slider->setBackgroundPixmap( pixBg );
- xoff = 0;// ( imgUp->width() ) / 2;
+ upperLeftOfButtonMask.rx() = 0;// ( imgUp->width() ) / 2;
if(w>h)
- yoff = 0;
+ upperLeftOfButtonMask.ry() = 0;
else
- yoff = 185;//(( Vh - imgUp->height() ) / 2) - 10;
- QPoint p( xoff, yoff );
+ upperLeftOfButtonMask.ry() = 185;//(( Vh - imgUp->height() ) / 2) - 10;
+ QPoint p = upperLeftOfButtonMask;
QPixmap *pixUp = combineVImageWithBackground( imgUp, pixBg, p );
QPixmap *pixDn = combineVImageWithBackground( imgDn, pixBg, p );
@@ -272,9 +272,9 @@ void VideoWidget::toggleButton( int i ) {
void VideoWidget::paintButton( QPainter *p, int i ) {
if ( buttons[i].isDown ) {
- p->drawPixmap( xoff, yoff, *buttonPixDown[i] );
+ p->drawPixmap( upperLeftOfButtonMask, *buttonPixDown[i] );
} else {
- p->drawPixmap( xoff, yoff, *buttonPixUp[i] );
+ p->drawPixmap( upperLeftOfButtonMask, *buttonPixUp[i] );
}
}
@@ -282,8 +282,8 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) {
for ( unsigned int i = 0; i < buttons.size(); i++ ) {
if ( event->state() == QMouseEvent::LeftButton ) {
// The test to see if the mouse click is inside the button or not
- int x = event->pos().x() - xoff;
- int y = event->pos().y() - yoff;
+ int x = event->pos().x() - upperLeftOfButtonMask.x();
+ int y = event->pos().y() - upperLeftOfButtonMask.y();
bool isOnButton = ( x > 0 && y > 0 && x < buttonMask.width()
&& y < buttonMask.height()