| 35 | #include "ui_ConfigEditor.h" |
| 36 | |
| 37 | static QString valueString(const SDObject *o) |
| 38 | { |
| 39 | if(o->type.basetype == SDBasic::String) |
| 40 | return o->data.str; |
| 41 | |
| 42 | if(o->type.basetype == SDBasic::UnsignedInteger) |
| 43 | return Formatter::Format(o->data.basic.u); |
| 44 | |
| 45 | if(o->type.basetype == SDBasic::SignedInteger) |
| 46 | return Formatter::Format(o->data.basic.i); |
| 47 | |
| 48 | if(o->type.basetype == SDBasic::Float) |
| 49 | return Formatter::Format(o->data.basic.d); |
| 50 | |
| 51 | if(o->type.basetype == SDBasic::Boolean) |
| 52 | return o->data.basic.b ? lit("True") : lit("False"); |
| 53 | |
| 54 | if(o->type.basetype == SDBasic::Array) |
| 55 | return lit("{...}"); |
| 56 | |
| 57 | return lit("??"); |
| 58 | } |
| 59 | |
| 60 | static bool anyChildChanged(const SDObject *o) |
| 61 | { |