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

Wire connection between symbols. More...

#include <wire.h>

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

Public Types

enum  { Type = UserType + 2 }
 

Public Member Functions

 Wire (Symbol *sourceNode, int port_num_source, Symbol *destNode, int port_num_dest)
 Construct wire with source and destination.
 
 Wire ()
 Default constructor.
 
 ~Wire ()
 Class destructor.
 
void setSource (Symbol *destNode, int port)
 Set wire source.
 
void setDestination (Symbol *destNode, int port)
 Set wire destination.
 
void setColor (QColor Color)
 Set wire color.
 
void paintWire ()
 Paint wire on scene.
 
SymbolsourceNode () const
 Get source symbol.
 
SymboldestNode () const
 Get destination symbol.
 
void adjust ()
 Adjust wire geometry based on endpoint positions.
 
int type () const
 

Protected Member Functions

QRectF boundingRect () const
 Get wire bounding rectangle.
 
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
 Paint wire.
 

Detailed Description

Wire connection between symbols.

Constructor & Destructor Documentation

◆ Wire()

Wire::Wire ( Symbol sourceNode,
int  port_num_source,
Symbol destNode,
int  port_num_dest 
)

Construct wire with source and destination.

Parameters
sourceNodeSource symbol
port_num_sourceSource port number
destNodeDestination symbol
port_num_destDestination port number

Member Function Documentation

◆ boundingRect()

QRectF Wire::boundingRect ( ) const
protected

Get wire bounding rectangle.

Returns
Bounding rectangle

◆ destNode()

Symbol * Wire::destNode ( ) const
inline

Get destination symbol.

Returns
Destination symbol pointer

◆ paint()

void Wire::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget 
)
protected

Paint wire.

Parameters
painterQPainter instance
optionStyle options
widgetTarget widget

◆ setColor()

void Wire::setColor ( QColor  Color)
inline

Set wire color.

Parameters
ColorWire color

◆ setDestination()

void Wire::setDestination ( Symbol destNode,
int  port 
)
inline

Set wire destination.

Parameters
destNodeDestination symbol
portDestination port number

◆ setSource()

void Wire::setSource ( Symbol destNode,
int  port 
)
inline

Set wire source.

Parameters
sourceNodeSource symbol
portSource port number

◆ sourceNode()

Symbol * Wire::sourceNode ( ) const
inline

Get source symbol.

Returns
Source symbol pointer

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