28:208adc847377 | 29:55406ce7446e |
---|---|
78 "None", | 78 "None", |
79 "Integer", | 79 "Integer", |
80 "String", | 80 "String", |
81 "Float", | 81 "Float", |
82 "Boolean", | 82 "Boolean", |
83 "Color", | |
84 }; | 83 }; |
85 | 84 |
86 // ============================================================================= | 85 // ============================================================================= |
87 // Load the configuration from file | 86 // Load the configuration from file |
88 bool config::load () { | 87 bool config::load () { |
184 val = true; | 183 val = true; |
185 else if (+valstring == "FALSE" || valstring == "0") | 184 else if (+valstring == "FALSE" || valstring == "0") |
186 val = false; | 185 val = false; |
187 break; | 186 break; |
188 } | 187 } |
189 case CONFIG_color: | |
190 static_cast<colorconfig*> (cfg)->value.parseFromString (valstring); | |
191 break; | |
192 default: | 188 default: |
193 break; | 189 break; |
194 } | 190 } |
195 } | 191 } |
196 | 192 |
293 | 289 |
294 break; | 290 break; |
295 case CONFIG_bool: | 291 case CONFIG_bool: |
296 valstring = (static_cast<boolconfig*> (cfg)->value) ? "true" : "false"; | 292 valstring = (static_cast<boolconfig*> (cfg)->value) ? "true" : "false"; |
297 break; | 293 break; |
298 case CONFIG_color: | |
299 valstring = (str)(static_cast<colorconfig*> (cfg)->value); | |
300 break; | |
301 default: | 294 default: |
302 break; | 295 break; |
303 } | 296 } |
304 | 297 |
305 // Write the entry now. | 298 // Write the entry now. |