Configuration profile support
- Add 10 profile slots to Settings
std::string[10] profilePaths
- Each should either be empty or point to a configuration file
- Add enum
ProfileIndex
with valuesPROFILE_0
...PROFILE_9
andPROFILE_NONE
- Add current profile index to Settings
-
ProfileIndex currentProfile
, defaults to special valuePROFILE_NONE
indicating no profile is loaded
-
- Add settings handlers for the profile slots
-
profile.0
...profile.9
-
- Add a function
loadProfile(ProfileIndex i)
- Sets
currentProfile
- Reads the profile in the indicated slot's path (if it exists) and loads its contents as settings
- Sets
- Add a setting handler for setting a profile
profile.current
- value must be an integer in range 0..9
- calls
loadProfile
if value changed
- Add a shortcut key for switching profiles
- for example Fn+Pyra+0...Fn+Pyra+9
- calls
loadProfile
if set profile is different thancurrentProfile
Edited by Teemu Erkkola