QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
ElementData Class Reference

The ElementData class WARNING This class inherit from PropertiesInterface but only fromXml is actually reimplemented. More...

#include <elementdata.h>

Inheritance diagram for ElementData:
Inheritance graph
Collaboration diagram for ElementData:
Collaboration graph

Public Types

enum  Type {
  Simple = 1 , NextReport = 2 , PreviousReport = 4 , AllReport = 6 ,
  Master = 8 , Slave = 16 , Terminale = 32 , Thumbnail = 64
}
 
enum  MasterType { Coil , Protection , Commutator }
 
enum  SlaveType {
  SSimple , Power , DelayOn , DelayOff ,
  delayOnOff
}
 
enum  SlaveState { NO , NC , SW , Other }
 
enum  TerminalType {
  TTGeneric , TTFuse , TTSectional , TTDiode ,
  TTGround
}
 
enum  TerminalFunction { TFGeneric , TFPhase , TFNeutral }
 

Public Member Functions

 ElementData ()
 
 ~ElementData () override
 
void toSettings (QSettings &settings, const QString prefix=QString()) const override
 toSettings Save properties to setting file.
 
void fromSettings (const QSettings &settings, const QString prefix=QString()) override
 fromSettings load properties to setting file.
 
QDomElement toXml (QDomDocument &xml_element) const override
 toXml Save properties to xml element
 
bool fromXml (const QDomElement &xml_element) override
 ElementData::fromXml load properties from xml element. The tag name of xml_element must be definition and have an attribute "type".
 
QDomElement kindInfoToXml (QDomDocument &document)
 
void setTerminalType (ElementData::TerminalType t_type)
 ElementData::setTerminalType Override the terminal type by t_type.
 
ElementData::TerminalType terminalType () const
 ElementData::terminalType.
 
void setTerminalFunction (ElementData::TerminalFunction t_function)
 ElementData::setTerminalFunction Override the terminal function by t_function.
 
ElementData::TerminalFunction terminalFunction () const
 ElementData::terminalFunction.
 
void setTerminalLED (bool led)
 ElementData::setTerminalLED Override the terminal led by led.
 
bool terminalLed () const
 ElementData::terminalLed.
 
bool terminalPropertiesIsOverrided () const
 ElementData::terminalPropertiesIsOverrided.
 
bool operator== (const ElementData &data) const
 
bool operator!= (const ElementData &data) const
 
QString typeToString () const
 
QString masterTypeToString () const
 
- Public Member Functions inherited from PropertiesInterface
 PropertiesInterface ()
 PropertiesInterface::PropertiesInterface.
 
virtual ~PropertiesInterface ()
 PropertiesInterface::~PropertiesInterface.
 

Static Public Member Functions

static QString typeToString (ElementData::Type type)
 
static ElementData::Type typeFromString (const QString &string)
 
static QString masterTypeToString (ElementData::MasterType type)
 
static ElementData::MasterType masterTypeFromString (const QString &string)
 
static QString slaveTypeToString (ElementData::SlaveType type)
 
static ElementData::SlaveType slaveTypeFromString (const QString &string)
 
static QString slaveStateToString (ElementData::SlaveState type)
 
static ElementData::SlaveState slaveStateFromString (const QString &string)
 
static QString terminalTypeToString (ElementData::TerminalType type)
 
static ElementData::TerminalType terminalTypeFromString (const QString &string)
 
static QString translatedTerminalType (ElementData::TerminalType type)
 
static QString terminalFunctionToString (ElementData::TerminalFunction function)
 
static ElementData::TerminalFunction terminalFunctionFromString (const QString &string)
 
static QString translatedTerminalFunction (ElementData::TerminalFunction function)
 

Public Attributes

ElementData::Type m_type = ElementData::Simple
 
ElementData::MasterType m_master_type = ElementData::Coil
 
ElementData::SlaveType m_slave_type = ElementData::SSimple
 
ElementData::SlaveState m_slave_state = ElementData::NO
 
ElementData::TerminalType m_terminal_type = ElementData::TTGeneric
 
ElementData::TerminalFunction m_terminal_function = ElementData::TFGeneric
 
int m_contact_count = 1
 
DiagramContext m_informations
 
NamesList m_names_list
 
QString m_drawing_information
 

Private Member Functions

void kindInfoFromXml (const QDomElement &xml_element)
 

Private Attributes

ElementData::TerminalType m_override_terminal_type = ElementData::TTGeneric
 
bool m_terminal_type_is_override = false
 
ElementData::TerminalFunction m_override_terminal_function = ElementData::TFGeneric
 
bool m_terminal_function_is_override = false
 
bool m_terminal_led = false
 
bool m_terminal_led_is_override = false
 
bool m_override_terminal_led = false
 

Detailed Description

The ElementData class WARNING This class inherit from PropertiesInterface but only fromXml is actually reimplemented.

Member Enumeration Documentation

◆ MasterType

Enumerator
Coil 
Protection 
Commutator 

◆ SlaveState

Enumerator
NO 
NC 
SW 
Other 

◆ SlaveType

Enumerator
SSimple 
Power 
DelayOn 
DelayOff 
delayOnOff 

◆ TerminalFunction

Enumerator
TFGeneric 
TFPhase 
TFNeutral 

◆ TerminalType

Enumerator
TTGeneric 
TTFuse 
TTSectional 
TTDiode 
TTGround 

◆ Type

Enumerator
Simple 
NextReport 
PreviousReport 
AllReport 
Master 
Slave 
Terminale 
Thumbnail 

Constructor & Destructor Documentation

◆ ElementData()

ElementData::ElementData ( )
inline

◆ ~ElementData()

ElementData::~ElementData ( )
inlineoverride

Member Function Documentation

◆ fromSettings()

void ElementData::fromSettings ( const QSettings &  settings,
const QString  = QString() 
)
overridevirtual

fromSettings load properties to setting file.

Parameters
settings: is use for prefix a word before the name of each parameter
QString

Implements PropertiesInterface.

◆ fromXml()

bool ElementData::fromXml ( const QDomElement &  xml_element)
overridevirtual

ElementData::fromXml load properties from xml element. The tag name of xml_element must be definition and have an attribute "type".

Parameters
xml_element: tagName must be 'definition'
Returns
true is successfully loaded

Implements PropertiesInterface.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kindInfoFromXml()

void ElementData::kindInfoFromXml ( const QDomElement &  xml_element)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kindInfoToXml()

QDomElement ElementData::kindInfoToXml ( QDomDocument &  document)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ masterTypeFromString()

ElementData::MasterType ElementData::masterTypeFromString ( const QString &  string)
static
Here is the caller graph for this function:

◆ masterTypeToString() [1/2]

QString ElementData::masterTypeToString ( ) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ masterTypeToString() [2/2]

QString ElementData::masterTypeToString ( ElementData::MasterType  type)
static

◆ operator!=()

bool ElementData::operator!= ( const ElementData data) const

◆ operator==()

bool ElementData::operator== ( const ElementData data) const

◆ setTerminalFunction()

void ElementData::setTerminalFunction ( ElementData::TerminalFunction  t_function)

ElementData::setTerminalFunction Override the terminal function by t_function.

Parameters
t_function
Here is the caller graph for this function:

◆ setTerminalLED()

void ElementData::setTerminalLED ( bool  led)

ElementData::setTerminalLED Override the terminal led by led.

Parameters
led
Here is the caller graph for this function:

◆ setTerminalType()

void ElementData::setTerminalType ( ElementData::TerminalType  t_type)

ElementData::setTerminalType Override the terminal type by t_type.

Parameters
t_type
Here is the caller graph for this function:

◆ slaveStateFromString()

ElementData::SlaveState ElementData::slaveStateFromString ( const QString &  string)
static
Here is the caller graph for this function:

◆ slaveStateToString()

QString ElementData::slaveStateToString ( ElementData::SlaveState  type)
static
Here is the caller graph for this function:

◆ slaveTypeFromString()

ElementData::SlaveType ElementData::slaveTypeFromString ( const QString &  string)
static
Here is the caller graph for this function:

◆ slaveTypeToString()

QString ElementData::slaveTypeToString ( ElementData::SlaveType  type)
static
Here is the caller graph for this function:

◆ terminalFunction()

ElementData::TerminalFunction ElementData::terminalFunction ( ) const

ElementData::terminalFunction.

Returns
the terminal function or overrided terminal function if set
Here is the caller graph for this function:

◆ terminalFunctionFromString()

ElementData::TerminalFunction ElementData::terminalFunctionFromString ( const QString &  string)
static
Here is the caller graph for this function:

◆ terminalFunctionToString()

QString ElementData::terminalFunctionToString ( ElementData::TerminalFunction  function)
static
Here is the caller graph for this function:

◆ terminalLed()

bool ElementData::terminalLed ( ) const

ElementData::terminalLed.

Returns
if terminal have led or overrided led if set
Here is the caller graph for this function:

◆ terminalPropertiesIsOverrided()

bool ElementData::terminalPropertiesIsOverrided ( ) const

ElementData::terminalPropertiesIsOverrided.

Returns
true if at least one sub properties of terminal type is overrided

◆ terminalType()

ElementData::TerminalType ElementData::terminalType ( ) const

ElementData::terminalType.

Returns
the terminal type or overrided terminal type if set
Here is the caller graph for this function:

◆ terminalTypeFromString()

ElementData::TerminalType ElementData::terminalTypeFromString ( const QString &  string)
static
Here is the caller graph for this function:

◆ terminalTypeToString()

QString ElementData::terminalTypeToString ( ElementData::TerminalType  type)
static
Here is the caller graph for this function:

◆ toSettings()

void ElementData::toSettings ( QSettings &  settings,
const QString  = QString() 
) const
overridevirtual

toSettings Save properties to setting file.

Parameters
settings: is use for prefix a word before the name of each parameter
QString

Implements PropertiesInterface.

◆ toXml()

QDomElement ElementData::toXml ( QDomDocument &  xml_document) const
overridevirtual

toXml Save properties to xml element

Parameters
xml_document
Returns
QDomElement

Implements PropertiesInterface.

◆ translatedTerminalFunction()

QString ElementData::translatedTerminalFunction ( ElementData::TerminalFunction  function)
static
Here is the caller graph for this function:

◆ translatedTerminalType()

QString ElementData::translatedTerminalType ( ElementData::TerminalType  type)
static
Here is the caller graph for this function:

◆ typeFromString()

ElementData::Type ElementData::typeFromString ( const QString &  string)
static
Here is the caller graph for this function:

◆ typeToString() [1/2]

QString ElementData::typeToString ( ) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ typeToString() [2/2]

QString ElementData::typeToString ( ElementData::Type  type)
static

Member Data Documentation

◆ m_contact_count

int ElementData::m_contact_count = 1

◆ m_drawing_information

QString ElementData::m_drawing_information

◆ m_informations

DiagramContext ElementData::m_informations

◆ m_master_type

ElementData::MasterType ElementData::m_master_type = ElementData::Coil

◆ m_names_list

NamesList ElementData::m_names_list

◆ m_override_terminal_function

ElementData::TerminalFunction ElementData::m_override_terminal_function = ElementData::TFGeneric
private

◆ m_override_terminal_led

bool ElementData::m_override_terminal_led = false
private

◆ m_override_terminal_type

ElementData::TerminalType ElementData::m_override_terminal_type = ElementData::TTGeneric
private

◆ m_slave_state

ElementData::SlaveState ElementData::m_slave_state = ElementData::NO

◆ m_slave_type

ElementData::SlaveType ElementData::m_slave_type = ElementData::SSimple

◆ m_terminal_function

ElementData::TerminalFunction ElementData::m_terminal_function = ElementData::TFGeneric

◆ m_terminal_function_is_override

bool ElementData::m_terminal_function_is_override = false
private

◆ m_terminal_led

bool ElementData::m_terminal_led = false
private

◆ m_terminal_led_is_override

bool ElementData::m_terminal_led_is_override = false
private

◆ m_terminal_type

ElementData::TerminalType ElementData::m_terminal_type = ElementData::TTGeneric

◆ m_terminal_type_is_override

bool ElementData::m_terminal_type_is_override = false
private

◆ m_type

ElementData::Type ElementData::m_type = ElementData::Simple

The documentation for this class was generated from the following files: