The TerminalData class Data of the terminal. Stored in extra class so it can be used by PartTerminal and Terminal without defining everything again.
More...
#include <terminaldata.h>
|
QGraphicsObject * | q {nullptr} |
|
The TerminalData class Data of the terminal. Stored in extra class so it can be used by PartTerminal and Terminal without defining everything again.
- Note
- tis class needs to be work on
◆ Type
Enumerator |
---|
Generic | |
Inner | |
Outer | |
◆ TerminalData() [1/2]
TerminalData::TerminalData |
( |
| ) |
|
◆ TerminalData() [2/2]
TerminalData::TerminalData |
( |
QGraphicsObject * |
parent | ) |
|
◆ ~TerminalData()
TerminalData::~TerminalData |
( |
| ) |
|
|
override |
◆ fromSettings()
void TerminalData::fromSettings |
( |
const QSettings & |
settings, |
|
|
const QString |
prefix = QString() |
|
) |
| |
|
overridevirtual |
◆ fromXml()
bool TerminalData::fromXml |
( |
const QDomElement & |
xml_element | ) |
|
|
overridevirtual |
◆ init()
void TerminalData::init |
( |
| ) |
|
◆ setParent()
void TerminalData::setParent |
( |
QGraphicsObject * |
parent | ) |
|
◆ toSettings()
void TerminalData::toSettings |
( |
QSettings & |
settings, |
|
|
const QString |
prefix = QString() |
|
) |
| const |
|
overridevirtual |
◆ toXml()
QDomElement TerminalData::toXml |
( |
QDomDocument & |
xml_document | ) |
const |
|
overridevirtual |
TerminalData::toXml Save properties to xml element write the name, number, position and orientation of the terminal to xml_element.
- Note
- This method is only called from the PartTerminal and should never be called from the Terminal class
- Parameters
-
- Returns
- xml_element : DomElement with the name, number, position and orientation of the terminal
Implements PropertiesInterface.
◆ typeFromString()
◆ typeToString()
◆ m_name
QString TerminalData::m_name |
m_name Name of the element. It can be used to create wiring harness tables
◆ m_orientation
m_orientation Orientation of the terminal
◆ m_pos
QPointF TerminalData::m_pos |
m_pos Position of the terminal. The second point is calculated from this position and the orientation
- Note
- Important: this variable is only updated during read from xml and not during mouse move! It is used to store the initial position so that PartTerminal and Terminal have access to it.
◆ m_second_point
QPointF TerminalData::m_second_point |
second_point Position of the second point of the terminal in scene coordinates
◆ m_type
◆ m_uuid
QUuid TerminalData::m_uuid |
m_uuid Uuid of the terminal.
In elementscene.cpp an element gets a new uuid when saving the element. In the current state each connection is made by using the local position of the terminal and a dynamic id. In the new case, each terminal should have it's own uuid to identify it uniquely. When changing each time this uuid, the conductor after updating the part is anymore valid. So if in the loaded document a uuid exists, use this one and don't create a new one.
QGraphicsObject* TerminalData::q {nullptr} |
|
private |
The documentation for this class was generated from the following files: