Menu

[c54480]: / frameobj.h  Maximize  Restore  History

Download this file

61 lines (52 with data), 1.7 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#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,RoundedRectangle,Ellipse,Cloud};
FrameObj(QGraphicsItem *parent);
~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();
qreal getTotalPadding(); // padding + borderwidth + xsize (e.g. cloud)
qreal getXPadding();
void setBorderWidth (const int &);
int getBorderWidth ();
FrameType getFrameType ();
FrameType getFrameType (const QString &);
QString getFrameTypeName ();
void setFrameType (const FrameType &);
void setFrameType (const QString &);
void setPenColor (QColor);
QColor getPenColor ();
void setBrushColor (QColor);
QColor getBrushColor ();
void setFrameIncludeChildren(bool);
bool getFrameIncludeChildren();
void repaint();
void setZValue (double z);
void setVisibility(bool);
QString saveToDir ();
private:
FrameType type; //!< Frame type
QGraphicsRectItem * rectFrame;
QGraphicsEllipseItem * ellipseFrame;
QGraphicsPathItem *pathFrame;
int padding; // distance text - frame
int borderWidth;
qreal xsize; //! Extra size caused e.g. by cloud geometry
QColor penColor;
QColor brushColor;
bool includeChildren;
};
#endif
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.