QElectroTech 0.200.1-dev
Loading...
Searching...
No Matches
XRefProperties Class Reference

The XRefProperties class this class store properties used by XrefItem. More...

#include <xrefproperties.h>

Inheritance diagram for XRefProperties:
Inheritance graph
Collaboration diagram for XRefProperties:
Collaboration graph

Public Types

enum  DisplayHas { Cross , Contacts }
enum  SnapTo { Bottom , Label }

Public Member Functions

 XRefProperties ()
 XRefProperties::XRefProperties Default Constructor.
void toSettings (QSettings &settings, const QString=QString()) const override
 XRefProperties::toSettings Save to settings.
void fromSettings (const QSettings &settings, const QString=QString()) override
 XRefProperties::fromSettings load from settings.
QDomElement toXml (QDomDocument &xml_document) const override
 XRefProperties::toXml Save to xml.
bool fromXml (const QDomElement &xml_element) override
 XRefProperties::fromXml Load from xml.
bool operator== (const XRefProperties &xrp) const
bool operator!= (const XRefProperties &xrp) const
void setShowPowerContac (const bool a)
bool showPowerContact () const
void setShowTerminalName (const bool a)
bool showTerminalName () const
void setDisplayHas (const DisplayHas dh)
DisplayHas displayHas () const
void setSnapTo (const SnapTo st)
SnapTo snapTo () const
void setXrefPos (const Qt::AlignmentFlag xref)
Qt::AlignmentFlag getXrefPos () const
void setPrefix (const QString &key, const QString &value)
QString prefix (const QString &key) const
void setMasterLabel (const QString master)
QString masterLabel () const
void setSlaveLabel (const QString slave)
QString slaveLabel () const
void setOffset (const int offset)
int offset () const
void setSlaveOffset (const int offset)
int slaveOffset () const
void setKey (QString &key)
Public Member Functions inherited from PropertiesInterface
 PropertiesInterface ()
 PropertiesInterface::PropertiesInterface.
virtual ~PropertiesInterface ()
 PropertiesInterface::~PropertiesInterface.

Static Public Member Functions

static QHash< QString, XRefPropertiesdefaultProperties ()
 XRefProperties::defaultProperties.

Private Attributes

bool m_show_power_ctc
bool m_show_terminal_name
DisplayHas m_display
SnapTo m_snap_to
Qt::AlignmentFlag m_xref_pos
QHash< QString, QString > m_prefix
QStringList m_prefix_keys
QString m_master_label
QString m_slave_label
int m_offset
int m_slave_offset
QString m_key

Detailed Description

The XRefProperties class this class store properties used by XrefItem.

Member Enumeration Documentation

◆ DisplayHas

Enumerator
Cross 
Contacts 

◆ SnapTo

Enumerator
Bottom 
Label 

Constructor & Destructor Documentation

◆ XRefProperties()

XRefProperties::XRefProperties ( )

XRefProperties::XRefProperties Default Constructor.

Here is the caller graph for this function:

Member Function Documentation

◆ defaultProperties()

QHash< QString, XRefProperties > XRefProperties::defaultProperties ( )
static

XRefProperties::defaultProperties.

Returns
the default properties stored in the setting file For the xref, there are 2 properties. For coil, stored with the string "coil" in the returned QHash. For protection, stored with the string "protection" in the returned QHash.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ displayHas()

DisplayHas XRefProperties::displayHas ( ) const
inline
Here is the caller graph for this function:

◆ fromSettings()

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

XRefProperties::fromSettings load from settings.

Parameters
settingsQSettings to use
prefixprefix before properties name

Implements PropertiesInterface.

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

◆ fromXml()

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

XRefProperties::fromXml Load from xml.

Parameters
xml_elementQDomElement to use for load

Implements PropertiesInterface.

Here is the caller graph for this function:

◆ getXrefPos()

Qt::AlignmentFlag XRefProperties::getXrefPos ( ) const
inline
Here is the caller graph for this function:

◆ masterLabel()

QString XRefProperties::masterLabel ( ) const
inline
Here is the caller graph for this function:

◆ offset()

int XRefProperties::offset ( ) const
inline
Here is the caller graph for this function:

◆ operator!=()

bool XRefProperties::operator!= ( const XRefProperties & xrp) const
Here is the call graph for this function:

◆ operator==()

bool XRefProperties::operator== ( const XRefProperties & xrp) const
Here is the call graph for this function:

◆ prefix()

QString XRefProperties::prefix ( const QString & key) const
inline
Here is the caller graph for this function:

◆ setDisplayHas()

void XRefProperties::setDisplayHas ( const DisplayHas dh)
inline
Here is the caller graph for this function:

◆ setKey()

void XRefProperties::setKey ( QString & key)
inline

◆ setMasterLabel()

void XRefProperties::setMasterLabel ( const QString master)
inline
Here is the caller graph for this function:

◆ setOffset()

void XRefProperties::setOffset ( const int offset)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setPrefix()

void XRefProperties::setPrefix ( const QString & key,
const QString & value )
inline
Here is the caller graph for this function:

◆ setShowPowerContac()

void XRefProperties::setShowPowerContac ( const bool a)
inline
Here is the caller graph for this function:

◆ setShowTerminalName()

void XRefProperties::setShowTerminalName ( const bool a)
inline
Here is the caller graph for this function:

◆ setSlaveLabel()

void XRefProperties::setSlaveLabel ( const QString slave)
inline
Here is the caller graph for this function:

◆ setSlaveOffset()

void XRefProperties::setSlaveOffset ( const int offset)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSnapTo()

void XRefProperties::setSnapTo ( const SnapTo st)
inline
Here is the caller graph for this function:

◆ setXrefPos()

void XRefProperties::setXrefPos ( const Qt::AlignmentFlag xref)
inline
Here is the caller graph for this function:

◆ showPowerContact()

bool XRefProperties::showPowerContact ( ) const
inline
Here is the caller graph for this function:

◆ showTerminalName()

bool XRefProperties::showTerminalName ( ) const
inline
Here is the caller graph for this function:

◆ slaveLabel()

QString XRefProperties::slaveLabel ( ) const
inline
Here is the caller graph for this function:

◆ slaveOffset()

int XRefProperties::slaveOffset ( ) const
inline
Here is the caller graph for this function:

◆ snapTo()

SnapTo XRefProperties::snapTo ( ) const
inline
Here is the caller graph for this function:

◆ toSettings()

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

XRefProperties::toSettings Save to settings.

Parameters
settingsQSettings to use
prefixprefix before properties name

Implements PropertiesInterface.

Here is the call graph for this function:

◆ toXml()

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

XRefProperties::toXml Save to xml.

Parameters
xml_document: QDomElement to use for saving
Returns
QDomElement

Implements PropertiesInterface.

Here is the call graph for this function:

Member Data Documentation

◆ m_display

DisplayHas XRefProperties::m_display
private

◆ m_key

QString XRefProperties::m_key
private

◆ m_master_label

QString XRefProperties::m_master_label
private

◆ m_offset

int XRefProperties::m_offset
private

◆ m_prefix

QHash<QString, QString> XRefProperties::m_prefix
private

◆ m_prefix_keys

QStringList XRefProperties::m_prefix_keys
private

◆ m_show_power_ctc

bool XRefProperties::m_show_power_ctc
private

◆ m_show_terminal_name

bool XRefProperties::m_show_terminal_name
private

◆ m_slave_label

QString XRefProperties::m_slave_label
private

◆ m_slave_offset

int XRefProperties::m_slave_offset
private

◆ m_snap_to

SnapTo XRefProperties::m_snap_to
private

◆ m_xref_pos

Qt::AlignmentFlag XRefProperties::m_xref_pos
private

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