|
| EdgeWidget (NodeWidget *source_node, NodeWidget *destination_node, QColor color=Qt::black, QColor alt_color=Qt::black, Qt::PenStyle pen_style=Qt::SolidLine, int opacity=255, QGraphicsItem *parent=0) |
|
void | set_source_node (NodeWidget *source_node) |
|
void | set_destination_node (NodeWidget *destination_node) |
|
NodeWidget * | source_node () const |
|
NodeWidget * | destination_node () const |
|
void | set_intensity (bool intensity) |
|
bool | high_intensity () const |
|
void | set_color (QColor) |
|
QColor | color () const |
|
void | set_alternate_color (QColor) |
|
QColor | alternate_color () const |
|
void | set_opacity (int) |
|
int | opacity () const |
|
void | set_pen_style (Qt::PenStyle pen) |
|
Qt::PenStyle | pen_style () |
|
QPainterPath | shape () const |
|
void | adjust () |
|
void | hoverEnterEvent (QGraphicsSceneHoverEvent *event) |
|
void | hoverLeaveEvent (QGraphicsSceneHoverEvent *event) |
|
void | use_alternate_color (bool condition) |
|
|
void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) |
|
QRectF | boundingRect () const |
|
EdgeWidget::EdgeWidget |
( |
NodeWidget * |
source_node, |
|
|
NodeWidget * |
destination_node, |
|
|
QColor |
color = Qt::black , |
|
|
QColor |
alt_color = Qt::black , |
|
|
Qt::PenStyle |
pen_style = Qt::SolidLine , |
|
|
int |
opacity = 255 , |
|
|
QGraphicsItem * |
parent = 0 |
|
) |
| |
The constructor for the EdgeWidget class.
- Parameters
-
source_node | The node from which the edge originate |
destination_node | The node to which the edge go |
color | The main color used for the node (unless the alternate colouring is enabled) |
alt_color | The edge supports a secondary color, the alternate color. |
pen_style | The style for the pen that is used to draw the line, can be used for drawing solid or dotted lines. |
parent | Used for placement in the GUI. |
void EdgeWidget::adjust |
( |
| ) |
|
Adjusts the anchor points for the edge - to attach correctly to an ellipse
QRectF EdgeWidget::boundingRect |
( |
| ) |
const |
|
protected |
Overriding the bounding rect method for drawing an edge
void EdgeWidget::hoverEnterEvent |
( |
QGraphicsSceneHoverEvent * |
event | ) |
|
Events to make the tooltip appear more swiftly on mouse-hoover
void EdgeWidget::paint |
( |
QPainter * |
painter, |
|
|
const QStyleOptionGraphicsItem * |
option, |
|
|
QWidget * |
widget = 0 |
|
) |
| |
|
protected |
Overriding the parent method for drawing an edge
void EdgeWidget::set_intensity |
( |
bool |
intensity | ) |
|
Sets intensity of the edge to which it will be assigned a thicker thickness if true
- Parameters
-
intensity | True if to be drawn thick, otherwise false |
- Returns
- true if thick, otherwise false
void EdgeWidget::set_source_node |
( |
NodeWidget * |
source_node | ) |
|
Setters and getters for source and destination node of the edge
- Parameters
-
source_node | The node from which the edge originate |
destination_node | The node to which the edge go |
QPainterPath EdgeWidget::shape |
( |
| ) |
const |
Creates the Path that will be drawn - the edge line in the graph that is
void EdgeWidget::use_alternate_color |
( |
bool |
condition | ) |
|
Function to change if we want to color by using the alternate color
- Parameters
-
condition | If true, use the alternate color |
The documentation for this class was generated from the following files: