mapobj.h
changeset 792 7d67be709091
parent 790 133e2ed6b9c5
child 794 d922fb6ea482
     1.1 --- a/mapobj.h	Mon Sep 07 15:36:57 2009 +0000
     1.2 +++ b/mapobj.h	Tue Sep 08 12:15:39 2009 +0000
     1.3 @@ -16,6 +16,7 @@
     1.4  #define Z_TEXT     100
     1.5  #define Z_LINEEDIT 110
     1.6  
     1.7 +class ConvexPolygon;
     1.8  
     1.9  class TreeItem;
    1.10  
    1.11 @@ -40,26 +41,27 @@
    1.12  	virtual qreal width();
    1.13  	virtual qreal height();
    1.14  	virtual QPointF getAbsPos();
    1.15 -	virtual QString getPos();					// Return position as string (x,y)
    1.16 -    virtual void move (double x,double y);      // move to absolute Position
    1.17 +	virtual QString getPos();					//! Return position as string (x,y)
    1.18 +    virtual void move (double x,double y);      //! move to absolute Position
    1.19      virtual void move (QPointF p);
    1.20 -    virtual void moveBy (double x,double y);    // move to relative Position
    1.21 -    virtual QRectF getBBox();					// returns bounding box
    1.22 -    virtual QRectF getClickBox();				// returns box to click
    1.23 +    virtual void moveBy (double x,double y);    //! move to relative Position
    1.24 +    virtual QRectF getBBox();					//! returns bounding box
    1.25 +    virtual ConvexPolygon getBoundingPolygon();	//! return bounding convex polygon
    1.26 +    virtual QRectF getClickBox();				//! returns box to click
    1.27  	virtual bool isInClickBox (const QPointF &p);	//! Checks if p is in clickBox
    1.28 -    virtual QSizeF getSize();					// returns size of bounding box
    1.29 +    virtual QSizeF getSize();					//! returns size of bounding box
    1.30      virtual bool isVisibleObj();
    1.31      virtual void setVisibility(bool);
    1.32      virtual void positionBBox()=0;       
    1.33  	virtual void calcBBoxSize()=0;
    1.34  protected:  
    1.35      QGraphicsScene* scene;
    1.36 -    QRectF bbox;									// bounding box of MO itself
    1.37 -	QRectF clickBox;								// area where mouseclicks are found
    1.38 -    QPointF absPos;							    // Position on canvas
    1.39 +    QRectF bbox;					// bounding box of MO itself
    1.40 +	QRectF clickBox;				// area where mouseclicks are found
    1.41 +    QPointF absPos;				    // Position on canvas
    1.42      bool visible;
    1.43  
    1.44 -	TreeItem *treeItem;				// Crossrefence to treemodel
    1.45 +	TreeItem *treeItem;				//! Crossrefence to treemodel
    1.46  
    1.47  };
    1.48