diff -r e95081c21da2 -r 1cc7bbf75f0b frameobj.cpp --- a/frameobj.cpp Tue Sep 05 09:47:14 2006 +0000 +++ b/frameobj.cpp Fri Jan 05 11:17:32 2007 +0000 @@ -11,7 +11,7 @@ init (); } -FrameObj::FrameObj(Q3Canvas* c) :MapObj(c) +FrameObj::FrameObj(QGraphicsScene *s) :MapObj(s) { // cout << "Const FrameObj\n"; init (); @@ -49,7 +49,7 @@ case NoFrame: break; case Rectangle: - rectFrame->move (x,y); + rectFrame->setPos (x,y); break; } } @@ -67,7 +67,7 @@ { } -void FrameObj::setRect(const QRect &r) +void FrameObj::setRect(const QRectF &r) { bbox=r; switch (type) @@ -75,9 +75,7 @@ case NoFrame: break; case Rectangle: - rectFrame->setX (bbox.x() ); - rectFrame->setY (bbox.y() ); - rectFrame->setSize (bbox.width(),bbox.height() ); + rectFrame->setRect (QRectF(bbox.x(),bbox.y(),bbox.width(),bbox.height() )); break; } } @@ -117,10 +115,9 @@ break; case Rectangle: border=10; - rectFrame = new Q3CanvasRectangle (canvas); - rectFrame->setZ(Z_FRAME); - rectFrame->setBrush( QColor("white") ); - rectFrame->setPen( QPen(QColor("black") )); + rectFrame = scene->addRect(QRectF(0,0,0,0), QPen(QColor("black") ), QColor("white")); + rectFrame->setZValue(Z_FRAME); + break; } setVisibility (visible);