Add PowerButtonActionModel class and use it in global config KCM
Extracted from Tomaz Canabrava's unmerged MR !66, but generalized to allow any arbitrary combination of selectable actions. This model is quite easily plugged into the BatteryCriticalCombo widget in the global config KCM a.k.a. "Advanced Power Settings", replacing the previously manually inserted option items. I left the profile action config untouched so that the model class can live in kcmodules/common/ as opposed to powerdevilcore directly. PowerButtonActionModel will also come in handy once we port the global and profile KCMs to QML. One functional change: The "critical level" action now also allows selecting Hybrid Sleep, which was previously unavailable. No good reason to hide that from the user, especially now that PowerDevil::Core handles it correctly. Hybrid suspend might even be the best of all critical-battery suspend options for many users.
-
mentioned in merge request !268 (closed)
-
mentioned in merge request !270 (merged)
-
mentioned in commit aac89c57
-
mentioned in commit 2aaecb14
Please register or sign in to comment