4 #include <QGraphicsScene>
5 #include <QGraphicsItem>
17 #define Z_LINEEDIT 110
19 /*! \brief Base class for all objects visible on a map
22 class MapObj:public XMLObj {
25 MapObj (QGraphicsScene*);
29 virtual void copy (MapObj*);
30 virtual QGraphicsScene* getScene();
33 virtual qreal width();
34 virtual qreal height();
35 virtual QPointF getAbsPos();
36 virtual QString getPos(); // Return position as string (x,y)
37 virtual void move (double x,double y); // move to absolute Position
38 virtual void move (QPointF p);
39 virtual void moveBy (double x,double y); // move to relative Position
40 virtual QRectF getBBox(); // returns bounding box
41 virtual QRectF getClickBox(); // returns box to click
42 virtual bool isInClickBox (const QPointF &p); //! Checks if p is in clickBox
43 virtual QSizeF getSize(); // returns size of bounding box
44 virtual bool isVisibleObj();
45 virtual void setVisibility(bool);
46 virtual void positionBBox()=0;
47 virtual void calcBBoxSize()=0;
49 QGraphicsScene* scene;
50 QRectF bbox; // bounding box of MO itself
51 QRectF clickBox; // area where mouseclicks are found
52 QPointF absPos; // Position on canvas