src/configuration.cc

changeset 855
e16f1587ef44
parent 851
dbed6938238c
child 861
83426c5fa732
--- a/src/configuration.cc	Sun Jul 27 15:13:42 2014 +0300
+++ b/src/configuration.cc	Mon Jul 28 03:34:05 2014 +0300
@@ -193,3 +193,38 @@
 IMPLEMENT_CONFIG (List)
 IMPLEMENT_CONFIG (KeySequence)
 IMPLEMENT_CONFIG (Vertex)
+
+void IntConfigEntry::loadFromVariant (const QVariant& val)
+{
+	*m_valueptr = val.toInt();
+}
+
+void StringConfigEntry::loadFromVariant (const QVariant& val)
+{
+	*m_valueptr = val.toString();
+}
+
+void BoolConfigEntry::loadFromVariant (const QVariant& val)
+{
+	*m_valueptr = val.toBool();
+}
+
+void ListConfigEntry::loadFromVariant (const QVariant& val)
+{
+	*m_valueptr = val.toList();
+}
+
+void KeySequenceConfigEntry::loadFromVariant (const QVariant& val)
+{
+	*m_valueptr = val.toString();
+}
+
+void FloatConfigEntry::loadFromVariant (const QVariant& val)
+{
+	*m_valueptr = val.toDouble();
+}
+
+void VertexConfigEntry::loadFromVariant (const QVariant& val)
+{
+	*m_valueptr = val.value<Vertex>();
+}

mercurial