Commit graph

7706 commits

Author SHA1 Message Date
Albert Astals Cid
7a9209569c Fix regression in previous commit about going to next page 2017-03-20 00:35:05 +01:00
Oliver Sander
618072f8a2 Change pages in presentation mode by swiping on touch screen
REVIEW: 130012
BUGS: 354012
2017-03-20 00:32:53 +01:00
Albert Astals Cid
63a08bc01a Enable -Wsuggest-override 2017-03-19 23:27:04 +01:00
Tobias Deiminger
0957abc39a Add annotation resize functionality
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
2017-03-19 23:18:17 +01:00
Oliver Sander
3859fba07d Remove dependency on KActivities on Windows.
REVIEW: 130022
REVIEW: 126378
2017-03-18 01:58:47 +01:00
Marco Scarpetta
fa315eb59c Allow to disable automatic search while typing
BUGS: 326522
REVIEW: 129956
2017-03-14 00:31:42 +01:00
Oliver Sander
54436672fb Allow to rotate the page view using two-finger pinches on a touchscreen
REVIEW: 126809
2017-03-11 18:33:59 +01:00
Miklós Máté
59dd04766c Set viewport only once
REVIEW: 129287
2017-03-11 18:10:53 +01:00
Albert Astals Cid
d3b5e13dad Reset d->mousePressPos correctly in mousePress after popup exec
BUGS: 363776
2017-03-09 00:38:00 +01:00
Yuri Chornoivan
506e51d461 Fix minor word repetition 2017-03-05 21:05:28 +02:00
Albert Astals Cid
f06bf612d7 Merge remote-tracking branch 'origin/Applications/16.12' 2017-03-05 19:53:10 +01:00
Albert Astals Cid
0419812ad7 djvu: Initialize to white if rendering fails
It's what ddjvu does, and also it's not nice to return an uninitialzed image back to the user

BUGS: 377202
2017-03-05 19:51:29 +01:00
Albert Astals Cid
7da5adce57 indent++ 2017-03-05 19:35:16 +01:00
Albert Astals Cid
e4de08a0a3 GIT_SILENT Upgrade KDE Applications version to 16.12.3. 2017-03-04 11:21:52 +01:00
Albert Astals Cid
7d1cf88263 Merge remote-tracking branch 'origin/Applications/16.12' 2017-03-03 23:57:34 +01:00
Albert Astals Cid
7a50ce0edf Accumulate Control+Wheel Deltas until they reach QWheelEvent::DefaultDeltasPerStep
This way zooming in/out with a touchpad is easier to control

BUGS: 377128
2017-03-03 23:56:28 +01:00
Albert Astals Cid
4573c7a646 Recalculate forms after other are edited
BUGS: 376958
2017-03-03 01:08:44 +01:00
Albert Astals Cid
20a81c9de0 Set the Okular Form additional actions from the poppler Form additional actions 2017-03-03 01:00:09 +01:00
Albert Astals Cid
cfc158977f Add the additional action to form 2017-03-03 00:41:06 +01:00
Albert Astals Cid
56bcdad680 Refresh the pixmap of the page that contains the field when setting its text 2017-03-03 00:36:08 +01:00
Albert Astals Cid
2ca1779feb Add a way to get the PagePrivate if you have the Page 2017-03-03 00:32:08 +01:00
Albert Astals Cid
1d2dd42c67 no need for & here 2017-03-02 22:45:45 +01:00
Albert Astals Cid
ce1c882d7e Make slotFormChanged store multiple pages in the timer and not just one
It's hard the user edits forms in more than one page in less than a second (though possible)
but once we introduce JS parsing that will be defenitely possible so need to store more than one page
2017-03-02 22:42:50 +01:00
Albert Astals Cid
19be15b6a5 Field readOnly applies to the user but not to JS 2017-03-02 22:38:29 +01:00
Albert Astals Cid
1fd2004aa3 Don't show widgets for non editable forms
What's the point of showing a form if we don't let the user do anything with it?
2017-03-02 22:34:25 +01:00
Albert Astals Cid
519f0acac7 document which variant kind is returned 2017-03-02 22:23:41 +01:00
Albert Astals Cid
c80b59f1de I said use new API 2017-03-02 22:03:46 +01:00
Albert Astals Cid
b4ac0be485 Use the new API 2017-03-02 22:00:27 +01:00
Albert Astals Cid
ec70995895 QString as key is evil, add a nice enum 2017-03-02 21:04:59 +01:00
Albert Astals Cid
e72d2f5357 virtual override -> override 2017-03-02 20:40:09 +01:00
Albert Astals Cid
191a37fb52 Q_DECL_OVERRIDE -> override 2017-03-02 20:39:24 +01:00
Albert Astals Cid
4072eb0c3a Add override 2017-03-02 20:38:50 +01:00
Albert Astals Cid
b50aff3ed7 Q_NULLPTR -> nullptr 2017-03-02 20:09:32 +01:00
l10n daemon script
c058c809e2 GIT_SILENT made messages (after extraction) 2017-02-28 13:52:32 +01:00
l10n daemon script
5c929b2585 GIT_SILENT made messages (after extraction) 2017-02-28 09:33:35 +01:00
Albert Astals Cid
0329e29779 Merge remote-tracking branch 'origin/Applications/16.12' 2017-02-28 00:26:36 +01:00
Albert Astals Cid
6874317c8a Fix crash on CHM files that use "plain English" LCID
BUGS: 376936
2017-02-28 00:25:20 +01:00
l10n daemon script
5b7a8d3d67 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-02-26 07:52:08 +01:00
l10n daemon script
15543ea8bd GIT_SILENT made messages (after extraction) 2017-02-26 06:49:42 +01:00
Albert Astals Cid
ac345ba4dc Merge remote-tracking branch 'origin/Applications/16.12' 2017-02-20 01:08:01 +01:00
Albert Astals Cid
ee7e3737f4 Account for non local non relative video file urls
BUGS: 376574
2017-02-20 01:06:30 +01:00
Christoph Feck
7a013e3869 Require KHtml only when building CHM generator
Reviewed by: aacid

Differential Revision: D4507
2017-02-10 02:57:06 +01:00
Albert Astals Cid
d2578c624a Merge remote-tracking branch 'origin/Applications/16.12' 2017-02-08 23:18:20 +01:00
Walter Mollica
6f3970dbe4 Extend viewport update area when updating or clearing the a selection rectangle
Extending the viewport update area of the selection rectangle when dragging the mouse while in selection mode or when canceling the selection ensures that no artifacts remain on-screen in either case.

BUG: 266537

Differential Revision: https://phabricator.kde.org/D4487
2017-02-08 23:16:50 +01:00
Albert Astals Cid
02ea499d90 I don't consider myself the maintainer 2017-02-08 20:23:38 +01:00
l10n daemon script
c55c44ed95 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-02-07 12:50:18 +01:00
l10n daemon script
2a0bdca687 GIT_SILENT made messages (after extraction) 2017-02-07 08:56:11 +01:00
l10n daemon script
963ce79c45 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-02-06 07:51:00 +01:00
l10n daemon script
7381616690 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-02-06 06:04:23 +01:00
l10n daemon script
53a6cde141 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-02-04 06:23:35 +01:00