18#ifndef TERMINALSTRIP_H
19#define TERMINALSTRIP_H
26#include "../properties/elementdata.h"
32class TerminalStripIndex;
81 bool addTerminal (QSharedPointer<RealTerminal> real_t);
82 void addTerminals (QVector<QSharedPointer<RealTerminal>> real_t_vector);
85 void removeTerminals (QVector<QSharedPointer<RealTerminal>> real_t_vector);
88 bool addTerminal (QSharedPointer<PhysicalTerminal> phy_t);
89 void addTerminals (QVector<QSharedPointer<PhysicalTerminal>> phy_t_vector);
91 void removeTerminals (QVector<QSharedPointer<PhysicalTerminal>> phy_t_vector);
93 int pos(
const QSharedPointer<PhysicalTerminal> &terminal)
const;
101 bool setOrderTo(
const QVector<QSharedPointer<PhysicalTerminal>> &sorted_vector);
102 bool groupTerminals(
const QSharedPointer<PhysicalTerminal> &receiver_terminal,
const QVector<QSharedPointer<RealTerminal>> &added_terminals);
103 void unGroupTerminals(
const QVector<QSharedPointer<RealTerminal>> &terminals_to_ungroup);
104 bool setLevel(
const QSharedPointer<RealTerminal> &real_terminal,
int level);
106 bool isBridgeable(
const QVector<QSharedPointer<RealTerminal>> &real_terminals)
const;
107 bool isBridgeable(QSharedPointer<TerminalStripBridge> bridge,
const QVector<QSharedPointer<RealTerminal>> &real_terminals)
const;
108 bool setBridge(
const QVector<QSharedPointer<RealTerminal>> &real_terminals);
109 bool setBridge(
const QSharedPointer<TerminalStripBridge> &bridge,
const QVector<QSharedPointer<RealTerminal>> &real_terminals);
110 void unBridge(
const QVector<QSharedPointer<RealTerminal>> &real_terminals);
111 bool canUnBridge(
const QVector <QSharedPointer<RealTerminal>> &real_terminals)
const;
112 QSharedPointer<TerminalStripBridge>
isBridged(
const QSharedPointer<RealTerminal> real_terminal)
const;
113 QSharedPointer<TerminalStripBridge>
bridgeFor (
const QVector<QSharedPointer<RealTerminal>> &terminal_vector)
const;
116 QSharedPointer<RealTerminal>
nextTerminalInLevel(
const QSharedPointer<RealTerminal> &real_terminal)
const;
117 QSharedPointer<RealTerminal>
previousRealTerminal(
const QSharedPointer<RealTerminal> &real_terminal)
const;
118 QSharedPointer<RealTerminal>
nextRealTerminal(
const QSharedPointer<RealTerminal> &real_terminal)
const;
120 static QString
xmlTagName() {
return QStringLiteral(
"terminal_strip");}
121 QDomElement
toXml(QDomDocument &parent_document);
122 bool fromXml(QDomElement &xml_element);
128 QVector<QSharedPointer<TerminalStripBridge>>
m_bridge;
The PhysicalTerminal class Represent a physical terminal. A physical terminal is composed a least by ...
Definition physicalterminal.h:62
Definition qetproject.h:62
The RealTerminal class Represent a real terminal. A real terminal can be a drawn terminal in a folio ...
Definition realterminal.h:43
The TerminalElement class.
Definition terminalelement.h:31
Definition terminalstripbridge.h:32
Definition terminalstripdata.h:26
QString m_comment
Definition terminalstripdata.h:50
QString m_description
Definition terminalstripdata.h:51
QString m_name
Definition terminalstripdata.h:49
QString m_location
Definition terminalstripdata.h:48
QString m_installation
Definition terminalstripdata.h:47
QUuid m_uuid
Definition terminalstripdata.h:52
The TerminalStrip class This class hold all the datas and configurations of a terminal strip (but the...
Definition terminalstrip.h:45
bool addTerminal(QSharedPointer< RealTerminal > real_t)
Definition terminalstrip.cpp:105
QString name() const
Definition terminalstrip.h:70
void removeTerminals(QVector< QSharedPointer< RealTerminal > > real_t_vector)
TerminalStrip::removeTerminals Remove terminals in real_t_vector from this terminal strip.
Definition terminalstrip.cpp:209
QString description() const
Definition terminalstrip.h:74
QSharedPointer< TerminalStripBridge > isBridged(const QSharedPointer< RealTerminal > real_terminal) const
TerminalStrip::isBridged Check if real_terminal is bridged.
Definition terminalstrip.cpp:855
QSharedPointer< RealTerminal > realTerminalForUuid(const QUuid &uuid) const
TerminalStrip::realTerminalForUuid.
Definition terminalstrip.cpp:451
void addTerminals(QVector< QSharedPointer< RealTerminal > > real_t_vector)
TerminalStrip::addTerminals Add terminal in real_t_vector to this terminal.
Definition terminalstrip.cpp:129
QString location() const
Definition terminalstrip.h:68
TerminalStripData data() const
TerminalStrip::data.
Definition terminalstrip.cpp:89
bool isBridgeable(const QVector< QSharedPointer< RealTerminal > > &real_terminals) const
TerminalStrip::isBridgeable Check if all realTerminal in real_terminals are bridgeable together....
Definition terminalstrip.cpp:624
int physicalTerminalCount() const
TerminalStrip::physicalTerminalCount.
Definition terminalstrip.cpp:400
void bridgeColorChanged(QSharedPointer< TerminalStripBridge > bridge)
friend class RealTerminalData
Definition terminalstrip.h:47
QVector< QSharedPointer< RealTerminal > > realTerminals() const
TerminalStrip::realTerminals.
Definition terminalstrip.cpp:466
void setLocation(const QString &location)
Definition terminalstrip.cpp:61
QSharedPointer< RealTerminal > nextTerminalInLevel(const QSharedPointer< RealTerminal > &real_terminal) const
TerminalStrip::nextTerminalInLevel.
Definition terminalstrip.cpp:928
QSharedPointer< RealTerminal > previousRealTerminal(const QSharedPointer< RealTerminal > &real_terminal) const
Definition terminalstrip.cpp:947
void setName(const QString &name)
Definition terminalstrip.cpp:65
QString installation() const
Definition terminalstrip.h:66
QVector< QSharedPointer< TerminalStripBridge > > m_bridge
Definition terminalstrip.h:128
QSharedPointer< RealTerminal > previousTerminalInLevel(const QSharedPointer< RealTerminal > &real_terminal) const
TerminalStrip::previousTerminalInLevel.
Definition terminalstrip.cpp:903
QVector< QSharedPointer< PhysicalTerminal > > m_physical_terminals
Definition terminalstrip.h:127
bool setLevel(const QSharedPointer< RealTerminal > &real_terminal, int level)
TerminalStrip::setLevel.
Definition terminalstrip.cpp:597
QETProject * project() const
TerminalStrip::project.
Definition terminalstrip.cpp:81
QVector< QSharedPointer< PhysicalTerminal > > physicalTerminal() const
TerminalStrip::physicalTerminal.
Definition terminalstrip.cpp:442
QUuid uuid() const
Definition terminalstrip.h:75
void addAndGroupTerminals(const QVector< QVector< QSharedPointer< RealTerminal > > > &real_t_vector)
TerminalStrip::addAndGroupTerminals For each real terminals of second vector, add it to terminal stri...
Definition terminalstrip.cpp:154
int pos(const QSharedPointer< PhysicalTerminal > &terminal) const
TerminalStrip::pos.
Definition terminalstrip.cpp:390
void setInstallation(const QString &installation)
Definition terminalstrip.cpp:57
void setDescription(const QString &description)
Definition terminalstrip.cpp:73
QDomElement toXml(QDomDocument &parent_document)
TerminalStrip::toXml.
Definition terminalstrip.cpp:972
bool setBridge(const QVector< QSharedPointer< RealTerminal > > &real_terminals)
TerminalStrip::setBridge Set a bridge between all real terminal of real_terminals.
Definition terminalstrip.cpp:722
bool removeTerminal(QSharedPointer< RealTerminal > real_t)
Definition terminalstrip.cpp:180
bool fromXml(QDomElement &xml_element)
TerminalStrip::fromXml.
Definition terminalstrip.cpp:998
QSharedPointer< RealTerminal > nextRealTerminal(const QSharedPointer< RealTerminal > &real_terminal) const
Definition terminalstrip.cpp:957
void unGroupTerminals(const QVector< QSharedPointer< RealTerminal > > &terminals_to_ungroup)
TerminalStrip::unGroupTerminals Ungroup all real terminals of terminals_to_ungroup.
Definition terminalstrip.cpp:566
static QString xmlTagName()
Definition terminalstrip.h:120
void unBridge(const QVector< QSharedPointer< RealTerminal > > &real_terminals)
TerminalStrip::unBridge Unbridge all real terminals of real_terminals.
Definition terminalstrip.cpp:775
TerminalStripData m_data
Definition terminalstrip.h:125
void setData(const TerminalStripData &data)
TerminalStrip::setData Set the internal data of this strip to data. the uuid of the new data is set t...
Definition terminalstrip.cpp:101
void setComment(const QString &comment)
Definition terminalstrip.cpp:69
bool setOrderTo(const QVector< QSharedPointer< PhysicalTerminal > > &sorted_vector)
TerminalStrip::setSortedTo Sort the physical terminal owned by this strip in the same order as sorted...
Definition terminalstrip.cpp:490
bool canUnBridge(const QVector< QSharedPointer< RealTerminal > > &real_terminals) const
TerminalStrip::canUnBridge.
Definition terminalstrip.cpp:792
QSharedPointer< TerminalStripBridge > bridgeFor(const QVector< QSharedPointer< RealTerminal > > &terminal_vector) const
TerminalStrip::bridgeFor Return the bridge where at least one terminal of terminal_vector belong....
Definition terminalstrip.cpp:876
QPointer< QETProject > m_project
Definition terminalstrip.h:126
bool groupTerminals(const QSharedPointer< PhysicalTerminal > &receiver_terminal, const QVector< QSharedPointer< RealTerminal > > &added_terminals)
TerminalStrip::groupTerminal Add added_terminal to receiver_terminal. At the end of this method,...
Definition terminalstrip.cpp:526
QString comment() const
Definition terminalstrip.h:72
Definition terminalstripmodel.h:47