Commit graph

16 commits

Author SHA1 Message Date
Albert Astals Cid ba35bbd9e6 emit -> Q_EMIT
A future ECM is going to force that on us, so do it early
2022-03-19 10:58:47 +00:00
Volker Krause 50d0703ae0 Enable readability-braces-around-statements 2022-03-09 23:29:56 +01:00
Nicolas Fella d1ecad897c Implement keystroke commit events
When a form field loses focus a special keystroke event with
willCommit=true is sent.

This is based on work by Joao Netto <joaonetto901@gmail.com>
2022-03-07 22:14:26 +00:00
Nicolas Fella 03d83eb22d Don't create keystroke event when cursor moves
Currently we send a keystroke when the cursor moves but the text doesn't change.

Acrobat doesn't do it so let's do the same
2022-02-24 22:12:13 +01:00
Nicolas Fella 6c8cafbb1c Simplify keystroke event handling
Make it more similar to how we handle the format event.

We pass the new value to processKeystrokeAction, that calls the script
and sets the new value for the form object according to the result. If
needed the widget is refreshed to reflect the new text
2022-02-24 16:10:22 +01:00
Nicolas Fella ae8251a145 Don't clear focus when setting formwidget visible
Otherwise setVisibility(true) removes the focus
2022-02-24 15:36:43 +01:00
Albert Astals Cid 4cd6bfd30e mobile: Add Signature Viewing UI
Move a few files from part/ to gui/ since they are also used by the
mobile/ frontend
2022-02-18 08:32:13 +00:00
Nicolas Fella 3e2e5cc95e Simplify form action handling
Instead of going widget -> controller -> pageview -> document do
widget -> document directly.
2022-01-24 16:00:19 +01:00
Albert Astals Cid a8e5f6e9f7 PDF: Allow signing unsigned signature fields 2022-01-24 13:18:36 +01:00
Alexander Lohnau ac083e44e3 Make meaning of sponsoring note more clear 2021-06-10 08:11:56 +00:00
Alexander Lohnau 24c75071be Move sponsoring note outside of SPDX-FileCopyrightText statement 2021-06-10 08:11:56 +00:00
Alexander Lohnau 2f193a63de Convert license headers to SPDX 2021-06-10 08:11:56 +00:00
Albert Astals Cid e457ceb731 FormLineEdit: Don't run focusin action when gaining focus because of window management
Adobe Reader doesn't do it, and with reason, because otherwise we end up
with:
 * Run focus in script
 * script shows alert()
 * field loses focus and gains it again once the alert() is closed
 * infinite loop

BUGS: 436990
2021-06-04 21:17:41 +00:00
Albert Astals Cid b518c01f1c FormLineEdit: Don't run focusout/formatfield actions when losing focus because of window management
Adobe Reader doesn't do it and if we do it can end up crashing because
we end up running two focusout actions in parallel and our script system
is not prepared for that:

Scenario:
 * Tab out of a field
 * Script for that focusout runs
 * focus goes to next field
 * script for that focusout shows an alert()
 * second focusout script for that field runs while the first is running
 * bad stuff

BUGS: 435833
2021-06-04 21:17:41 +00:00
Albert Astals Cid 812adaa26d FormLineEdit: Move editing=false up in the focus out event
The fact that we don't want to process the focusout/formatfield actions
doesn't mean we are still editing the field
2021-06-04 21:17:41 +00:00
David Hurka 19d5dd8ec7 New part/ directory for okularpart sources from /, ui/, conf/
Source files are no longer separated by UI and non-UI and similar,
but only by their build target.

* ui/ -> part/
* Move all source files from conf/ to part/
* Keep config skeleton definitions in conf/, needed for the mobile target too
* Move editdrawingtooldialogtest.h from conf/autotests/ to autotests/
* ui/data/icons/ -> icons/
* Move /part.cpp, /part.rc and similar files to part/
* Adapt include paths in source files
* Adapt CMakeLists.txt files (in / and in subdirectories)
* Adapt /Messages.sh
2020-11-18 19:32:56 +00:00
Renamed from ui/formwidgets.cpp (Browse further)