4 /////////////////////////////////////////////////////////////////
6 /////////////////////////////////////////////////////////////////
9 //qWarning ( "Const MapObj (): Please set scene somehow!!!");
14 MapObj::MapObj (QGraphicsScene *s)
16 // cout << "Const MapObj\n";
22 MapObj::MapObj (MapObj* mo)
24 // cout << "CopyConst MapObj\n";
30 // cout << "Destr MapObj\n";
39 void MapObj::copy(MapObj* other)
41 // scene=other->scene; // already set in constr. of child, use that one...
43 bbox.setX (other->bbox.x() );
44 bbox.setY (other->bbox.y() );
45 bbox.setSize (QSizeF(other->bbox.width(), other->bbox.height() ) );
48 QGraphicsScene* MapObj::getScene()
68 qreal MapObj::height()
73 QPointF MapObj::getAbsPos()
78 QString MapObj::getPos()
80 return qpointfToString(absPos);
83 void MapObj::move (double x, double y)
87 bbox.moveTo(QPointF(x,y));
88 clickBox.moveTo(QPointF(x,y));
91 void MapObj::move (QPointF p)
98 void MapObj::moveBy (double x, double y)
100 MapObj::move (x+absPos.x(),y+absPos.y() );
101 bbox.moveTo (bbox.x()+x,bbox.y()+y);
102 clickBox.moveTo (clickBox.x()+x,clickBox.y()+y);
105 QRectF MapObj::getBBox()
110 QRectF MapObj::getClickBox()
116 QSizeF MapObj::getSize()
122 bool MapObj::isVisibleObj()
127 void MapObj::setVisibility(bool v)
132 void MapObj::animate()