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 NodeLook & | from () const |
get the node from which the edge is coming | |
const NodeLook & | to () 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 |
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.
Elve::EdgeLook::EdgeLook | ( | const NodeLook & | from, |
Index | outi, | ||
const NodeLook & | to, | ||
Index | ini | ||
) |
EdgeLook only constructor.
from | the Node(Look) from which the edge comes |
outi | the output index from which the edge comes |
to | the Node(Look) to which the edge goes |
ini | the input index to which the edge goes |
Definition at line 3 of file EdgeLook.cpp.
virtual void Elve::EdgeLook::addToPath | ( | QPainterPath & | path | ) | [pure virtual] |
add the shape of this edge
path | path 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 |
Index Elve::EdgeLook::iFrom | ( | ) | const |
get the output index (pin) from which the edge is coming
Definition at line 8 of file EdgeLook.cpp.
Index Elve::EdgeLook::iTo | ( | ) | const |
get the input index (pin) to which the edge is going
Definition at line 12 of file EdgeLook.cpp.
virtual QPen Elve::EdgeLook::pen | ( | ) | const [pure virtual] |
state the pen that must draw this edge
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 |