frameobj.h
author insilmaril
Tue Jan 23 11:50:53 2007 +0000 (2007-01-23)
changeset 422 07a2f3f31101
parent 408 c2a05fa925a1
child 442 dfbc371b7280
permissions -rw-r--r--
1.8.65 Various fixes
     1 #ifndef FRAMEOBJ_H
     2 #define FRAMEOBJ_H
     3 
     4 #include "mapobj.h"
     5 
     6 enum FrameType {NoFrame,Rectangle,Ellipse};
     7 
     8 class FrameObj:public MapObj {
     9 public:
    10     FrameObj();
    11     FrameObj(QGraphicsScene*);
    12     ~FrameObj();
    13     void init();
    14     void clear();
    15     void move (double x,double y);    // move to absolute Position
    16     void moveBy (double x,double y);  // move to relative Position
    17 	void positionBBox();			 
    18 	void calcBBoxSize();			
    19 	void setRect (const QRectF &);	  // set dimensions			
    20     int getBorder();
    21     FrameType getFrameType ();
    22     QString getFrameTypeName ();
    23     void setFrameType (const FrameType &);
    24     void setFrameType (const QString &);
    25     void setVisibility(bool);
    26 	QString saveToDir ();
    27 
    28 protected:
    29     FrameType type;
    30     QGraphicsRectItem * rectFrame;
    31     QGraphicsEllipseItem * ellipseFrame;
    32     int border;									// distance text - frame
    33 };
    34 #endif
    35