QElectroTech
0.70
|
#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 |
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.
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.
ConductorProperties::ConductorProperties | ( | ) |
Constructeur : par defaut, les proprietes font un conducteur multifilaire noir dont le texte est "_"
Definition at line 222 of file conductorproperties.cpp.
|
virtual |
Destructeur
Definition at line 238 of file conductorproperties.cpp.
void ConductorProperties::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.
list |
Definition at line 421 of file conductorproperties.cpp.
References color, cond_size, horiz_rotate_text, m_bicolor, m_color_2, m_dash_size, m_formula, m_function, m_horizontal_alignment, m_one_text_per_folio, m_show_text, m_tension_protocol, m_vertical_alignment, text, text_size, and verti_rotate_text.
Referenced by ConductorAutoNumerotation::numeratePotential(), and PotentialSelectorDialog::on_buttonBox_accepted().
|
static |
ConductorProperties::defaultProperties.
Definition at line 640 of file conductorproperties.cpp.
References fromSettings().
Referenced by NewDiagramPage::NewDiagramPage(), QETDiagramEditor::newProject(), and QETProject::readDefaultPropertiesXml().
void ConductorProperties::fromSettings | ( | QSettings & | settings, |
const QString & | prefix = QString() |
||
) |
settings | Parametres a lire |
prefix | prefixe a ajouter devant les noms des parametres |
Definition at line 368 of file conductorproperties.cpp.
References color, cond_size, SingleLineProperties::fromSettings(), horiz_rotate_text, m_bicolor, m_color_2, m_dash_size, m_formula, m_function, m_horizontal_alignment, m_one_text_per_folio, m_show_text, m_tension_protocol, m_vertical_alignment, Multi, readStyle(), Single, singleLineProperties, text, text_size, type, typeToString(), and verti_rotate_text.
Referenced by defaultProperties().
void ConductorProperties::fromXml | ( | QDomElement & | e | ) |
ConductorProperties::fromXml Import conductor propertie, from the attribute of the xml element 'e'.
e | the xml document |
Definition at line 287 of file conductorproperties.cpp.
References color, cond_size, SingleLineProperties::fromXml(), horiz_rotate_text, m_bicolor, m_color_2, m_dash_size, m_formula, m_function, m_horizontal_alignment, m_one_text_per_folio, m_show_text, m_tension_protocol, m_vertical_alignment, Multi, readStyle(), Single, singleLineProperties, text, text_size, type, typeToString(), and verti_rotate_text.
Referenced by Conductor::fromXml(), Diagram::fromXml(), and QETProject::readDefaultPropertiesXml().
bool ConductorProperties::operator!= | ( | const ConductorProperties & | other | ) | const |
other | l'autre ensemble de proprietes avec lequel il faut effectuer la comparaison |
Definition at line 684 of file conductorproperties.cpp.
bool ConductorProperties::operator== | ( | const ConductorProperties & | other | ) | const |
ConductorProperties::operator ==.
other |
Definition at line 655 of file conductorproperties.cpp.
References color, cond_size, horiz_rotate_text, m_bicolor, m_color_2, m_dash_size, m_formula, m_function, m_horizontal_alignment, m_one_text_per_folio, m_show_text, m_tension_protocol, m_vertical_alignment, singleLineProperties, style, text, text_size, type, and verti_rotate_text.
|
private |
Applique les styles passes en parametre dans cet objet
style_string | Chaine decrivant le style du conducteur |
Definition at line 692 of file conductorproperties.cpp.
References style.
Referenced by fromSettings(), and fromXml().
void ConductorProperties::toSettings | ( | QSettings & | settings, |
const QString & | prefix = QString() |
||
) | const |
settings | Parametres a ecrire |
prefix | prefixe a ajouter devant les noms des parametres |
Definition at line 338 of file conductorproperties.cpp.
References color, cond_size, horiz_rotate_text, m_bicolor, m_color_2, m_dash_size, m_formula, m_function, m_horizontal_alignment, m_one_text_per_folio, m_show_text, m_tension_protocol, m_vertical_alignment, singleLineProperties, text, text_size, SingleLineProperties::toSettings(), type, typeToString(), verti_rotate_text, and writeStyle().
void ConductorProperties::toXml | ( | QDomElement & | e | ) | const |
ConductorProperties::toXml Export conductor propertie, in the XML element 'e'.
e | the xml element |
Definition at line 247 of file conductorproperties.cpp.
References color, cond_size, horiz_rotate_text, m_bicolor, m_color_2, m_dash_size, m_formula, m_function, m_horizontal_alignment, m_one_text_per_folio, m_show_text, m_tension_protocol, m_vertical_alignment, Single, singleLineProperties, text, text_size, SingleLineProperties::toXml(), type, typeToString(), verti_rotate_text, and writeStyle().
Referenced by Diagram::toXml(), and QETProject::writeDefaultPropertiesXml().
|
static |
t | type du conducteur |
Definition at line 405 of file conductorproperties.cpp.
Referenced by fromSettings(), fromXml(), toSettings(), and toXml().
|
private |
Exporte le style du conducteur sous forme d'une chaine de caracteres
Definition at line 718 of file conductorproperties.cpp.
References style.
Referenced by toSettings(), and toXml().
QColor ConductorProperties::color |
Definition at line 81 of file conductorproperties.h.
Referenced by SearchAndReplaceWorker::applyChange(), applyForEqualAttributes(), DiagramView::editConductorColor(), fromSettings(), fromXml(), SearchAndReplaceWorker::invalidConductorProperties(), ReplaceConductorDialog::on_m_color_pb_clicked(), operator==(), Conductor::paint(), ConductorPropertiesWidget::properties(), ReplaceConductorDialog::properties(), ConductorPropertiesWidget::setProperties(), ReplaceConductorDialog::setProperties(), toSettings(), and toXml().
double ConductorProperties::cond_size |
Definition at line 92 of file conductorproperties.h.
Referenced by SearchAndReplaceWorker::applyChange(), applyForEqualAttributes(), fromSettings(), fromXml(), SearchAndReplaceWorker::invalidConductorProperties(), operator==(), Conductor::paint(), ConductorPropertiesWidget::properties(), ReplaceConductorDialog::properties(), ConductorPropertiesWidget::setProperties(), toSettings(), and toXml().
double ConductorProperties::horiz_rotate_text |
Definition at line 92 of file conductorproperties.h.
Referenced by SearchAndReplaceWorker::applyChange(), applyForEqualAttributes(), Conductor::calculateTextItemPosition(), fromSettings(), fromXml(), SearchAndReplaceWorker::invalidConductorProperties(), operator==(), ConductorPropertiesWidget::properties(), ReplaceConductorDialog::properties(), ReplaceConductorDialog::setProperties(), ConductorPropertiesWidget::setProperties(), toSettings(), and toXml().
bool ConductorProperties::m_bicolor = false |
Definition at line 98 of file conductorproperties.h.
Referenced by SearchAndReplaceWorker::applyChange(), applyForEqualAttributes(), fromSettings(), fromXml(), operator==(), Conductor::paint(), ConductorPropertiesWidget::properties(), ReplaceConductorDialog::properties(), ConductorPropertiesWidget::setProperties(), ReplaceConductorDialog::setProperties(), toSettings(), and toXml().
QColor ConductorProperties::m_color_2 |
Definition at line 81 of file conductorproperties.h.
Referenced by SearchAndReplaceWorker::applyChange(), applyForEqualAttributes(), fromSettings(), fromXml(), SearchAndReplaceWorker::invalidConductorProperties(), ReplaceConductorDialog::on_m_color_2_pb_clicked(), operator==(), Conductor::paint(), ConductorPropertiesWidget::properties(), ReplaceConductorDialog::properties(), ReplaceConductorDialog::setProperties(), ConductorPropertiesWidget::setProperties(), toSettings(), and toXml().
int ConductorProperties::m_dash_size = 1 |
Definition at line 90 of file conductorproperties.h.
Referenced by SearchAndReplaceWorker::applyChange(), applyForEqualAttributes(), fromSettings(), fromXml(), SearchAndReplaceWorker::invalidConductorProperties(), operator==(), Conductor::paint(), ConductorPropertiesWidget::properties(), ReplaceConductorDialog::properties(), ReplaceConductorDialog::setProperties(), ConductorPropertiesWidget::setProperties(), toSettings(), and toXml().
QString ConductorProperties::m_formula |
Definition at line 84 of file conductorproperties.h.
Referenced by SearchAndReplaceWorker::applyChange(), applyForEqualAttributes(), Conductor::displayedTextChanged(), fromSettings(), fromXml(), ConductorAutoNumerotation::newProperties(), ConductorAutoNumerotation::numerateNewConductor(), ConductorAutoNumerotation::numeratePotential(), PotentialSelectorDialog::on_buttonBox_accepted(), operator==(), ConductorPropertiesWidget::properties(), ReplaceConductorDialog::properties(), Conductor::refreshText(), SearchAndReplaceWorker::replaceAdvanced(), Conductor::setFreezeLabel(), ConductorPropertiesWidget::setProperties(), ReplaceConductorDialog::setProperties(), Conductor::setProperties(), Conductor::setPropertyToPotential(), toSettings(), and toXml().
QString ConductorProperties::m_function |
Definition at line 84 of file conductorproperties.h.
Referenced by SearchAndReplaceWorker::applyChange(), applyForEqualAttributes(), DynamicTextItemDelegate::availableInfo(), LinkSingleElementWidget::buildTree(), PotentialSelectorDialog::buildWidget(), fromSettings(), fromXml(), operator==(), ConductorPropertiesWidget::properties(), ReplaceConductorDialog::properties(), SearchAndReplaceWorker::replaceAdvanced(), SearchAndReplaceWidget::searchTerms(), ConductorPropertiesWidget::setProperties(), ReplaceConductorDialog::setProperties(), Conductor::setPropertyToPotential(), toSettings(), and toXml().
Qt::Alignment ConductorProperties::m_horizontal_alignment = Qt::AlignBottom |
Definition at line 100 of file conductorproperties.h.
Referenced by SearchAndReplaceWorker::applyChange(), applyForEqualAttributes(), Conductor::calculateTextItemPosition(), fromSettings(), fromXml(), SearchAndReplaceWorker::invalidConductorProperties(), operator==(), ConductorPropertiesWidget::properties(), ReplaceConductorDialog::properties(), ReplaceConductorDialog::setProperties(), ConductorPropertiesWidget::setProperties(), toSettings(), and toXml().
bool ConductorProperties::m_one_text_per_folio |
Definition at line 96 of file conductorproperties.h.
Referenced by applyForEqualAttributes(), fromSettings(), fromXml(), operator==(), ConductorPropertiesWidget::properties(), ConductorPropertiesWidget::setProperties(), toSettings(), and toXml().
bool ConductorProperties::m_show_text |
Definition at line 96 of file conductorproperties.h.
Referenced by SearchAndReplaceWorker::applyChange(), applyForEqualAttributes(), fromSettings(), fromXml(), operator==(), ConductorPropertiesWidget::properties(), ReplaceConductorDialog::properties(), ConductorPropertiesWidget::setProperties(), ReplaceConductorDialog::setProperties(), Conductor::setProperties(), toSettings(), and toXml().
QString ConductorProperties::m_tension_protocol |
Definition at line 84 of file conductorproperties.h.
Referenced by SearchAndReplaceWorker::applyChange(), applyForEqualAttributes(), DynamicTextItemDelegate::availableInfo(), LinkSingleElementWidget::buildTree(), PotentialSelectorDialog::buildWidget(), fromSettings(), fromXml(), operator==(), ConductorPropertiesWidget::properties(), ReplaceConductorDialog::properties(), SearchAndReplaceWorker::replaceAdvanced(), SearchAndReplaceWidget::searchTerms(), ConductorPropertiesWidget::setProperties(), ReplaceConductorDialog::setProperties(), Conductor::setPropertyToPotential(), toSettings(), and toXml().
Qt::Alignment ConductorProperties::m_vertical_alignment = Qt::AlignRight |
Definition at line 101 of file conductorproperties.h.
Referenced by SearchAndReplaceWorker::applyChange(), applyForEqualAttributes(), Conductor::calculateTextItemPosition(), fromSettings(), fromXml(), SearchAndReplaceWorker::invalidConductorProperties(), operator==(), ConductorPropertiesWidget::properties(), ReplaceConductorDialog::properties(), ReplaceConductorDialog::setProperties(), ConductorPropertiesWidget::setProperties(), toSettings(), and toXml().
SingleLineProperties ConductorProperties::singleLineProperties |
Definition at line 105 of file conductorproperties.h.
Referenced by SearchAndReplaceWorker::applyChange(), fromSettings(), fromXml(), operator==(), Conductor::paint(), ReplaceConductorDialog::properties(), ConductorPropertiesWidget::properties(), ReplaceConductorDialog::setProperties(), ConductorPropertiesWidget::setProperties(), toSettings(), toXml(), ReplaceConductorDialog::updatePreview(), and ConductorPropertiesWidget::updatePreview().
Qt::PenStyle ConductorProperties::style |
Definition at line 103 of file conductorproperties.h.
Referenced by SearchAndReplaceWorker::applyChange(), SearchAndReplaceWorker::invalidConductorProperties(), operator==(), Conductor::paint(), ReplaceConductorDialog::properties(), ConductorPropertiesWidget::properties(), readStyle(), ReplaceConductorDialog::setProperties(), ConductorPropertiesWidget::setProperties(), and writeStyle().
QString ConductorProperties::text |
Definition at line 84 of file conductorproperties.h.
Referenced by SearchAndReplaceWorker::applyChange(), applyForEqualAttributes(), ConductorAutoNumerotation::applyText(), LinkSingleElementWidget::buildTree(), PotentialSelectorDialog::buildWidget(), Conductor::Conductor(), Conductor::displayedTextChanged(), SearchAndReplaceWidget::fillItemsList(), fromSettings(), fromXml(), SearchAndReplaceWorker::invalidConductorProperties(), ConductorAutoNumerotation::numeratePotential(), operator==(), ConductorPropertiesWidget::properties(), ReplaceConductorDialog::properties(), PasteDiagramCommand::redo(), Conductor::refreshText(), SearchAndReplaceWorker::replaceAdvanced(), SearchAndReplaceWidget::searchTerms(), ReplaceConductorDialog::setProperties(), ConductorPropertiesWidget::setProperties(), Conductor::setProperties(), Conductor::setPropertyToPotential(), toSettings(), and toXml().
int ConductorProperties::text_size |
Definition at line 89 of file conductorproperties.h.
Referenced by SearchAndReplaceWorker::applyChange(), applyForEqualAttributes(), fromSettings(), fromXml(), SearchAndReplaceWorker::invalidConductorProperties(), operator==(), ConductorPropertiesWidget::properties(), ReplaceConductorDialog::properties(), ReplaceConductorDialog::setProperties(), ConductorPropertiesWidget::setProperties(), Conductor::setProperties(), toSettings(), and toXml().
ConductorType ConductorProperties::type |
Definition at line 79 of file conductorproperties.h.
Referenced by Conductor::calculateTextItemPosition(), fromSettings(), fromXml(), operator==(), Conductor::paint(), ConductorPropertiesWidget::properties(), ReplaceConductorDialog::properties(), ReplaceConductorDialog::setProperties(), ConductorPropertiesWidget::setProperties(), Conductor::setProperties(), toSettings(), and toXml().
double ConductorProperties::verti_rotate_text |
Definition at line 92 of file conductorproperties.h.
Referenced by SearchAndReplaceWorker::applyChange(), applyForEqualAttributes(), Conductor::calculateTextItemPosition(), fromSettings(), fromXml(), SearchAndReplaceWorker::invalidConductorProperties(), operator==(), ConductorPropertiesWidget::properties(), ReplaceConductorDialog::properties(), ReplaceConductorDialog::setProperties(), ConductorPropertiesWidget::setProperties(), toSettings(), and toXml().