ECNode Class Reference

Electrical node with voltage / current / etc properties. More...

#include <ecnode.h>

Inheritance diagram for ECNode:

Inheritance graph
[legend]
Collaboration diagram for ECNode:

Collaboration graph
[legend]
List of all members.

Signals

void numPinsChanged (unsigned newNum)

Public Member Functions

 ECNode (ICNDocument *icnDocument, Node::node_type type, node_dir dir, const QPoint &pos, QString *id=0)
 ~ECNode ()
virtual void setParentItem (CNItem *parentItem)
virtual void drawShape (QPainter &p)
void setNumPins (unsigned num)
unsigned numPins () const
PinVector pins () const
Pinpin (unsigned num=0) const
bool showVoltageBars () const
void setShowVoltageBars (bool show)
void setNodeChanged ()

Protected Slots

void removeElement (Element *e)
void removeSwitch (Switch *sw)

Protected Attributes

bool m_bShowVoltageBars
double m_prevV
double m_prevI
QCanvasRectangle * m_pinPoint
PinVector m_pins

Detailed Description

Electrical node with voltage / current / etc properties.

Author:
David Saxton

Definition at line 32 of file ecnode.h.


Member Function Documentation

void ECNode::setParentItem ( CNItem parentItem  )  [virtual]

Associates a CNItem with the node - ie the node belongs to the CNItem, and hence gets deleted when the CNItem gets deleted.s

Reimplemented from Node.

Definition at line 125 of file ecnode.cpp.

References Node::parentItem(), removeElement(), removeSwitch(), and Node::setParentItem().

void ECNode::drawShape ( QPainter &  p  )  [virtual]

Draw shape. Note that this has to remain public.

Implements Node.

Definition at line 148 of file ecnode.cpp.

References Pin::current(), Node::findConnectorDivergePoint(), m_bShowVoltageBars, Node::m_dir, m_pinPoint, numPins(), pin(), Node::type(), and Pin::voltage().

void ECNode::setNumPins ( unsigned  num  ) 

Set the number of pins "contained" in this node.

Definition at line 88 of file ecnode.cpp.

References m_pins.

Referenced by BusSplitter::dataChanged(), and Connector::syncWiresWithNodes().

unsigned ECNode::numPins (  )  const [inline]

Returns:
the number of pins in this node.
See also:
setNumPins

Definition at line 49 of file ecnode.h.

References m_pins.

Referenced by CanvasTip::displayVI(), drawShape(), setNodeChanged(), and Connector::syncWiresWithNodes().


The documentation for this class was generated from the following files:
Generated on Tue May 8 17:05:40 2007 for KTechLab by  doxygen 1.5.1