39 #endif // _WIN32 |
39 #endif // _WIN32 |
40 |
40 |
41 Config* g_configPointers[MAX_CONFIG]; |
41 Config* g_configPointers[MAX_CONFIG]; |
42 static int g_cfgPointerCursor = 0; |
42 static int g_cfgPointerCursor = 0; |
43 static QMap<QString, Config*> g_configsByName; |
43 static QMap<QString, Config*> g_configsByName; |
44 static QList<Config*> g_configs; |
44 static QList<Config*> g_configs; |
45 |
45 |
46 // ============================================================================= |
46 // ============================================================================= |
47 // Get the QSettings object. |
47 // Get the QSettings object. |
48 // ----------------------------------------------------------------------------- |
48 // ----------------------------------------------------------------------------- |
49 static QSettings* getSettingsObject() |
49 static QSettings* getSettingsObject() |
161 |
161 |
162 // ============================================================================= |
162 // ============================================================================= |
163 // ----------------------------------------------------------------------------- |
163 // ----------------------------------------------------------------------------- |
164 #undef IMPLEMENT_CONFIG |
164 #undef IMPLEMENT_CONFIG |
165 |
165 |
166 #define IMPLEMENT_CONFIG(NAME) \ |
166 #define IMPLEMENT_CONFIG(NAME) \ |
167 NAME##Config* NAME##Config::getByName (QString name) \ |
167 NAME##Config* NAME##Config::getByName (QString name) \ |
168 { \ |
168 { \ |
169 return getConfigByName<NAME##Config> (name, NAME); \ |
169 return getConfigByName<NAME##Config> (name, E##NAME##Type); \ |
170 } |
170 } |
171 |
171 |
172 IMPLEMENT_CONFIG (Int) |
172 IMPLEMENT_CONFIG (Int) |
173 IMPLEMENT_CONFIG (String) |
173 IMPLEMENT_CONFIG (String) |
174 IMPLEMENT_CONFIG (Bool) |
174 IMPLEMENT_CONFIG (Bool) |
175 IMPLEMENT_CONFIG (Float) |
175 IMPLEMENT_CONFIG (Float) |
176 IMPLEMENT_CONFIG (List) |
176 IMPLEMENT_CONFIG (List) |
177 IMPLEMENT_CONFIG (KeySequence) |
177 IMPLEMENT_CONFIG (KeySequence) |
|
178 IMPLEMENT_CONFIG (Vertex) |