diff -r 954221e01e4e -r 2abfdb7e85f4 mapobj.cpp --- a/mapobj.cpp Mon Jan 14 16:26:59 2008 +0000 +++ b/mapobj.cpp Mon Jan 14 16:26:59 2008 +0000 @@ -102,49 +102,16 @@ clickBox.moveTo (clickBox.x()+x,clickBox.y()+y); } -bool MapObj::inBox(const QPointF &p) -{ - if (p.x() >= clickBox.left() && p.x() <= clickBox.right() - && p.y() <= clickBox.bottom() && p.y() >= clickBox.top() ) - return true; - return false; -} - QRectF MapObj::getBBox() { return bbox; } -QRectF MapObj::addBBox(QRectF r1, QRectF r2) -{ - // Find smallest QRectF containing given rectangles +QRectF MapObj::getClickBox() +{ + return clickBox; +} - QRectF n; - // Set left border - if (r1.left() <= r2.left() ) - n.setLeft(r1.left() ); - else - n.setLeft(r2.left() ); - - // Set top border - if (r1.top() <= r2.top() ) - n.setTop(r1.top() ); - else - n.setTop(r2.top() ); - - // Set right border - if (r1.right() <= r2.right() ) - n.setRight(r2.right() ); - else - n.setRight(r1.right() ); - - // Set bottom - if (r1.bottom() <= r2.bottom() ) - n.setBottom(r2.bottom() ); - else - n.setBottom(r1.bottom() ); - return n; -} QSizeF MapObj::getSize() {