QLinkedList is gone from Qt6
The 1:1 port is std::list but we don't need iterator stability on
removal/insertion so just port to QList (one case to std::vector since
QList needs a copy constructor)
QLinkedList is deprecated in later Qt5 and gone in Qt6
The 1:1 port is std::list but in this cases all we ever do
is create the lists, push back to them, and pass then around
to be read, for that a QList is more than enough
By using Poppler 20.10 new custom image stamps APIs
Instead of the incompatible hack we used before that only worked for Okular.
This is done by modifying the update function used by PopplerAnnotationProxy in order to load the image in
the correct dimensions and send it to the poppler-Qt5 frontend.
We temporarily store the stamp annotation appearance when deleting it so that we can set it again when doing an undo undo.
* Don't make WidgetAnnotation know about signatures stuff, widget
annotations are for multiple things
* Don't create an "empty" widget annotation and then call sign on it
(which is wrong because widget annotations can be multiple things),
just say sign the document with this data (cert, l&f, etc)
* Remove the "management" functionality from CertificateTools it was
only visual, i.e. it didn't really add/remove certificates
* Ask for the NSS password (if needed)
find . \( -name "*.cpp" -or -name "*.h" -or -name "*.c" -or -name "*.cc" \) -exec clang-format -i {} \;
If you reached this file doing a git blame, please see README.clang-format (added 2 commits in the future of this one)
Use jq to filter compile_commands.json to not include the compilation of
autogenerated files, we don't want to check those
Also filter out the synctex folder, since that is imported code
Since unfortunately some of the autogenerated includes don't pass the
checks we do a trick of building out of source and then specifying the
.*/okular/.* path as the only includes we care about
Summary:
This shall improve the documentation of several area classes,
including NormalizedPoint, NormalizedRect, RegularArea, RegularAreaRect.
This shall also clarify when absolute coordinates and when normalized
coordinates are used.
Describes the normalized coordinate system in NormalizedPoint, with a new term “reference area” do describe mapping.
TODO:
Page view rotation.
This is not done consistently in Okular, but can be changed later. I think this documentation will help (me) with that then.
Test Plan: Run doxygen
Reviewers: #okular, aacid
Reviewed By: #okular, aacid
Subscribers: aacid, okular-devel
Tags: #okular
Differential Revision: https://phabricator.kde.org/D21266
Summary:
Changing typewriter text color can be done in the typewriter properties dialog, or programmatically via new okular API methods TextAnnotation::textColor and TextAnnotation::setTextColor.
poppler >= 0.69 is required to store text color natively inside PDF documents. For other document types, text color is stored as metadata inside the document archive.
This work was done during GSoC 2018. See https://community.kde.org/GSoC/2018/StatusReports/DileepSankhla for details.
Test Plan:
- properties dialog of typewriter annotation has "Font Color" picker
- saving to PDF results in <r> <g> <b> rg operation in /DA
- saving to archive results in fontColor="rrggbb" attribute in metadata.xml
Reviewers: sander
Reviewed By: sander
Subscribers: kde-doc-english, sander, okular-devel
Tags: #okular, #documentation
Differential Revision: https://phabricator.kde.org/D15205
Summary:
This adds support for actions associated with form fields
through corresponding annotation widgets.
Test Plan:
Still needs a unit test, only tested manually with
the document attached in the task.
Reviewers: #okular, aacid
Reviewed By: #okular, aacid
Subscribers: okular-devel, aacid
Tags: #okular
Maniphest Tasks: T8627
Differential Revision: https://phabricator.kde.org/D12665
Usage:
If you left-click an annotation, it gets selected. Resize handles appear on the selection rectangle. When cursor is moved over one of the 8 resize handles on the corners/edges, the cursor shape changes to indicate resize mode. Everywhere else on the annotation means "move", just as it was before resize feature was added. Pressing ESC or clicking an area outside the annotation cancels a selection. Pressing Del deletes a selected annotation.
Feature is only applicable for annotation types AText, AStamp and AGeom.
Implementation:
It works by eventually changing AnnotationPrivate::m_boundary and notifying generator (i.e. poppler) about that change. Annotation state handling is shifted out of PageView into a new class MouseAnnotation (ui/pageviewmouseannotation.cpp). Some functionality not related to resizing but to annotation interaction in general is also shifted to class MouseAnnotation, to build a single place of responsiblity.
Other changes:
Add method Document::adjustPageAnnotation, backed by a QUndoCommand.
class Okular::AdjustAnnotationCommand.
Add Annotation::adjust and Annotation::canBeResized methods.
Draw resize handles in PagePainter::paintCroppedPageOnPainter.
Resize and move work
-for types AText, AStamp and AGeom
-on all pages of document
-when viewport position changes
-when zoom level changes
-for all page rotations (0°, 90°, 180°, 270°)
Selection is canceled
-when currently selected annotation is deleted
-on mouse click outside of currently selected annotation
-ESC is pressed
Viewport is shifted when mouse cursor during move/resize comes close to viewport border.
Resize to negative is prevented.
Tiny annotations are still selectable.
If mouse is moved over an annotation type that we can focus, and the annotation is not yet focused, mouse cursor shape changes to arrow.
If mouse cursor rests over an annotation A, while annotation B is focused, a tooltip for annotation A is shown.
Selected Annotation is deleted when Del is pressed.
Test for regressions:
-Annotation interaction (focus, move, resize, start playback, ...) are only done in mode EnumMouseMode::Browse.
-If mouse is moved over an annotation type where we can start an action, mouse cursor shape changes to pointing hand.
-If mouse is moved over an annotation type that we can't interact with, mouse cursor shape stays a open hand.
-If mouse cursor rests over an annotation of any type, a tooltip for that annotation is shown.
-Grab/move scroll area (on left click + mouse move) is prevented, if mouse is over focused annotation, or over AMovie/AScreen/AFileAttachment annotation.
-A double click on a annotation starts the "annotator".
REVIEW: 127366
BUG: 177778
BUG: 314843
BUG: 358060
That patch extracts the video file, which is defined in a
rich media annotation as parameter for the flash player,
and uses the normal multimedia player, to playback the video
file.
This feature requires poppler-qt5 in version 0.36.
FEATURE: 326230
REVIEW: 124612
This fixes the auto-start feature of PDFs generated with the LaTeX movie
package, which uses the additional action of a widget annotation to start
the movie when entering the page.
BUG: 300051
REVIEW: 106430
FIXED-IN: 4.10
What it represents is totally in the hands of the various generators.
Add a function hook to cleanup the annotation data (the "native id", basically).
svn path=/trunk/KDE/kdegraphics/okular/; revision=796378