Add a series of kconfigxt modules for PowerDevil
This is the port of KConfigXT for PowerProfiles, without the QML Codebase. The code has been extensively rebased, and I tried to make as low commits as possible, to help review. I know that @ngraham had problems with the loading of the settings using this patch (as it's mostly what the Qml version has, too) and I'm investigating this.
How this works: The KConfigXT modules will try to load settings for Three particcular "supergroups":
- AC
- Battery
- LowBattery
The file used to fetch those settings is the same as the old configuration, so things should work:
<kcfgfile name="powermanagementprofilesrc">
<parameter name="profileGroup"/>
</kcfgfile>
<group name="KeyboardBrightness" parentGroupName="$(profileGroup)">
This way, if we create a PowerManagementProfile("AC") - we will have the data for the entries inside of the AC group. All of the KConfig / KConfigGroup code is removed from the sources, on this patch, and instead we use a PowerManagementProfile.
this let to some big rewrites on parts of the code that used to do string concatenation and group management manually: those should be reviewed carefully.
If you try this patch and settings don't match, please tell me what side of the settings didn't match, send me a picture of the view, and also drop your configuration files here so I can take a look: I do not have access to keyboardBrigthness
, brigthness
, kernelProfiles
on my laptop so I can't test those.
I think the UI is not optimal - I won't work on nitpicks for the interface, what I'm trying to get here is the correct KConfigXT port. interface nitpicks we can fix later on.
@crossi I'v read the documentation of the settings exporter but I failed to create a script for it, I appreciate any help.
Please ignore the rebase-me
commits, this will be squashed.