The NodeLook abstract class. More...
#include <NodeLook.h>
Public Member Functions | |
NodeLook (const Node &n) | |
NodeLook. | |
virtual QPointF | inputPos (int index) const |
position of the input at index | |
virtual QPointF | outputPos (int index) const |
position of the output at index | |
virtual void | onColorChange (const QColor &col)=0 |
called when the selection color of the node changes | |
virtual void | onColorReset ()=0 |
called when the node is unselected and must be reverted to normal colors | |
void | mousePressEvent (QGraphicsSceneMouseEvent *event) override |
void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override |
void | mouseMoveEvent (QGraphicsSceneMouseEvent *event) override |
void | onStateChange (const QVector2D &pos, const QVector2D &speed) override |
void | color (const QColor &color) |
set the selection color to color | |
const QColor & | color () const |
get the selection color | |
const Node & | node () const |
get the node this Look is for |
The NodeLook abstract class.
This abstract class represent the appeareance of a graph's node in the viewport and some of its basic properties.
Definition at line 26 of file NodeLook.h.
Elve::NodeLook::NodeLook | ( | const Node & | n | ) |
void Elve::NodeLook::color | ( | const QColor & | color | ) |
set the selection color to color
color | the color |
Definition at line 52 of file NodeLook.cpp.
const QColor & Elve::NodeLook::color | ( | ) | const |
QPointF Elve::NodeLook::inputPos | ( | int | index | ) | const [virtual] |
position of the input at index
index | index of the input |
Re-implement this method to tell your EdgeLook instances where are their ends
Definition at line 70 of file NodeLook.cpp.
const Node & Elve::NodeLook::node | ( | ) | const |
get the node this Look is for
Definition at line 78 of file NodeLook.cpp.
virtual void Elve::NodeLook::onColorChange | ( | const QColor & | col | ) | [pure virtual] |
called when the selection color of the node changes
col |
QPointF Elve::NodeLook::outputPos | ( | int | index | ) | const [virtual] |
position of the output at index
index | index of the output |
Re-implement this method to tell your EdgeLook instances where are their ends
Definition at line 74 of file NodeLook.cpp.