[qet] qet/qet: [5604] Change xml tag name : dynamicitemfont

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 5604
Author:   blacksun
Date:     2018-11-24 22:26:24 +0100 (Sat, 24 Nov 2018)
Log Message:
-----------
Change xml tag name : dynamicitemfont
by : font_family

Modified Paths:
--------------
    trunk/sources/editor/graphicspart/partdynamictextfield.cpp
    trunk/sources/qetapp.cpp
    trunk/sources/qetgraphicsitem/dynamicelementtextitem.cpp
    trunk/sources/ui/configpage/generalconfigurationpage.cpp

Modified: trunk/sources/editor/graphicspart/partdynamictextfield.cpp
===================================================================
--- trunk/sources/editor/graphicspart/partdynamictextfield.cpp	2018-11-24 21:12:27 UTC (rev 5603)
+++ trunk/sources/editor/graphicspart/partdynamictextfield.cpp	2018-11-24 21:26:24 UTC (rev 5604)
@@ -95,7 +95,7 @@
 	root_element.setAttribute("z", QString::number(zValue()));
 	root_element.setAttribute("rotation", QString::number(QET::correctAngle(rotation())));
 	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("frame", m_frame? "true" : "false");
 	root_element.setAttribute("text_width", QString::number(m_text_width));

Modified: trunk/sources/qetapp.cpp
===================================================================
--- trunk/sources/qetapp.cpp	2018-11-24 21:12:27 UTC (rev 5603)
+++ trunk/sources/qetapp.cpp	2018-11-24 21:26:24 UTC (rev 5604)
@@ -863,7 +863,7 @@
 	QSettings settings;
 
 		//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_weight   = settings.value("dynamicitemweight").toDouble();
 	QString dynamic_texts_item_style  = settings.value("dynamicitemstyle", "normal").toString();

Modified: trunk/sources/qetgraphicsitem/dynamicelementtextitem.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/dynamicelementtextitem.cpp	2018-11-24 21:12:27 UTC (rev 5603)
+++ trunk/sources/qetgraphicsitem/dynamicelementtextitem.cpp	2018-11-24 21:26:24 UTC (rev 5604)
@@ -94,7 +94,7 @@
 	root_element.setAttribute("rotation", QString::number(QET::correctAngle(rotation())));
 	root_element.setAttribute("font_size", font().pointSize());
 	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("text_width", QString::number(m_text_width));
 	
@@ -161,7 +161,7 @@
 	}
 	
 	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());
 	setFont(font_);
 	m_uuid = QUuid(dom_elmt.attribute("uuid", QUuid::createUuid().toString()));

Modified: trunk/sources/ui/configpage/generalconfigurationpage.cpp
===================================================================
--- trunk/sources/ui/configpage/generalconfigurationpage.cpp	2018-11-24 21:12:27 UTC (rev 5603)
+++ trunk/sources/ui/configpage/generalconfigurationpage.cpp	2018-11-24 21:26:24 UTC (rev 5604)
@@ -54,7 +54,7 @@
                         settings.value("diagramitemstyle").toString() + ")";
 	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("dynamicitemstyle").toString() + ")";
 	ui->m_dynamic_font_pb->setText(dynamicfontInfos);
@@ -254,11 +254,11 @@
 	QFont font = QFontDialog::getFont(&ok, QFont("Sans Serif", 9), this);
 	if (ok)
 	{
-		settings.setValue("dynamicitemfont", font.family());
+		settings.setValue("font_family", font.family());
 		settings.setValue("dynamicitemsize", font.pointSize());
 		settings.setValue("dynamicitemweight", font.weight());
 		settings.setValue("dynamicitemstyle", font.styleName());
-		QString fontInfos = settings.value("dynamicitemfont").toString() + " " +
+		QString fontInfos = settings.value("font_family").toString() + " " +
                             settings.value("dynamicitemsize").toString() + " (" +
                             settings.value("dynamicitemstyle").toString() + ")";
         ui->m_dynamic_font_pb->setText(fontInfos);


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/