src/configuration.cc

changeset 855
e16f1587ef44
parent 851
dbed6938238c
child 861
83426c5fa732
equal deleted inserted replaced
854:403affd33c6e 855:e16f1587ef44
191 IMPLEMENT_CONFIG (Bool) 191 IMPLEMENT_CONFIG (Bool)
192 IMPLEMENT_CONFIG (Float) 192 IMPLEMENT_CONFIG (Float)
193 IMPLEMENT_CONFIG (List) 193 IMPLEMENT_CONFIG (List)
194 IMPLEMENT_CONFIG (KeySequence) 194 IMPLEMENT_CONFIG (KeySequence)
195 IMPLEMENT_CONFIG (Vertex) 195 IMPLEMENT_CONFIG (Vertex)
196
197 void IntConfigEntry::loadFromVariant (const QVariant& val)
198 {
199 *m_valueptr = val.toInt();
200 }
201
202 void StringConfigEntry::loadFromVariant (const QVariant& val)
203 {
204 *m_valueptr = val.toString();
205 }
206
207 void BoolConfigEntry::loadFromVariant (const QVariant& val)
208 {
209 *m_valueptr = val.toBool();
210 }
211
212 void ListConfigEntry::loadFromVariant (const QVariant& val)
213 {
214 *m_valueptr = val.toList();
215 }
216
217 void KeySequenceConfigEntry::loadFromVariant (const QVariant& val)
218 {
219 *m_valueptr = val.toString();
220 }
221
222 void FloatConfigEntry::loadFromVariant (const QVariant& val)
223 {
224 *m_valueptr = val.toDouble();
225 }
226
227 void VertexConfigEntry::loadFromVariant (const QVariant& val)
228 {
229 *m_valueptr = val.value<Vertex>();
230 }

mercurial