4 #ifndef GUI_EDGE_WIDGET_H_
5 #define GUI_EDGE_WIDGET_H_
6 #include <QGraphicsItem>
7 #include <QGraphicsSceneHoverEvent>
17 #include "QtCore/qmath.h"
18 #include "node_widget.h"
35 QColor color = Qt::black,
36 QColor alt_color = Qt::black,
37 Qt::PenStyle pen_style = Qt::SolidLine,
39 QGraphicsItem* parent = 0);
47 void set_destination_node(
NodeWidget* destination_node);
57 bool high_intensity()
const;
60 void set_color(QColor);
64 void set_alternate_color(QColor);
65 QColor alternate_color()
const;
68 void set_opacity(
int);
72 void set_pen_style(Qt::PenStyle pen);
73 Qt::PenStyle pen_style();
78 QPainterPath
shape()
const;
89 void hoverLeaveEvent(QGraphicsSceneHoverEvent* event);
101 void paint ( QPainter * painter,
const QStyleOptionGraphicsItem * option, QWidget * widget = 0 );
118 bool high_intensity_;
123 QPointF source_point_;
124 QPointF destination_point_;
134 bool use_alternate_color_;
138 QColor alternate_color_;
142 Qt::PenStyle pen_style_;