143 { |
143 { |
144 QString path = qApp->applicationDirPath() + "/" UNIXNAME EXTENSION; |
144 QString path = qApp->applicationDirPath() + "/" UNIXNAME EXTENSION; |
145 return new QSettings (path, QSettings::IniFormat); |
145 return new QSettings (path, QSettings::IniFormat); |
146 } |
146 } |
147 |
147 |
|
148 // |
|
149 // Accessor to entry list |
|
150 // |
|
151 QList<AbstractConfigEntry*> const& Config::AllConfigEntries() |
|
152 { |
|
153 return ConfigurationEntries; |
|
154 } |
|
155 |
|
156 AbstractConfigEntry* Config::FindByName (QString const& name) |
|
157 { |
|
158 auto it = EntriesByName.find (name); |
|
159 return (it != EntriesByName.end()) ? *it : null; |
|
160 } |
|
161 |
148 template<typename T> |
162 template<typename T> |
149 static T* GetConfigByName (QString name, AbstractConfigEntry::Type type) |
163 static T* GetConfigByName (QString name, AbstractConfigEntry::Type type) |
150 { |
164 { |
151 auto it = EntriesByName.find (name); |
165 auto it = EntriesByName.find (name); |
152 |
166 |