22#include "../diagramcontext.h"
23#include "../NameList/nameslist.h"
46 Q_DECLARE_FLAGS(Types,
Type)
91 void toSettings(QSettings &settings,
const QString prefix = QString())
const override;
92 void fromSettings(
const QSettings &settings,
const QString prefix = QString())
override;
93 QDomElement
toXml(QDomDocument &xml_element)
const override;
94 bool fromXml(
const QDomElement &xml_element)
override;
164Q_DECLARE_OPERATORS_FOR_FLAGS(ElementData::Types)
Definition diagramcontext.h:57
The ElementData class WARNING This class inherit from PropertiesInterface but only fromXml is actuall...
Definition elementdata.h:32
bool m_terminal_led_is_override
Definition elementdata.h:157
ElementData::TerminalFunction m_override_terminal_function
Definition elementdata.h:153
bool m_terminal_led
Definition elementdata.h:156
static ElementData::TerminalType terminalTypeFromString(const QString &string)
Definition elementdata.cpp:471
void kindInfoFromXml(const QDomElement &xml_element)
Definition elementdata.cpp:547
void fromSettings(const QSettings &settings, const QString prefix=QString()) override
fromSettings load properties to setting file.
Definition elementdata.cpp:27
QString m_drawing_information
Definition elementdata.h:147
bool operator!=(const ElementData &data) const
Definition elementdata.cpp:291
QDomElement toXml(QDomDocument &xml_element) const override
toXml Save properties to xml element
Definition elementdata.cpp:32
ElementData::Type m_type
Definition elementdata.h:134
static ElementData::Type typeFromString(const QString &string)
Definition elementdata.cpp:323
ElementData::SlaveType m_slave_type
Definition elementdata.h:138
void setTerminalType(ElementData::TerminalType t_type)
ElementData::setTerminalType Override the terminal type by t_type.
Definition elementdata.cpp:130
QString masterTypeToString() const
Definition elementdata.cpp:348
ElementData::MasterType m_master_type
Definition elementdata.h:136
bool terminalPropertiesIsOverrided() const
ElementData::terminalPropertiesIsOverrided.
Definition elementdata.cpp:207
TerminalType
Definition elementdata.h:72
@ TTSectional
Definition elementdata.h:75
@ TTGeneric
Definition elementdata.h:73
@ TTGround
Definition elementdata.h:77
@ TTFuse
Definition elementdata.h:74
@ TTDiode
Definition elementdata.h:76
NamesList m_names_list
Definition elementdata.h:146
QString typeToString() const
Definition elementdata.cpp:295
static QString terminalTypeToString(ElementData::TerminalType type)
Definition elementdata.cpp:454
Type
Definition elementdata.h:36
@ Terminale
Definition elementdata.h:43
@ PreviousReport
Definition elementdata.h:39
@ NextReport
Definition elementdata.h:38
@ Thumbnail
Definition elementdata.h:44
@ Simple
Definition elementdata.h:37
@ Master
Definition elementdata.h:41
@ Slave
Definition elementdata.h:42
@ AllReport
Definition elementdata.h:40
MasterType
Definition elementdata.h:48
@ Commutator
Definition elementdata.h:51
@ Coil
Definition elementdata.h:49
@ Protection
Definition elementdata.h:50
static ElementData::MasterType masterTypeFromString(const QString &string)
Definition elementdata.cpp:368
TerminalFunction
Definition elementdata.h:81
@ TFGeneric
Definition elementdata.h:82
@ TFNeutral
Definition elementdata.h:84
@ TFPhase
Definition elementdata.h:83
DiagramContext m_informations
Definition elementdata.h:145
static QString terminalFunctionToString(ElementData::TerminalFunction function)
Definition elementdata.cpp:508
SlaveState
Definition elementdata.h:64
@ SW
Definition elementdata.h:67
@ Other
Definition elementdata.h:68
@ NO
Definition elementdata.h:65
@ NC
Definition elementdata.h:66
~ElementData() override
Definition elementdata.h:89
void toSettings(QSettings &settings, const QString prefix=QString()) const override
toSettings Save properties to setting file.
Definition elementdata.cpp:22
ElementData::TerminalFunction m_terminal_function
Definition elementdata.h:142
bool terminalLed() const
ElementData::terminalLed.
Definition elementdata.cpp:196
static QString translatedTerminalFunction(ElementData::TerminalFunction function)
Definition elementdata.cpp:537
void setTerminalLED(bool led)
ElementData::setTerminalLED Override the terminal led by led.
Definition elementdata.cpp:182
ElementData::TerminalType terminalType() const
ElementData::terminalType.
Definition elementdata.cpp:144
ElementData::TerminalType m_terminal_type
Definition elementdata.h:141
static ElementData::TerminalFunction terminalFunctionFromString(const QString &string)
Definition elementdata.cpp:521
void setTerminalFunction(ElementData::TerminalFunction t_function)
ElementData::setTerminalFunction Override the terminal function by t_function.
Definition elementdata.cpp:156
int m_contact_count
Definition elementdata.h:144
ElementData::TerminalType m_override_terminal_type
Definition elementdata.h:150
bool m_terminal_function_is_override
Definition elementdata.h:154
bool operator==(const ElementData &data) const
Definition elementdata.cpp:218
static ElementData::SlaveState slaveStateFromString(const QString &string)
Definition elementdata.cpp:436
static QString translatedTerminalType(ElementData::TerminalType type)
Definition elementdata.cpp:491
QDomElement kindInfoToXml(QDomDocument &document)
Definition elementdata.cpp:66
ElementData::SlaveState m_slave_state
Definition elementdata.h:139
bool fromXml(const QDomElement &xml_element) override
ElementData::fromXml load properties from xml element. The tag name of xml_element must be definition...
Definition elementdata.cpp:45
static ElementData::SlaveType slaveTypeFromString(const QString &string)
Definition elementdata.cpp:401
SlaveType
Definition elementdata.h:55
@ Power
Definition elementdata.h:57
@ DelayOff
Definition elementdata.h:59
@ SSimple
Definition elementdata.h:56
@ DelayOn
Definition elementdata.h:58
@ delayOnOff
Definition elementdata.h:60
bool m_override_terminal_led
Definition elementdata.h:158
ElementData::TerminalFunction terminalFunction() const
ElementData::terminalFunction.
Definition elementdata.cpp:170
bool m_terminal_type_is_override
Definition elementdata.h:151
static QString slaveTypeToString(ElementData::SlaveType type)
Definition elementdata.cpp:384
static QString slaveStateToString(ElementData::SlaveState type)
Definition elementdata.cpp:421
Definition nameslist.h:31
The PropertiesInterface class This class is an interface for have common way to use properties in QEl...
Definition propertiesinterface.h:31