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

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 Nodenode () const
 get the node this Look is for

Detailed Description

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.

Inheritance diagram for Elve::NodeLook:
Elve::Movable

Constructor & Destructor Documentation

NodeLook.

Parameters:
nthe node to make look for

Definition at line 9 of file NodeLook.cpp.


Member Function Documentation

void Elve::NodeLook::color ( const QColor &  color)

set the selection color to color

Parameters:
colorthe color

Definition at line 52 of file NodeLook.cpp.

const QColor & Elve::NodeLook::color ( ) const

get the selection color

Returns:
the selection color

Definition at line 57 of file NodeLook.cpp.

QPointF Elve::NodeLook::inputPos ( int  index) const [virtual]

position of the input at index

Parameters:
indexindex of the input
Returns:
a point in the scene

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

Returns:
const ref to the node

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

Parameters:
col
QPointF Elve::NodeLook::outputPos ( int  index) const [virtual]

position of the output at index

Parameters:
indexindex of the output
Returns:
a point in the scene

Re-implement this method to tell your EdgeLook instances where are their ends

Definition at line 74 of file NodeLook.cpp.

List of all members.


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