This adds a KToggleAction which sets annotation tools to constrain angle mode.
It provides an alternative user interface to the Shift button, which is used to constrain angles since MR !210.
The action and the Shift button are XOR-ed, i. e. if constrain angle mode is activated, pressing Shift temporarily disables it.
The action state is remembered accross sessions, for consistency with most other actions. It should be difficult to check this action without knowing of its existence, since it is not in any toolbar or menu, just in the action collection.
The meaning of AnnotatorEngine::Modifiers was generalized a bit, moving the responsibility about whether to constrain angles back to PageViewAnnotator, because AnnotatorEngine does not know about the action.
FEATURE: 353560
FIXED-IN: 1.11
@ -1171,13 +1171,10 @@ Context menu actions like Rename Bookmarks etc.)
</tgroup>
</informaltable>
<para>
The contents of the annotating toolbar can be configured using the <link linkend="configannotations">Annotations page of &okular; configuration dialog</link>. This page can be opened with &RMB; clicking on the annotating toolbar then choosing <guimenuitem>Configure Annotations...</guimenuitem> from the context menu.
</para>
<para>
With a single &LMB; click on an annotation tool button you can use a tool once.
If you ⪚ want to highlight all important parts of a text, activate that tool
permanently by double clicking on the tool button.
Press the <keycap>Esc</keycap> key or click the tool button again to leave the permanent mode.
By pressing <keycap>Shift</keycap> you can constrain the angle of line and polygon annotations to 15° steps, and the ratio of shape annotations (⪚ Rectangle, Ellipse) to 1:1. You can also get a toolbar button from <ulink url="help:/fundamentals/config.html#toolbars">Configure Toolbars...</ulink>.
</para>
<para>
The contents of the <guilabel>Quick Annotations</guilabel> menu can be configured using the <link linkend="configannotations">Annotations page of &okular; configuration dialog</link>. This page can be opened by clicking <guilabel>Quick Annotations</guilabel> button, then choosing <guimenuitem>Configure Annotations...</guimenuitem> from the pop-up menu.
aFont->setToolTip(i18nc("@info:tooltip","Annotation font (Current annotation has no font)"));
}
if(isStraightLine||isPolygon){
aConstrainRatioAndAngle->setToolTip(i18nc("@info:tooltip","Constrain line angle to 15° steps"));
}elseif(isShape){
aConstrainRatioAndAngle->setToolTip(i18nc("@info:tooltip","Constrain shape ratio to 1:1"));
}else{
aConstrainRatioAndAngle->setToolTip(i18nc("@info:tooltip","Constrain shape ratio to 1:1 or line angle to 15° steps (Not supported by current annotation)"));
newKToggleAction(QIcon::fromTheme(QStringLiteral("snap-angle")),i18nc("@action When checked, line annotations are constrained to 15° steps, shape annotations to 1:1 ratio","Constrain Ratio and Angle of Annotation Tools"),this);