frameobj.h
author insilmaril
Wed Apr 25 16:02:54 2007 +0000 (2007-04-25)
changeset 459 9bc55005a0f1
parent 421 5522d1da7e37
child 470 80ae7b79828c
permissions -rw-r--r--
started doxygen documentation
     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 setPenColor (QColor);
    26 	QColor getPenColor ();
    27 	void setBrushColor (QColor);
    28 	QColor getBrushColor ();
    29 	void repaint();
    30     void setVisibility(bool);
    31 	QString saveToDir ();
    32 
    33 private:
    34     FrameType type;
    35     QGraphicsRectItem * rectFrame;
    36     QGraphicsEllipseItem * ellipseFrame;
    37     int border;									// distance text - frame
    38 	QColor penColor;
    39 	QColor brushColor;
    40 };
    41 #endif
    42