QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
realterminal.h
Go to the documentation of this file.
1/*
2 Copyright 2006-2024 The QElectroTech Team
3 This file is part of QElectroTech.
4
5 QElectroTech is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 2 of the License, or
8 (at your option) any later version.
9
10 QElectroTech is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
17*/
18#ifndef REALTERMINAL_H
19#define REALTERMINAL_H
20
21#include <QSharedPointer>
22#include <QDomElement>
23#include "../properties/elementdata.h"
24
25class TerminalStrip;
26class Element;
27class TerminalElement;
30
43{
44 friend class TerminalElement;
45 friend class PhysicalTerminal;
46
47 private:
49
50 QSharedPointer<RealTerminal> sharedRef();
51 QSharedPointer<RealTerminal> sharedRef() const;
52 QWeakPointer<RealTerminal> weakRef();
53
54 void setPhysicalTerminal(const QSharedPointer<PhysicalTerminal> &phy_t);
55
56 public:
58 TerminalStrip *parentStrip() const noexcept;
59 QSharedPointer<PhysicalTerminal> physicalTerminal() const noexcept;
60
61 QDomElement toXml(QDomDocument &parent_document) const;
62
63 int level() const;
64 QString label() const;
65 QString Xref() const;
66 QString cable() const;
67 QString cableWire() const;
68 QString conductor() const;
69
70 ElementData::TerminalType type() const;
71 ElementData::TerminalFunction function() const;
72
73 bool isLed() const;
74 bool isElement() const;
75 bool isBridged() const;
76
77 QSharedPointer<TerminalStripBridge> bridge() const;
78
79 Element* element() const;
80 QUuid elementUuid() const;
81
82 static QString xmlTagName();
83
84 private :
85 QPointer<Element> m_element;
88};
89
90#endif // REALTERMINAL_H
The ElementData class WARNING This class inherit from PropertiesInterface but only fromXml is actuall...
Definition elementdata.h:32
Definition element.h:43
The PhysicalTerminal class Represent a physical terminal. A physical terminal is composed a least by ...
Definition physicalterminal.h:62
The RealTerminal class Represent a real terminal. A real terminal can be a drawn terminal in a folio ...
Definition realterminal.h:43
void setPhysicalTerminal(const QSharedPointer< PhysicalTerminal > &phy_t)
RealTerminal::setPhysicalTerminal Set the parent physical terminal of this real terminal.
Definition realterminal.cpp:93
~RealTerminal()
Definition realterminal.cpp:33
QUuid elementUuid() const
elementUuid
Definition realterminal.cpp:275
bool isBridged() const
RealTerminal::isBridged.
Definition realterminal.cpp:238
QSharedPointer< PhysicalTerminal > m_physical_terminal
Definition realterminal.h:87
QWeakPointer< RealTerminal > m_this_weak
Definition realterminal.h:86
QString cableWire() const
RealTerminal::cableWire.
Definition realterminal.cpp:170
ElementData::TerminalType type() const
RealTerminal::type.
Definition realterminal.cpp:193
QSharedPointer< TerminalStripBridge > bridge() const
RealTerminal::bridge.
Definition realterminal.cpp:251
QString cable() const
RealTerminal::cable.
Definition realterminal.cpp:162
bool isElement() const
isElement
Definition realterminal.cpp:229
QSharedPointer< PhysicalTerminal > physicalTerminal() const noexcept
RealTerminal::physicalTerminal.
Definition realterminal.cpp:114
static QString xmlTagName()
QDomElement toXml(QDomDocument &parent_document) const
toXml
Definition realterminal.cpp:79
TerminalStrip * parentStrip() const noexcept
parentStrip
Definition realterminal.cpp:101
QWeakPointer< RealTerminal > weakRef()
RealTerminal::weakRef.
Definition realterminal.cpp:70
Element * element() const
element
Definition realterminal.cpp:265
ElementData::TerminalFunction function() const
RealTerminal::function.
Definition realterminal.cpp:205
bool isLed() const
RealTerminal::isLed.
Definition realterminal.cpp:217
QString Xref() const
RealTerminal::Xref.
Definition realterminal.cpp:149
QString conductor() const
RealTerminal::conductor.
Definition realterminal.cpp:178
QPointer< Element > m_element
Definition realterminal.h:85
int level() const
RealTerminal::level.
Definition realterminal.cpp:122
QString label() const
label
Definition realterminal.cpp:136
QSharedPointer< RealTerminal > sharedRef()
RealTerminal::sharedRef.
Definition realterminal.cpp:44
The TerminalElement class.
Definition terminalelement.h:31
Definition terminalstripbridge.h:32
The TerminalStrip class This class hold all the datas and configurations of a terminal strip (but the...
Definition terminalstrip.h:45