mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
improve comit 2820
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2822 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -241,7 +241,7 @@ ConductorProperties::~ConductorProperties() {
|
|||||||
*/
|
*/
|
||||||
void ConductorProperties::toXml(QDomElement &e) const {
|
void ConductorProperties::toXml(QDomElement &e) const {
|
||||||
e.setAttribute("type", typeToString(type));
|
e.setAttribute("type", typeToString(type));
|
||||||
e.setAttribute("num", text);
|
|
||||||
|
|
||||||
if (color != QColor(Qt::black)) {
|
if (color != QColor(Qt::black)) {
|
||||||
e.setAttribute("color", color.name());
|
e.setAttribute("color", color.name());
|
||||||
@@ -249,11 +249,11 @@ void ConductorProperties::toXml(QDomElement &e) const {
|
|||||||
|
|
||||||
if (type == Single) {
|
if (type == Single) {
|
||||||
singleLineProperties.toXml(e);
|
singleLineProperties.toXml(e);
|
||||||
} else if (type == Multi) {
|
|
||||||
e.setAttribute("numsize", text_size);
|
|
||||||
e.setAttribute("vertirotatetext", verti_rotate_text);
|
|
||||||
e.setAttribute("horizrotatetext", horiz_rotate_text);
|
|
||||||
}
|
}
|
||||||
|
e.setAttribute("num", text);
|
||||||
|
e.setAttribute("numsize", text_size);
|
||||||
|
e.setAttribute("vertirotatetext", verti_rotate_text);
|
||||||
|
e.setAttribute("horizrotatetext", horiz_rotate_text);
|
||||||
|
|
||||||
QString conductor_style = writeStyle();
|
QString conductor_style = writeStyle();
|
||||||
if (!conductor_style.isEmpty()) {
|
if (!conductor_style.isEmpty()) {
|
||||||
@@ -278,8 +278,6 @@ void ConductorProperties::fromXml(QDomElement &e) {
|
|||||||
|
|
||||||
// read style of conductor
|
// read style of conductor
|
||||||
readStyle(e.attribute("style"));
|
readStyle(e.attribute("style"));
|
||||||
// qet text field
|
|
||||||
text = e.attribute("num");
|
|
||||||
|
|
||||||
if (e.attribute("type") == typeToString(Single)) {
|
if (e.attribute("type") == typeToString(Single)) {
|
||||||
// get specific properties for single conductor
|
// get specific properties for single conductor
|
||||||
@@ -288,11 +286,14 @@ void ConductorProperties::fromXml(QDomElement &e) {
|
|||||||
} else if (e.attribute("type") == typeToString(Simple)) {
|
} else if (e.attribute("type") == typeToString(Simple)) {
|
||||||
type = Simple;
|
type = Simple;
|
||||||
} else {
|
} else {
|
||||||
text_size = e.attribute("numsize", QString::number(9)).toInt();
|
|
||||||
verti_rotate_text = e.attribute("vertirotatetext").toDouble();
|
|
||||||
horiz_rotate_text = e.attribute("horizrotatetext").toDouble();
|
|
||||||
type = Multi;
|
type = Multi;
|
||||||
}
|
}
|
||||||
|
// get text field
|
||||||
|
text = e.attribute("num");
|
||||||
|
text_size = e.attribute("numsize", QString::number(9)).toInt();
|
||||||
|
verti_rotate_text = e.attribute("vertirotatetext").toDouble();
|
||||||
|
horiz_rotate_text = e.attribute("horizrotatetext").toDouble();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user