Menu

[c54480]: / arrowobj.h  Maximize  Restore  History

Download this file

57 lines (48 with data), 1.4 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
#ifndef ARROWOBJ_H
#define ARROWOBJ_H
#include "mapobj.h"
#include <QPen>
/*! \brief arrows are used to indicate partially hidden ends of xlinks and
also the ends of xlinks.
*/
/////////////////////////////////////////////////////////////////////////////
class ArrowObj:public MapObj {
public:
enum OrnamentStyle {None, HeadFull, Foot};
ArrowObj (MapObj* parent);
virtual ~ArrowObj ();
virtual void init ();
void setPen( QPen pen );
QPen getPen();
void setArrowSize(qreal r);
qreal getArrowSize();
void setFixedLength(int i);
int getFixedLength();
void setUseFixedLength(bool b);
bool getUseFixedLength();
void show();
void hide();
void setVisibility (bool b);
void setEndPoint (QPointF p);
QPointF getEndPoint ();
void setStyleBegin (OrnamentStyle os);
void setStyleBegin (const QString &s);
OrnamentStyle getStyleBegin ();
void setStyleEnd (const QString &s);
void setStyleEnd (OrnamentStyle os);
OrnamentStyle getStyleEnd ();
static QString styleToString(const OrnamentStyle &os);
private:
QPolygonF getArrowHead();
QPen pen;
qreal arrowSize;
int fixedLength;
bool useFixedLength;
QGraphicsPolygonItem *arrowEnd;
QGraphicsPolygonItem *arrowBegin;
QGraphicsLineItem *line;
QPointF endPoint;
OrnamentStyle styleBegin;
OrnamentStyle styleEnd;
};
#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.