mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 13:30:34 +01:00
Change xml tag name : dynamicitemfont
by : font_family git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5604 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -95,7 +95,7 @@ const QDomElement PartDynamicTextField::toXml(QDomDocument &dom_doc) const
|
|||||||
root_element.setAttribute("z", QString::number(zValue()));
|
root_element.setAttribute("z", QString::number(zValue()));
|
||||||
root_element.setAttribute("rotation", QString::number(QET::correctAngle(rotation())));
|
root_element.setAttribute("rotation", QString::number(QET::correctAngle(rotation())));
|
||||||
root_element.setAttribute("font_size", font().pointSize());
|
root_element.setAttribute("font_size", font().pointSize());
|
||||||
root_element.setAttribute("dynamicitemfont", (QETApp::dynamicTextsItemFont().family()));
|
root_element.setAttribute("font_family", (QETApp::dynamicTextsItemFont().family()));
|
||||||
root_element.setAttribute("uuid", m_uuid.toString());
|
root_element.setAttribute("uuid", m_uuid.toString());
|
||||||
root_element.setAttribute("frame", m_frame? "true" : "false");
|
root_element.setAttribute("frame", m_frame? "true" : "false");
|
||||||
root_element.setAttribute("text_width", QString::number(m_text_width));
|
root_element.setAttribute("text_width", QString::number(m_text_width));
|
||||||
|
|||||||
@@ -863,7 +863,7 @@ QFont QETApp::diagramTextsItemFont(qreal size)
|
|||||||
QSettings settings;
|
QSettings settings;
|
||||||
|
|
||||||
//Font to use
|
//Font to use
|
||||||
QString dynamic_texts_item_family = settings.value("dynamicitemfont", "Sans Serif").toString();
|
QString dynamic_texts_item_family = settings.value("font_family", "Sans Serif").toString();
|
||||||
qreal dynamic_texts_item_size = settings.value("dynamicitemsize", 9.0).toDouble();
|
qreal dynamic_texts_item_size = settings.value("dynamicitemsize", 9.0).toDouble();
|
||||||
qreal dynamic_texts_item_weight = settings.value("dynamicitemweight").toDouble();
|
qreal dynamic_texts_item_weight = settings.value("dynamicitemweight").toDouble();
|
||||||
QString dynamic_texts_item_style = settings.value("dynamicitemstyle", "normal").toString();
|
QString dynamic_texts_item_style = settings.value("dynamicitemstyle", "normal").toString();
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ QDomElement DynamicElementTextItem::toXml(QDomDocument &dom_doc) const
|
|||||||
root_element.setAttribute("rotation", QString::number(QET::correctAngle(rotation())));
|
root_element.setAttribute("rotation", QString::number(QET::correctAngle(rotation())));
|
||||||
root_element.setAttribute("font_size", font().pointSize());
|
root_element.setAttribute("font_size", font().pointSize());
|
||||||
root_element.setAttribute("uuid", m_uuid.toString());
|
root_element.setAttribute("uuid", m_uuid.toString());
|
||||||
root_element.setAttribute("dynamicitemfont", font().family());
|
root_element.setAttribute("font_family", font().family());
|
||||||
root_element.setAttribute("frame", m_frame? "true" : "false");
|
root_element.setAttribute("frame", m_frame? "true" : "false");
|
||||||
root_element.setAttribute("text_width", QString::number(m_text_width));
|
root_element.setAttribute("text_width", QString::number(m_text_width));
|
||||||
|
|
||||||
@@ -161,7 +161,7 @@ void DynamicElementTextItem::fromXml(const QDomElement &dom_elmt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
QGraphicsTextItem::setRotation(dom_elmt.attribute("rotation", QString::number(0)).toDouble());
|
QGraphicsTextItem::setRotation(dom_elmt.attribute("rotation", QString::number(0)).toDouble());
|
||||||
QFont font_(dom_elmt.attribute("dynamicitemfont", font().family()),
|
QFont font_(dom_elmt.attribute("font_family", font().family()),
|
||||||
dom_elmt.attribute("font_size", QString::number(9)).toInt());
|
dom_elmt.attribute("font_size", QString::number(9)).toInt());
|
||||||
setFont(font_);
|
setFont(font_);
|
||||||
m_uuid = QUuid(dom_elmt.attribute("uuid", QUuid::createUuid().toString()));
|
m_uuid = QUuid(dom_elmt.attribute("uuid", QUuid::createUuid().toString()));
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ GeneralConfigurationPage::GeneralConfigurationPage(QWidget *parent) :
|
|||||||
settings.value("diagramitemstyle").toString() + ")";
|
settings.value("diagramitemstyle").toString() + ")";
|
||||||
ui->m_font_pb->setText(fontInfos);
|
ui->m_font_pb->setText(fontInfos);
|
||||||
|
|
||||||
QString dynamicfontInfos = settings.value("dynamicitemfont").toString() + " " +
|
QString dynamicfontInfos = settings.value("font_family").toString() + " " +
|
||||||
settings.value("dynamicitemsize").toString() + " (" +
|
settings.value("dynamicitemsize").toString() + " (" +
|
||||||
settings.value("dynamicitemstyle").toString() + ")";
|
settings.value("dynamicitemstyle").toString() + ")";
|
||||||
ui->m_dynamic_font_pb->setText(dynamicfontInfos);
|
ui->m_dynamic_font_pb->setText(dynamicfontInfos);
|
||||||
@@ -254,11 +254,11 @@ void GeneralConfigurationPage::on_m_dynamic_font_pb_clicked()
|
|||||||
QFont font = QFontDialog::getFont(&ok, QFont("Sans Serif", 9), this);
|
QFont font = QFontDialog::getFont(&ok, QFont("Sans Serif", 9), this);
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
settings.setValue("dynamicitemfont", font.family());
|
settings.setValue("font_family", font.family());
|
||||||
settings.setValue("dynamicitemsize", font.pointSize());
|
settings.setValue("dynamicitemsize", font.pointSize());
|
||||||
settings.setValue("dynamicitemweight", font.weight());
|
settings.setValue("dynamicitemweight", font.weight());
|
||||||
settings.setValue("dynamicitemstyle", font.styleName());
|
settings.setValue("dynamicitemstyle", font.styleName());
|
||||||
QString fontInfos = settings.value("dynamicitemfont").toString() + " " +
|
QString fontInfos = settings.value("font_family").toString() + " " +
|
||||||
settings.value("dynamicitemsize").toString() + " (" +
|
settings.value("dynamicitemsize").toString() + " (" +
|
||||||
settings.value("dynamicitemstyle").toString() + ")";
|
settings.value("dynamicitemstyle").toString() + ")";
|
||||||
ui->m_dynamic_font_pb->setText(fontInfos);
|
ui->m_dynamic_font_pb->setText(fontInfos);
|
||||||
|
|||||||
Reference in New Issue
Block a user