QElectroTech  0.70
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | List of all members
ConductorProperties Class Reference

#include <conductorproperties.h>

Public Types

enum  ConductorType { Single, Multi }
 The ConductorType enum Represents the kind of a particular conductor: Single: singleline symbols, no text input Multi: text input, no symbol. More...
 

Public Member Functions

 ConductorProperties ()
 
virtual ~ConductorProperties ()
 
void toXml (QDomElement &) const
 ConductorProperties::toXml Export conductor propertie, in the XML element 'e'. More...
 
void fromXml (QDomElement &)
 ConductorProperties::fromXml Import conductor propertie, from the attribute of the xml element 'e'. More...
 
void toSettings (QSettings &, const QString &=QString()) const
 
void fromSettings (QSettings &, const QString &=QString())
 
void applyForEqualAttributes (QList< ConductorProperties > list)
 ConductorProperties::applyForEqualAttributes Test each attribute of properties in the list separatly. For each attributes, if is equal, the attribute is apply to this. More...
 
bool operator== (const ConductorProperties &) const
 ConductorProperties::operator ==. More...
 
bool operator!= (const ConductorProperties &) const
 

Static Public Member Functions

static QString typeToString (ConductorType)
 
static ConductorProperties defaultProperties ()
 ConductorProperties::defaultProperties. More...
 

Public Attributes

ConductorType type
 
QColor color
 
QColor m_color_2
 
QString text
 
QString m_function
 
QString m_tension_protocol
 
QString m_formula
 
int text_size
 
int m_dash_size = 1
 
double cond_size
 
double verti_rotate_text
 
double horiz_rotate_text
 
bool m_show_text
 
bool m_one_text_per_folio
 
bool m_bicolor = false
 
Qt::Alignment m_horizontal_alignment = Qt::AlignBottom
 
Qt::Alignment m_vertical_alignment = Qt::AlignRight
 
Qt::PenStyle style
 
SingleLineProperties singleLineProperties
 

Private Member Functions

void readStyle (const QString &)
 
QString writeStyle () const
 

Detailed Description

This class represents the functional properties of a particular conductor, i.e. properties other than path and terminals.

Definition at line 64 of file conductorproperties.h.

Member Enumeration Documentation

◆ ConductorType

The ConductorType enum Represents the kind of a particular conductor: Single: singleline symbols, no text input Multi: text input, no symbol.

Enumerator
Single 
Multi 

Definition at line 75 of file conductorproperties.h.

Constructor & Destructor Documentation

◆ ConductorProperties()

ConductorProperties::ConductorProperties ( )

Constructeur : par defaut, les proprietes font un conducteur multifilaire noir dont le texte est "_"

Definition at line 222 of file conductorproperties.cpp.

◆ ~ConductorProperties()

ConductorProperties::~ConductorProperties ( )
virtual

Destructeur

Definition at line 238 of file conductorproperties.cpp.

Member Function Documentation

◆ applyForEqualAttributes()

void ConductorProperties::applyForEqualAttributes ( QList< ConductorProperties list)

◆ defaultProperties()

ConductorProperties ConductorProperties::defaultProperties ( )
static

ConductorProperties::defaultProperties.

Returns
the default properties stored in the setting file

Definition at line 640 of file conductorproperties.cpp.

References fromSettings().

Referenced by NewDiagramPage::NewDiagramPage(), QETDiagramEditor::newProject(), and QETProject::readDefaultPropertiesXml().

◆ fromSettings()

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

◆ fromXml()

void ConductorProperties::fromXml ( QDomElement &  e)

◆ operator!=()

bool ConductorProperties::operator!= ( const ConductorProperties other) const
Parameters
otherl'autre ensemble de proprietes avec lequel il faut effectuer la comparaison
Returns
true si les deux ensembles de proprietes sont differents, false sinon

Definition at line 684 of file conductorproperties.cpp.

◆ operator==()

bool ConductorProperties::operator== ( const ConductorProperties other) const

◆ readStyle()

void ConductorProperties::readStyle ( const QString &  style_string)
private

Applique les styles passes en parametre dans cet objet

Parameters
style_stringChaine decrivant le style du conducteur

Definition at line 692 of file conductorproperties.cpp.

References style.

Referenced by fromSettings(), and fromXml().

◆ toSettings()

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

◆ toXml()

void ConductorProperties::toXml ( QDomElement &  e) const

◆ typeToString()

QString ConductorProperties::typeToString ( ConductorType  t)
static
Parameters
ttype du conducteur

Definition at line 405 of file conductorproperties.cpp.

References Multi, and Single.

Referenced by fromSettings(), fromXml(), toSettings(), and toXml().

◆ writeStyle()

QString ConductorProperties::writeStyle ( ) const
private

Exporte le style du conducteur sous forme d'une chaine de caracteres

Returns
une chaine de caracteres decrivant le style du conducteur

Definition at line 718 of file conductorproperties.cpp.

References style.

Referenced by toSettings(), and toXml().

Member Data Documentation

◆ color

QColor ConductorProperties::color

◆ cond_size

double ConductorProperties::cond_size

◆ horiz_rotate_text

double ConductorProperties::horiz_rotate_text

◆ m_bicolor

bool ConductorProperties::m_bicolor = false

◆ m_color_2

QColor ConductorProperties::m_color_2

◆ m_dash_size

int ConductorProperties::m_dash_size = 1

◆ m_formula

QString ConductorProperties::m_formula

◆ m_function

QString ConductorProperties::m_function

◆ m_horizontal_alignment

Qt::Alignment ConductorProperties::m_horizontal_alignment = Qt::AlignBottom

◆ m_one_text_per_folio

bool ConductorProperties::m_one_text_per_folio

◆ m_show_text

bool ConductorProperties::m_show_text

◆ m_tension_protocol

QString ConductorProperties::m_tension_protocol

◆ m_vertical_alignment

Qt::Alignment ConductorProperties::m_vertical_alignment = Qt::AlignRight

◆ singleLineProperties

SingleLineProperties ConductorProperties::singleLineProperties

◆ style

Qt::PenStyle ConductorProperties::style

◆ text

QString ConductorProperties::text

◆ text_size

int ConductorProperties::text_size

◆ type

ConductorType ConductorProperties::type

◆ verti_rotate_text

double ConductorProperties::verti_rotate_text

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