mapobj.cpp
changeset 648 e4435f252e44
parent 474 d9add21ee9d3
child 692 c5e3cb54b9db
     1.1 --- a/mapobj.cpp	Wed Apr 25 16:02:54 2007 +0000
     1.2 +++ b/mapobj.cpp	Mon Jan 14 16:27:00 2008 +0000
     1.3 @@ -102,49 +102,16 @@
     1.4  	clickBox.moveTo (clickBox.x()+x,clickBox.y()+y);
     1.5  }
     1.6  
     1.7 -bool MapObj::inBox(const QPointF &p)
     1.8 -{
     1.9 -    if (p.x() >= clickBox.left() && p.x() <= clickBox.right()  
    1.10 -	&& p.y() <= clickBox.bottom() && p.y() >= clickBox.top() )
    1.11 -		return true;
    1.12 -    return false;	
    1.13 -}
    1.14 -
    1.15  QRectF MapObj::getBBox()
    1.16  {
    1.17      return bbox;
    1.18  }
    1.19  
    1.20 -QRectF MapObj::addBBox(QRectF r1, QRectF r2)
    1.21 -{	
    1.22 -	// Find smallest QRectF containing given rectangles
    1.23 +QRectF MapObj::getClickBox()
    1.24 +{
    1.25 +    return clickBox;
    1.26 +}
    1.27  
    1.28 -	QRectF n;
    1.29 -	// Set left border
    1.30 -	if (r1.left() <= r2.left() )
    1.31 -		n.setLeft(r1.left() );
    1.32 -	else
    1.33 -		n.setLeft(r2.left() );
    1.34 -		
    1.35 -	// Set top border		
    1.36 -	if (r1.top() <= r2.top() )
    1.37 -		n.setTop(r1.top() );
    1.38 -	else
    1.39 -		n.setTop(r2.top() );
    1.40 -		
    1.41 -	// Set right border
    1.42 -	if (r1.right() <= r2.right() )
    1.43 -		n.setRight(r2.right() );
    1.44 -	else
    1.45 -		n.setRight(r1.right() );
    1.46 -		
    1.47 -	// Set bottom 
    1.48 -	if (r1.bottom() <= r2.bottom() )
    1.49 -		n.setBottom(r2.bottom() );
    1.50 -	else
    1.51 -		n.setBottom(r1.bottom() );
    1.52 -	return n;
    1.53 -}
    1.54  
    1.55  QSizeF MapObj::getSize()
    1.56  {