| OLD | NEW |
| 1 {% from "macros.tmpl" import license %} | 1 {% from "macros.tmpl" import license %} |
| 2 {{ license() }} | 2 {{ license() }} |
| 3 | 3 |
| 4 #ifndef SettingsMacros_h | 4 #ifndef SettingsMacros_h |
| 5 #define SettingsMacros_h | 5 #define SettingsMacros_h |
| 6 | 6 |
| 7 #define SETTINGS_GETTERS_AND_SETTERS \ | 7 #define SETTINGS_GETTERS_AND_SETTERS \ |
| 8 {% for setting in settings %} | 8 {% for setting in settings %} |
| 9 {{setting.type|to_passing_type}} {{setting.name}}() const { return m_{{setti
ng.name}}; } \ | 9 {{setting.type|to_passing_type}} get{{setting.name|upper_first}}() const { r
eturn m_{{setting.name}}; } \ |
| 10 void set{{setting.name|upper_first}}({{setting.type|to_passing_type}} {{sett
ing.name}}); \ | 10 void set{{setting.name|upper_first}}({{setting.type|to_passing_type}} {{sett
ing.name}}); \ |
| 11 {% endfor %} | 11 {% endfor %} |
| 12 void setFromStrings(const String& name, const String& value); | 12 void setFromStrings(const String& name, const String& value); |
| 13 // End of SETTINGS_GETTERS_AND_SETTERS. | 13 // End of SETTINGS_GETTERS_AND_SETTERS. |
| 14 | 14 |
| 15 #define SETTINGS_MEMBER_VARIABLES \ | 15 #define SETTINGS_MEMBER_VARIABLES \ |
| 16 {% for setting in settings if setting.type != 'bool' %} | 16 {% for setting in settings if setting.type != 'bool' %} |
| 17 {{setting.type}} m_{{setting.name}}; \ | 17 {{setting.type}} m_{{setting.name}}; \ |
| 18 {% endfor %} | 18 {% endfor %} |
| 19 {% for setting in settings if setting.type == 'bool' %} | 19 {% for setting in settings if setting.type == 'bool' %} |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 static_cast<{{setting.type}}>(value.toInt()) \ | 59 static_cast<{{setting.type}}>(value.toInt()) \ |
| 60 {% endif %} | 60 {% endif %} |
| 61 ); \ | 61 ); \ |
| 62 return; \ | 62 return; \ |
| 63 } \ | 63 } \ |
| 64 {% endfor %} | 64 {% endfor %} |
| 65 } | 65 } |
| 66 // End of SETTINGS_SETTER_BODIES. | 66 // End of SETTINGS_SETTER_BODIES. |
| 67 | 67 |
| 68 #endif // SettingsMacros_h | 68 #endif // SettingsMacros_h |
| OLD | NEW |