Go to the documentation of this file.
28 #ifndef GRAPHICSEDGE_H
29 #define GRAPHICSEDGE_H
32 #include <QGraphicsItem>
38 class QGraphicsSceneMouseEvent;
48 static const int TypeEdge= QGraphicsItem::UserType+2;
62 Q_INTERFACES (QGraphicsItem)
66 const QString &label,
const QString &color,
67 const Qt::PenStyle &style,
68 const int&type,
const bool & drawArrows,
const bool &bezier,
69 const bool &weightNumbers=
false,
70 const bool &highlighting=
true);
73 enum { Type = UserType + 2 };
74 int type()
const {
return Type; }
82 int sourceNodeNumber();
83 int targetNodeNumber();
91 void setSourceNodeSize(
const int & size);
92 void setTargetNodeSize(
const int & size);
94 void setMinimumOffsetFromNode(
const int & offset);
98 void setWeight(
const qreal &w) ;
100 void addWeightNumber ();
102 void setWeightNumberVisibility (
const bool &toggle);
104 void setLabel(
const QString &label) ;
105 QString label()
const;
108 void setLabelVisibility (
const bool &toggle);
110 void showArrows(
const bool &);
112 void setDirectionType(
const int &dirType=0);
118 void setState(
const int &state);
120 void setStyle(
const Qt::PenStyle &style);
121 Qt::PenStyle style()
const;
123 void setColor(
const QString &str) ;
125 QColor color()
const;
126 QString colorToPajek();
128 void setHighlighted (
const bool &flag);
129 void setHighlighting (
const bool &toggle);
131 QPainterPath shape()
const;
138 QRectF boundingRect()
const;
139 void paint(QPainter *painter,
const QStyleOptionGraphicsItem *option, QWidget *widget);
140 QVariant itemChange(GraphicsItemChange change,
const QVariant &value);
GraphicsEdgeWeight * weightNumber
Definition: graphicsedge.h:150
QPointF targetPoint
Definition: graphicsedge.h:156
QColor m_color
Definition: graphicsedge.h:169
Definition: graphicsedgelabel.h:37
int m_state
Definition: graphicsedge.h:166
bool m_hoverHighlighting
Definition: graphicsedge.h:178
qreal line_length
Definition: graphicsedge.h:175
static const int EDGE_STATE_HIGHLIGHT
Definition: graphicsedge.h:53
bool m_drawWeightNumber
Definition: graphicsedge.h:177
QString m_label
Definition: graphicsedge.h:168
QPointF edgeOffset
Definition: graphicsedge.h:158
static const int ZValueEdgeHighlighted
Definition: graphicsedge.h:50
static const int ZValueEdge
Definition: graphicsedge.h:49
static const int EDGE_STATE_REGULAR
Definition: graphicsedge.h:52
Definition: graphicsedge.h:60
qreal m_minOffsetFromNode
Definition: graphicsedge.h:162
qreal m_arrowSize
Definition: graphicsedge.h:160
qreal m_offsetFromTargetNode
Definition: graphicsedge.h:163
static const int TypeEdge
Definition: graphicsedge.h:48
qreal m_width
Definition: graphicsedge.h:171
Definition: graphicsnode.h:58
Qt::PenStyle m_style
Definition: graphicsedge.h:165
int m_edgeDirType
Definition: graphicsedge.h:173
static const int EDGE_STATE_HOVER
Definition: graphicsedge.h:54
Definition: graphicsedgeweight.h:37
QPainterPath m_path
Definition: graphicsedge.h:154
int type() const
Definition: graphicsedge.h:74
GraphicsNode * target
Definition: graphicsedge.h:148
GraphicsEdgeLabel * edgeLabel
Definition: graphicsedge.h:152
bool m_isClicked
Definition: graphicsedge.h:179
GraphicsWidget * graphicsWidget
Definition: graphicsedge.h:146