GraphTool  1.0
Tool for analyzing and graphically visualizing code dependencies for Ericsson.
 All Classes Namespaces Functions Variables Typedefs Enumerations Pages
Public Member Functions | Protected Member Functions | List of all members
EdgeWidget Class Reference
Inheritance diagram for EdgeWidget:
Inheritance graph
[legend]
Collaboration diagram for EdgeWidget:
Collaboration graph
[legend]

Public Member Functions

 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)
 
NodeWidgetsource_node () const
 
NodeWidgetdestination_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)
 

Protected Member Functions

void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
 
QRectF boundingRect () const
 

Constructor & Destructor Documentation

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_nodeThe node from which the edge originate
destination_nodeThe node to which the edge go
colorThe main color used for the node (unless the alternate colouring is enabled)
alt_colorThe edge supports a secondary color, the alternate color.
pen_styleThe style for the pen that is used to draw the line, can be used for drawing solid or dotted lines.
parentUsed for placement in the GUI.

Member Function Documentation

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
intensityTrue 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_nodeThe node from which the edge originate
destination_nodeThe 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
conditionIf true, use the alternate color

The documentation for this class was generated from the following files: