X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=frameobj.h;fp=frameobj.h;h=23d02de8b16d44a63e13da0c9df3133ca6cd036b;hb=2f79edb68ae955de3c3118a7f9181c7a1f3b0d72;hp=0000000000000000000000000000000000000000;hpb=eeb718b059f8b14807b976ae6410a3021b2d4576;p=vym diff --git a/frameobj.h b/frameobj.h new file mode 100644 index 0000000..23d02de --- /dev/null +++ b/frameobj.h @@ -0,0 +1,52 @@ +#ifndef FRAMEOBJ_H +#define FRAMEOBJ_H + +#include "mapobj.h" + + +/*! \brief This class adds a frame to a MapObj. +*/ + +class FrameObj:public MapObj { +public: + + /*! \brief Supported frame types */ + enum FrameType {NoFrame,Rectangle,Ellipse}; + + FrameObj(); + FrameObj(QGraphicsScene*); + ~FrameObj(); + void init(); + void clear(); + void move (double x,double y); // move to absolute Position + void moveBy (double x,double y); // move to relative Position + void positionBBox(); + void calcBBoxSize(); + void setRect (const QRectF &); // set dimensions + void setPadding(const int &); + int getPadding(); + void setBorderWidth (const int &); + int getBorderWidth (); + FrameType getFrameType (); + QString getFrameTypeName (); + void setFrameType (const FrameType &); + void setFrameType (const QString &); + void setPenColor (QColor); + QColor getPenColor (); + void setBrushColor (QColor); + QColor getBrushColor (); + void repaint(); + void setVisibility(bool); + QString saveToDir (); + +private: + FrameType type; //!< Frame type + QGraphicsRectItem * rectFrame; + QGraphicsEllipseItem * ellipseFrame; + int padding; // distance text - frame + int borderWidth; + QColor penColor; + QColor brushColor; +}; +#endif +