12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- #ifndef SETTINGS_H
- #define SETTINGS_H
- #include <QSettings>
- namespace Settings
- {
- static inline QMap<QString, QVariant> defaults = {
- // General info
- {"General/UI_scale", "100"},
- {"General/CurrentInitStage", "0"},
- {"General/MicroUpdates", "Disabled"},
- // Lotro Manager
- {"Lotro/game_path", "none"},
- {"Lotro/original_locale", "English"},
- {"Lotro/skip_raw_downloads", "True"},
- {"Lotro/no_splash_screen", "True"},
- // Databases download settings
- {"DatabaseDownload/sound", "Disabled"},
- {"DatabaseDownload/text", "Disabled"},
- {"DatabaseDownload/image", "Disabled"},
- {"DatabaseDownload/loadscreen", "Disabled"},
- {"DatabaseDownload/texture", "Disabled"},
- {"DatabaseDownload/font", "Disabled"},
- {"DatabaseDownload/video", "Disabled"},
- // Databases applied status
- {"DatabaseApplied/sound", "False"},
- {"DatabaseApplied/text", "False"},
- {"DatabaseApplied/image", "False"},
- {"DatabaseApplied/loadscreen", "False"},
- {"DatabaseApplied/texture", "False"},
- {"DatabaseApplied/font", "False"},
- {"DatabaseApplied/video", "False"},
- // Databases downloaded paths
- {"DatabasePath/sound", "False"},
- {"DatabasePath/text", "False"},
- {"DatabasePath/image", "False"},
- {"DatabasePath/loadscreen", "False"},
- {"DatabasePath/texture", "False"},
- {"DatabasePath/font", "False"},
- {"DatabasePath/video", "False"},
- // Databases download date
- {"DatabaseDownloadDate/sound", "none"},
- {"DatabaseDownloadDate/text", "none"},
- {"DatabaseDownloadDate/image", "none"},
- {"DatabaseDownloadDate/loadscreen", "none"},
- {"DatabaseDownloadDate/texture", "none"},
- {"DatabaseDownloadDate/font", "none"},
- {"DatabaseDownloadDate/video", "none"},
- // Localisation components
- {"Components/fonts", "Disabled"},
- {"Components/texts_main", "Disabled"},
- {"Components/texts_items", "Disabled"},
- {"Components/texts_emotes", "Disabled"},
- {"Components/maps", "Disabled"},
- {"Components/loadscreens", "Disabled"},
- {"Components/sounds", "Disabled"},
- {"Components/videos", "Disabled"}
- };
- static void setDefaultSettings()
- {
- QSettings settings;
- foreach (QString key, defaults.keys()) {
- settings.setValue(key, defaults[key]);
- }
- }
- static QVariant getSettingsValue(QString key) {
- QSettings settings;
- return settings.value(key);
- }
- static void setSettingsValue(QString key, QVariant value) {
- QSettings settings;
- settings.setValue(key, value);
- }
- }
- #endif // SETTINGS_H
|