diff -r 7a96bd401351 -r 58e7594239df mapobj.h --- a/mapobj.h Sun Jan 30 12:58:47 2005 +0000 +++ b/mapobj.h Tue Aug 01 09:31:22 2006 +0000 @@ -1,46 +1,51 @@ #ifndef MAPOBJ_H #define MAPOBJ_H -#include +#include #include #include "misc.h" using namespace std; -#define Z_BBOX 0 -#define Z_LINK 20 -#define Z_FRAME 50 -#define Z_SELBOX 60 -#define Z_ICON 80 -#define Z_TEXT 100 +#define Z_BBOX 0 +#define Z_XLINK 10 +#define Z_LINK 20 +#define Z_FRAME 50 +#define Z_SELBOX 60 +#define Z_FLOATIMG 65 +#define Z_ICON 80 +#define Z_TEXT 100 class MapObj:public xmlObj { public: MapObj (); - MapObj (QCanvas*); + MapObj (Q3Canvas*); MapObj (MapObj*); virtual ~MapObj (); virtual void init (); virtual void copy (MapObj*); - virtual QCanvas* getCanvas(); + virtual Q3Canvas* getCanvas(); virtual int x(); virtual int y(); virtual int width(); virtual int height(); + virtual QPoint getAbsPos(); + virtual QString getPos(); // Return position as string (x,y) virtual void move (double x,double y); // move to absolute Position virtual void moveBy (double x,double y); // move to relative Position - virtual bool inBBox(QPoint); // Check if Point is in bbox + virtual bool inBox(const QPoint&); // Check if Point is within clickbox virtual QRect getBBox(); // returns bounding box virtual QRect addBBox(QRect,QRect); // returns bbox which includes both boxes virtual QSize getSize(); // returns size of bounding box virtual bool isVisibleObj(); virtual void setVisibility(bool); -protected: - QCanvas* canvas; - QRect bbox; // bounding box of MO itself virtual void positionBBox()=0; virtual void calcBBoxSize()=0; +protected: + Q3Canvas* canvas; + QRect bbox; // bounding box of MO itself + QRect clickBox; // area where mouseclicks are found QPoint absPos; // Position on canvas bool visible; };