Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | List of all members
Node Class Reference

Wiring node for circuit connections. More...

#include <node.h>

Inheritance diagram for Node:
Inheritance graph
[legend]
Collaboration diagram for Node:
Collaboration graph
[legend]

Public Types

enum  { Type = UserType + 1 }
 

Public Member Functions

 Node (GraphWidget *graphWidget)
 Construct node with graph widget.
 
 Node (GraphWidget *graphWidget, struct NodeInfo)
 Construct node from NodeInfo structure.
 
 ~Node ()
 Class destructor.
 
void addWire (Wire *Wire)
 Add wire connection to node.
 
QList< Wire * > Wires () const
 Get list of connected wires.
 
int type () const
 
QRectF boundingRect () const
 Get node bounding rectangle.
 
QPainterPath shape () const
 Get node selection shape.
 
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
 Paint node on scene.
 
QPoint getPortLocation (int)
 Get port location (always returns origin)
 
QString getID ()
 Get node identifier.
 
void show ()
 Show node.
 
void hide ()
 Hide node.
 
- Public Member Functions inherited from Symbol
 Symbol ()
 Class constructor.
 

Protected Member Functions

QVariant itemChange (GraphicsItemChange change, const QVariant &value)
 Handle item change events.
 
void mousePressEvent (QGraphicsSceneMouseEvent *event)
 Handle mouse press events.
 
void mouseReleaseEvent (QGraphicsSceneMouseEvent *event)
 Handle mouse release events.
 

Detailed Description

Wiring node for circuit connections.

Constructor & Destructor Documentation

◆ Node() [1/2]

Node::Node ( GraphWidget graphWidget)

Construct node with graph widget.

Parameters
graphWidgetParent graph widget

◆ Node() [2/2]

Node::Node ( GraphWidget graphWidget,
struct NodeInfo  NI 
)

Construct node from NodeInfo structure.

Parameters
graphWidgetParent graph widget
NINode information structure

Member Function Documentation

◆ addWire()

void Node::addWire ( Wire Wire)
inlinevirtual

Add wire connection to node.

Parameters
WireWire to connect

Implements Symbol.

◆ boundingRect()

QRectF Node::boundingRect ( ) const
inlinevirtual

Get node bounding rectangle.

Returns
Bounding rectangle for painting

Implements Symbol.

◆ getID()

QString Node::getID ( )
inline

Get node identifier.

Returns
Node ID string

◆ getPortLocation()

QPoint Node::getPortLocation ( int  )
inlinevirtual

Get port location (always returns origin)

Parameters
port_numberPort index (unused)
Returns
Port position at origin

Implements Symbol.

◆ itemChange()

QVariant Node::itemChange ( GraphicsItemChange  change,
const QVariant &  value 
)
protectedvirtual

Handle item change events.

Implements Symbol.

◆ mousePressEvent()

void Node::mousePressEvent ( QGraphicsSceneMouseEvent *  event)
inlineprotectedvirtual

Handle mouse press events.

Implements Symbol.

◆ mouseReleaseEvent()

void Node::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  event)
inlineprotectedvirtual

Handle mouse release events.

Implements Symbol.

◆ paint()

void Node::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget 
)
virtual

Paint node on scene.

Parameters
painterQPainter instance
optionStyle options
widgetTarget widget

Implements Symbol.

◆ shape()

QPainterPath Node::shape ( ) const
virtual

Get node selection shape.

Returns
Path defining selectable area

Implements Symbol.

◆ Wires()

QList< Wire * > Node::Wires ( ) const
inline

Get list of connected wires.

Returns
List of wire pointers

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