D28115: feat(kded): add a dbus method to lock current rotation
Roman Gilg
noreply at phabricator.kde.org
Sun Mar 22 14:55:48 GMT 2020
romangg requested changes to this revision.
romangg added a comment.
This revision now requires changes to proceed.
Please call the functions `AutoRotate`. I failed to name it consistently in the code until now but let's go with AutoRotate from now on (and I will try to rename it where I accidentally said AutoRotation in some form). Reasons are that it's shorter and when I googled it I found only one technical document. Was for Android and called the feature that way <https://support.google.com/accessibility/android/answer/6006961?hl=en>.
INLINE COMMENTS
> config.cpp:104
> + }
> +}
> +
Do it like this:
void Config::setAutoRotation(bool value)
{
for (KScreen::OutputPtr &output : m_data->outputs()) {
if (output->type() != KScreen::Output::Type::Panel) {
continue;
}
if(m_control->getAutoRotate(output) != value) {
m_control->setAutoRotate(output, value);
}
}
m_control->writeFile();
}
REPOSITORY
R104 KScreen
REVISION DETAIL
https://phabricator.kde.org/D28115
To: bshah, romangg
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20200322/da071ad2/attachment.html>
More information about the Plasma-devel
mailing list