4 #include <QGraphicsScene>
5 #include <QGraphicsItem>
21 class MapObj:public xmlObj {
24 MapObj (QGraphicsScene*);
28 virtual void copy (MapObj*);
29 virtual QGraphicsScene* getScene();
32 virtual qreal width();
33 virtual qreal height();
34 virtual QPointF getAbsPos();
35 virtual QString getPos(); // Return position as string (x,y)
36 virtual void move (double x,double y); // move to absolute Position
37 virtual void move (QPointF p);
38 virtual void moveBy (double x,double y); // move to relative Position
39 virtual bool inBox(const QPointF&); // Check if Point is within clickbox
40 virtual QRectF getBBox(); // returns bounding box
41 virtual QRectF addBBox(QRectF,QRectF); // returns bbox which includes both boxes
42 virtual QSizeF getSize(); // returns size of bounding box
43 virtual bool isVisibleObj();
44 virtual void setVisibility(bool);
45 virtual void positionBBox()=0;
46 virtual void calcBBoxSize()=0;
48 QGraphicsScene* scene;
49 QRectF bbox; // bounding box of MO itself
50 QRectF clickBox; // area where mouseclicks are found
51 QPointF absPos; // Position on canvas