ELVE  1
ELVE Logic Visualization Explorer
Elve::EdgeLook Class Reference

Class representing look of an edge. More...

#include <EdgeLook.h>

Public Member Functions

 EdgeLook (const NodeLook &from, Index outi, const NodeLook &to, Index ini)
 EdgeLook only constructor.
virtual void addToPath (QPainterPath &path)=0
 add the shape of this edge
virtual QPen pen () const =0
 state the pen that must draw this edge
const NodeLookfrom () const
 get the node from which the edge is coming
const NodeLookto () const
 get the node to which the edge is going
Index iFrom () const
 get the output index (pin) from which the edge is coming
Index iTo () const
 get the input index (pin) to which the edge is going

Detailed Description

Class representing look of an edge.

The EdgeLook class is an abstract class that must be reimplemented in the look plugins to provide information about the look of an edge and its geometry.

Definition at line 14 of file EdgeLook.h.


Constructor & Destructor Documentation

Elve::EdgeLook::EdgeLook ( const NodeLook from,
Index  outi,
const NodeLook to,
Index  ini 
)

EdgeLook only constructor.

Parameters:
fromthe Node(Look) from which the edge comes
outithe output index from which the edge comes
tothe Node(Look) to which the edge goes
inithe input index to which the edge goes

Definition at line 3 of file EdgeLook.cpp.


Member Function Documentation

virtual void Elve::EdgeLook::addToPath ( QPainterPath &  path) [pure virtual]

add the shape of this edge

Parameters:
pathpath to be updated

The edges in elve are batched together to speed up drawing, this is thus the only way to add geometry from the edge, update the provided path by adding the current edge to it. Don't clear the given path.

const NodeLook & Elve::EdgeLook::from ( ) const

get the node from which the edge is coming

Returns:

Definition at line 16 of file EdgeLook.cpp.

Index Elve::EdgeLook::iFrom ( ) const

get the output index (pin) from which the edge is coming

Returns:

Definition at line 8 of file EdgeLook.cpp.

Index Elve::EdgeLook::iTo ( ) const

get the input index (pin) to which the edge is going

Returns:

Definition at line 12 of file EdgeLook.cpp.

virtual QPen Elve::EdgeLook::pen ( ) const [pure virtual]

state the pen that must draw this edge

Returns:
the pen

Since edges are batched in elve, and qt can draw only with one pen at once. Edges are sorted by Pen values to group drawing of edges sharing common pens.

const NodeLook & Elve::EdgeLook::to ( ) const

get the node to which the edge is going

Returns:

Definition at line 20 of file EdgeLook.cpp.

List of all members.


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