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 | |
| No | Normally Open terminal (for SW contacts).
|
| Nc | Normally Closed terminal (for SW contacts).
|
| Common | Common terminal (for SW contacts).
|
◆ 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_label_color
| QColor TerminalData::m_label_color = Qt::black |
◆ m_label_font
| QFont TerminalData::m_label_font |
Font used for the text label.
◆ m_label_frame
| bool TerminalData::m_label_frame = false |
Whether to draw a frame around the text label.
◆ m_label_halignment
| Qt::Alignment TerminalData::m_label_halignment = Qt::AlignHCenter |
Horizontal alignment of the text label.
◆ m_label_pos
| QPointF TerminalData::m_label_pos {0.0, 0.0} |
Position of the text label relative to the terminal.
◆ m_label_rotation
| qreal TerminalData::m_label_rotation = 0.0 |
Rotation of the text label in degrees.
◆ m_label_valignment
| Qt::Alignment TerminalData::m_label_valignment = Qt::AlignVCenter |
Vertical alignment of the text label.
◆ m_master_label_index
| int TerminalData::m_master_label_index = 0 |
Index into the master's contact group labels (T1=0, T2=1, ..., T20=19).
◆ 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_show_name
| bool TerminalData::m_show_name = false |
Whether to display the terminal name as a text label.
◆ m_type
◆ m_use_master_label
| bool TerminalData::m_use_master_label = false |
Whether this terminal uses a label from the master's contact group.
◆ 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: