Commit graph

1684 commits

Author SHA1 Message Date
Alexander Schlarb a2b7ce74b2 Support Forward and Backward mouse buttons in presentation mode
REVIEW: 130172
2017-07-08 12:27:46 +02:00
Tobias Deiminger 574fad92c8 Initialize cursor in PageView scrollbars with ArrowCursor
BUG: 334798
REVIEW: 130131
2017-05-21 23:37:04 +02:00
Tobias Deiminger 69dca1e7dd Fix segfault when document is closed while annotation is selected
Prevent MouseAnnotation from accessing PageViewItem widgets any longer
after PageView deletes them in PageView::notifySetup().

BUGS: 378696
REVIEW: 130087
2017-04-13 19:17:56 +02:00
Gilbert Assaf a2aceadc13 Allow to create bookmarks from the TOC
BUGS: 190203
REVIEWS: 129999
2017-03-23 01:22:08 +01:00
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
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
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 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 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 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 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
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
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 8c9507b057 Merge remote-tracking branch 'origin/Applications/16.12' 2017-02-02 00:28:10 +01:00
Albert Astals Cid af6e9a9b0b Fix rendering artifacts in Okular with "draw border around links" turned on
Qt5 changed the default QPen to not be cosmetic, so we need to specify we want it to be cosmetic

BUGS: 375719
2017-02-02 00:26:23 +01:00
Albert Astals Cid 91f092cdf4 Merge remote-tracking branch 'origin/Applications/16.12' 2017-02-01 00:50:29 +01:00
Albert Astals Cid 96d8953878 Fix Enter turning the thumbnail filter bar into a regular search bar
BUGS: 375755
2017-02-01 00:49:21 +01:00
Martin T. H. Sandsmark 7f3eebd9f3 Only show warning messages by default
REVIEW: 129832
2017-01-16 18:41:33 +01:00
Martin T. H. Sandsmark 033f21c826 Port some missing debug output to categorized logging 2017-01-14 19:15:26 +01:00
Heiko Becker f968296c51 Invoke the correct KCModule
The webshortcuts KCM has been renamed from 'ebrowsing' to
'webshortcuts' when it was moved from konqueror to kio.

REVIEW: 129805
2017-01-11 17:05:55 +01:00
Albert Astals Cid e833b3ce65 Fix menu titles not showing up
QMenu title/section are optional to draw from the style side but we have crucial information in them
so reuse old KMenu code to create a fake action that behaves as title

I'll see if KF5 wants to accept this as contribution later

BUGS: 374079
2016-12-28 17:05:46 +01:00
Yuri Chornoivan e1535db5a0 Fix minor typos 2016-11-04 13:16:34 +02:00
Albert Vaca 3c93b2523e Added missing overrides found by clang-tidy 2016-10-29 17:07:10 +02:00
Aleix Pol 109c4a4090 Improve Sidebar minimum size
Account for hidden elements
Don't make it like we're calculating the whole geometry although we're not
2016-10-29 17:04:50 +02:00
Aleix Pol 9e87989ade Fix moc mess 2016-10-29 16:40:03 +02:00
Albert Vaca c71f308252 Fixes suggested by Clazy 2016-10-29 16:33:05 +02:00
Martin T. H. Sandsmark ff3cc05b6b Fix recoloring of inverted colors.
BUG: 368229
2016-10-29 13:02:07 +02:00
Albert Astals Cid 32149802b9 Fix wrong c&p 2016-10-29 11:26:52 +02:00
Albert Astals Cid 62eea3336b Merge remote-tracking branch 'origin/master' into frameworks 2016-10-29 11:13:24 +02:00
Albert Astals Cid f943f9ee8b Remove the !this checks
It's not part of the standard and GCC recently removed support for it

Looking at the code it seems we only need one external check, let's hope i'm right :D
2016-10-17 13:02:49 +02:00
Martin T. H. Sandsmark 9d90a08ef5 Implement zooming with a pinch gesture on a touch screen
Patch by Oliver Sander <oliver.sander@tu-dresden.de>

REVIEW: 128821
BUG: 366781
2016-10-15 15:22:35 +02:00
Martin T. H. Sandsmark c7bbf6f77c Rename method slotAutoScoll to slotAutoScroll
The old method name contained a typo.

Patch by Oliver Sander <oliver.sander@tu-dresden.de>.

REVIEW: 128938
2016-10-01 12:52:30 +02:00
Gleb Popov bfa28f1f64 Fix build with Visual Studio 2015.
REVIEW: 128805
2016-08-31 17:34:15 +03:00
Martin T. H. Sandsmark 2639b1e8ed Extend print preview dialog to handle .pdf previews 2016-08-13 22:29:50 +02:00
Olivier CHURLAUD 04908dba2f Adding RTL reading mode feature to okular
Commited on behalf of Fahad Al-Saidi

REVIEW: 125397
BUG: 325650
2016-07-26 01:37:54 +02:00
Martin T. H. Sandsmark 09a99ba96b Port away from obsolete Qt functions 2016-07-24 23:46:53 +02:00
Martin T. H. Sandsmark c4287096a3 Fix inhibiting of sleep on modern linux systems, port away from deprecated Solid methods 2016-07-24 23:36:03 +02:00
Martin T. H. Sandsmark 6875dc88cf Port away from deprecated KConfig API 2016-07-24 22:43:41 +02:00
Martin T. H. Sandsmark d8fdb14941 Port away from deprecated Phonon API 2016-07-24 22:40:20 +02:00