QElectroTech 0.100.0-dev
|
The PhysicalTerminal class Represent a physical terminal. A physical terminal is composed a least by one RealTerminal. When a physical terminal have more than one real terminal that mean the physical terminal have levels (one by real terminal). The index of real terminals returned by the function terminals() is the same as the real level of the real terminal, the index are from back to front. More...
#include <physicalterminal.h>
Public Member Functions | |
PhysicalTerminal () | |
~PhysicalTerminal () | |
TerminalStrip * | terminalStrip () const |
PhysicalTerminal::terminalStrip. | |
int | levelCount () const |
levelCount | |
int | levelOf (const QSharedPointer< RealTerminal > &terminal) const |
levelOf | |
QVector< QSharedPointer< RealTerminal > > | realTerminals () const |
terminals | |
QUuid | uuid () const |
uuid | |
int | pos () const |
int | realTerminalCount () const |
Static Public Member Functions | |
static QString | xmlTagName () |
Private Member Functions | |
PhysicalTerminal (TerminalStrip *parent_strip, QVector< QSharedPointer< RealTerminal > > terminals) | |
PhysicalTerminal. | |
QSharedPointer< PhysicalTerminal > | sharedRef () |
PhysicalTerminal::sharedRef. | |
QWeakPointer< PhysicalTerminal > | weakRef () |
PhysicalTerminal::weakRef. | |
QDomElement | toXml (QDomDocument &parent_document) const |
toXml | |
void | setTerminals (const QVector< QSharedPointer< RealTerminal > > &terminals) |
setTerminals Set the RealTerminal who compose this physical terminal. The position of the RealTerminal in terminals represent the level of these in this physical terminal. | |
void | addTerminal (const QSharedPointer< RealTerminal > &terminal) |
addTerminals Append the real terminal terminal to this physical terminal. | |
bool | removeTerminal (const QSharedPointer< RealTerminal > &terminal) |
removeTerminal Remove terminal from the list of real terminal | |
bool | setLevelOf (const QSharedPointer< RealTerminal > &terminal, int level) |
setLevelOf Change the level of terminal | |
void | setParentStrip (TerminalStrip *strip) |
Private Attributes | |
QPointer< TerminalStrip > | m_parent_terminal_strip |
QVector< QSharedPointer< RealTerminal > > | m_real_terminal |
QUuid | m_uuid = QUuid::createUuid() |
QWeakPointer< PhysicalTerminal > | m_this_weak |
Friends | |
class | TerminalStrip |
class | RealTerminal |
The PhysicalTerminal class Represent a physical terminal. A physical terminal is composed a least by one RealTerminal. When a physical terminal have more than one real terminal that mean the physical terminal have levels (one by real terminal). The index of real terminals returned by the function terminals() is the same as the real level of the real terminal, the index are from back to front.
Example for a 3 levels terminal. index 0 = back (mounting plate) index 1 = middle index 2 = front (electrical cabinet door)
m o _ u | | n | | _ t | || | i | || | _ n | || || | d g |0||1||2| o | || ||_| o p | || | r l | ||_| a | | t |_| e
|
private |
parent_strip | : Parent terminal strip |
terminals | : A vector of real terminals who compose this physical terminal. terminals must have at least one terminal |
|
inline |
PhysicalTerminal::~PhysicalTerminal | ( | ) |
|
private |
addTerminals Append the real terminal terminal to this physical terminal.
terminal |
int PhysicalTerminal::levelCount | ( | ) | const |
levelCount
int PhysicalTerminal::levelOf | ( | const QSharedPointer< RealTerminal > & | terminal | ) | const |
levelOf
terminal |
terminal
or -1 if \terminal is not a part of this physicalTerminal int PhysicalTerminal::pos | ( | ) | const |
int PhysicalTerminal::realTerminalCount | ( | ) | const |
QVector< QSharedPointer< RealTerminal > > PhysicalTerminal::realTerminals | ( | ) | const |
terminals
|
private |
removeTerminal Remove terminal from the list of real terminal
terminal |
|
private |
setLevelOf Change the level of terminal
terminal | |
level |
|
private |
|
private |
setTerminals Set the RealTerminal who compose this physical terminal. The position of the RealTerminal in terminals represent the level of these in this physical terminal.
terminals |
|
private |
TerminalStrip * PhysicalTerminal::terminalStrip | ( | ) | const |
PhysicalTerminal::terminalStrip.
|
private |
toXml
parent_document |
QUuid PhysicalTerminal::uuid | ( | ) | const |
uuid
|
private |
|
static |
|
friend |
|
friend |
|
private |
|
private |
|
private |
|
private |