QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
TerminalStripBridge Class Reference

#include <terminalstripbridge.h>

Collaboration diagram for TerminalStripBridge:
Collaboration graph

Public Member Functions

 TerminalStripBridge (TerminalStrip *parent_strip=nullptr)
 
QSharedPointer< TerminalStripBridgesharedRef ()
 TerminalStripBridge::sharedRef.
 
QWeakPointer< TerminalStripBridgeweakRef ()
 TerminalStripBridge::weakRef.
 
QColor color () const
 TerminalStripBridge::color.
 
void setColor (const QColor &color)
 
QVector< QSharedPointer< RealTerminal > > realTerminals () const
 TerminalStripBridge::realTerminals.
 
QDomElement toXml (QDomDocument &parent_document) const
 TerminalStripBridge::toXml Save this bridge into a QDomElement and return it.
 
void fromXml (const QDomElement &dom_element)
 
QUuid uuid () const noexcept
 TerminalStripBridge::uuid.
 

Static Public Member Functions

static QVector< QColor > bridgeColor ()
 
static QString xmlTagName ()
 

Private Member Functions

bool addTerminals (const QVector< QSharedPointer< RealTerminal > > &real_terminals)
 TerminalStripBridge::addTerminals.
 
void removeTerminals (const QVector< QSharedPointer< RealTerminal > > &real_terminals)
 TerminalStripBridge::removeTerminals.
 
void removeTerminal (const QSharedPointer< RealTerminal > &real_terminal)
 

Private Attributes

QPointer< TerminalStripm_strip
 
QVector< QSharedPointer< RealTerminal > > m_real_terminals
 
QColor m_color = Qt::darkGray
 
QUuid m_uuid = QUuid::createUuid()
 
QWeakPointer< TerminalStripBridgem_this_weak
 

Friends

class TerminalStrip
 

Constructor & Destructor Documentation

◆ TerminalStripBridge()

TerminalStripBridge::TerminalStripBridge ( TerminalStrip parent_strip = nullptr)

Member Function Documentation

◆ addTerminals()

bool TerminalStripBridge::addTerminals ( const QVector< QSharedPointer< RealTerminal > > &  real_terminals)
private

TerminalStripBridge::addTerminals.

Parameters
real_terminals
Returns
Add terminals of real_terminals to this bridge. If a terminal is already bridged by this bridge, the terminal is ignored. If at least one terminal doesn't belong to the same strip of this bridge this function do nothing and return false.

◆ bridgeColor()

static QVector< QColor > TerminalStripBridge::bridgeColor ( )
inlinestatic
Here is the caller graph for this function:

◆ color()

QColor TerminalStripBridge::color ( ) const

TerminalStripBridge::color.

Returns
The color of this bridge
Here is the caller graph for this function:

◆ fromXml()

void TerminalStripBridge::fromXml ( const QDomElement &  dom_element)
Here is the call graph for this function:

◆ realTerminals()

QVector< QSharedPointer< RealTerminal > > TerminalStripBridge::realTerminals ( ) const

TerminalStripBridge::realTerminals.

Returns
the real terminals who are bridged by this bridge

◆ removeTerminal()

void TerminalStripBridge::removeTerminal ( const QSharedPointer< RealTerminal > &  real_terminal)
private

◆ removeTerminals()

void TerminalStripBridge::removeTerminals ( const QVector< QSharedPointer< RealTerminal > > &  real_terminals)
private

TerminalStripBridge::removeTerminals.

Parameters
real_terminalRemove all real terminal of @real_terminals from this bridge. This function doesn't make any check, they just remove if exist.
See also
TerminalStrip::canUnBridge

◆ setColor()

void TerminalStripBridge::setColor ( const QColor &  color)
Here is the call graph for this function:

◆ sharedRef()

QSharedPointer< TerminalStripBridge > TerminalStripBridge::sharedRef ( )

TerminalStripBridge::sharedRef.

Returns
a QSharedPointer of this
Here is the call graph for this function:
Here is the caller graph for this function:

◆ toXml()

QDomElement TerminalStripBridge::toXml ( QDomDocument &  parent_document) const

TerminalStripBridge::toXml Save this bridge into a QDomElement and return it.

Parameters
parent_document
Returns
Here is the call graph for this function:

◆ uuid()

QUuid TerminalStripBridge::uuid ( ) const
noexcept

TerminalStripBridge::uuid.

Returns
The uuid of this terminal

◆ weakRef()

QWeakPointer< TerminalStripBridge > TerminalStripBridge::weakRef ( )

TerminalStripBridge::weakRef.

Returns
a QWeakPointer of this, weak pointer can be null
Here is the caller graph for this function:

◆ xmlTagName()

static QString TerminalStripBridge::xmlTagName ( )
inlinestatic
Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ TerminalStrip

friend class TerminalStrip
friend

Member Data Documentation

◆ m_color

QColor TerminalStripBridge::m_color = Qt::darkGray
private

◆ m_real_terminals

QVector<QSharedPointer<RealTerminal> > TerminalStripBridge::m_real_terminals
private

◆ m_strip

QPointer<TerminalStrip> TerminalStripBridge::m_strip
private

◆ m_this_weak

QWeakPointer<TerminalStripBridge> TerminalStripBridge::m_this_weak
private

◆ m_uuid

QUuid TerminalStripBridge::m_uuid = QUuid::createUuid()
private

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