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
RealTerminal Class Reference

The RealTerminal class Represent a real terminal. A real terminal can be a drawn terminal in a folio or a terminal set by user but not present on any folio (for example a reserved terminal). More...

#include <realterminal.h>

Collaboration diagram for RealTerminal:
Collaboration graph

Public Member Functions

 ~RealTerminal ()
 
TerminalStripparentStrip () const noexcept
 parentStrip
 
QSharedPointer< PhysicalTerminalphysicalTerminal () const noexcept
 RealTerminal::physicalTerminal.
 
QDomElement toXml (QDomDocument &parent_document) const
 toXml
 
int level () const
 RealTerminal::level.
 
QString label () const
 label
 
QString Xref () const
 RealTerminal::Xref.
 
QString cable () const
 RealTerminal::cable.
 
QString cableWire () const
 RealTerminal::cableWire.
 
QString conductor () const
 RealTerminal::conductor.
 
ElementData::TerminalType type () const
 RealTerminal::type.
 
ElementData::TerminalFunction function () const
 RealTerminal::function.
 
bool isLed () const
 RealTerminal::isLed.
 
bool isElement () const
 isElement
 
bool isBridged () const
 RealTerminal::isBridged.
 
QSharedPointer< TerminalStripBridgebridge () const
 RealTerminal::bridge.
 
Elementelement () const
 element
 
QUuid elementUuid () const
 elementUuid
 

Static Public Member Functions

static QString xmlTagName ()
 

Private Member Functions

 RealTerminal (Element *element)
 RealTerminal.
 
QSharedPointer< RealTerminalsharedRef ()
 RealTerminal::sharedRef.
 
QSharedPointer< RealTerminalsharedRef () const
 RealTerminal::sharedRef.
 
QWeakPointer< RealTerminalweakRef ()
 RealTerminal::weakRef.
 
void setPhysicalTerminal (const QSharedPointer< PhysicalTerminal > &phy_t)
 RealTerminal::setPhysicalTerminal Set the parent physical terminal of this real terminal.
 

Private Attributes

QPointer< Elementm_element
 
QWeakPointer< RealTerminalm_this_weak
 
QSharedPointer< PhysicalTerminalm_physical_terminal
 

Friends

class TerminalElement
 
class PhysicalTerminal
 

Detailed Description

The RealTerminal class Represent a real terminal. A real terminal can be a drawn terminal in a folio or a terminal set by user but not present on any folio (for example a reserved terminal).

When create a new instance of RealTerminal you must call sharedRef() and only use the returned QSharedPointer instead of the raw pointer

Constructor & Destructor Documentation

◆ RealTerminal()

RealTerminal::RealTerminal ( Element terminal)
private

RealTerminal.

Parameters
parent_strip: parent terminal strip
terminal: terminal element (if any) in a folio

◆ ~RealTerminal()

RealTerminal::~RealTerminal ( )
Here is the call graph for this function:

Member Function Documentation

◆ bridge()

QSharedPointer< TerminalStripBridge > RealTerminal::bridge ( ) const

RealTerminal::bridge.

Returns
Here is the call graph for this function:

◆ cable()

QString RealTerminal::cable ( ) const

◆ cableWire()

QString RealTerminal::cableWire ( ) const

◆ conductor()

QString RealTerminal::conductor ( ) const

◆ element()

Element * RealTerminal::element ( ) const

element

Returns
the element linked to this real terminal or nullptr if not linked to an Element.

◆ elementUuid()

QUuid RealTerminal::elementUuid ( ) const

elementUuid

Returns
if this real terminal is an element in a folio, return the uuid of the element else return a null uuid.
Here is the call graph for this function:

◆ function()

ElementData::TerminalFunction RealTerminal::function ( ) const

◆ isBridged()

bool RealTerminal::isBridged ( ) const

RealTerminal::isBridged.

Returns
true if is bridged.
See also
TerminalStrip::isBridged
Here is the call graph for this function:

◆ isElement()

bool RealTerminal::isElement ( ) const

isElement

Returns
true if this real terminal is linked to a terminal element

◆ isLed()

bool RealTerminal::isLed ( ) const

◆ label()

QString RealTerminal::label ( ) const

label

Returns
the label of this real terminal

◆ level()

int RealTerminal::level ( ) const

RealTerminal::level.

Returns
Here is the call graph for this function:

◆ parentStrip()

TerminalStrip * RealTerminal::parentStrip ( ) const
noexcept

parentStrip

Returns
parent terminal strip or nullptr
Here is the caller graph for this function:

◆ physicalTerminal()

QSharedPointer< PhysicalTerminal > RealTerminal::physicalTerminal ( ) const
noexcept

RealTerminal::physicalTerminal.

Returns
The parent physical terminal of this terminal. The returned QSharedPointer can be null

◆ setPhysicalTerminal()

void RealTerminal::setPhysicalTerminal ( const QSharedPointer< PhysicalTerminal > &  phy_t)
private

RealTerminal::setPhysicalTerminal Set the parent physical terminal of this real terminal.

Parameters
phy_t

◆ sharedRef() [1/2]

QSharedPointer< RealTerminal > RealTerminal::sharedRef ( )
private

RealTerminal::sharedRef.

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

◆ sharedRef() [2/2]

QSharedPointer< RealTerminal > RealTerminal::sharedRef ( ) const
private

RealTerminal::sharedRef.

Returns
a shared reference of this, not that because this method is const, the shared reference can be null if not already used in another part of the code.

◆ toXml()

QDomElement RealTerminal::toXml ( QDomDocument &  parent_document) const

toXml

Parameters
parent_document
Returns
this real terminal to xml
Here is the call graph for this function:

◆ type()

ElementData::TerminalType RealTerminal::type ( ) const

◆ weakRef()

QWeakPointer< RealTerminal > RealTerminal::weakRef ( )
private

RealTerminal::weakRef.

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

◆ xmlTagName()

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

◆ Xref()

QString RealTerminal::Xref ( ) const

RealTerminal::Xref.

Returns
Convenient method to get the XRef formatted to string
Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ PhysicalTerminal

friend class PhysicalTerminal
friend

◆ TerminalElement

friend class TerminalElement
friend

Member Data Documentation

◆ m_element

QPointer<Element> RealTerminal::m_element
private

◆ m_physical_terminal

QSharedPointer<PhysicalTerminal> RealTerminal::m_physical_terminal
private

◆ m_this_weak

QWeakPointer<RealTerminal> RealTerminal::m_this_weak
private

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