Commit graph

558 commits

Author SHA1 Message Date
Jaydeep Solanki e95b1db23c epub audio support 2013-10-24 00:20:11 +02:00
Fabio D'Urso 57ea580057 Merge remote-tracking branch 'origin/KDE/4.11' 2013-10-01 19:26:06 +02:00
Fabio D'Urso 177235d5d7 PageView: compile if PAGEVIEW_DEBUG is set 2013-10-01 19:21:13 +02:00
Thomas Fischer e4aa8317b5 Auto-fit zoom
BUGS: 249364
REVIEW: 110003
2013-08-18 17:19:20 +02:00
Albert Astals Cid 45dc1990eb Don't keep track of middle mouse press in a variable
This fixes the rendering problem in 321212. Why? Because what was happening is that for some reason the middle mouse press to gets to the PageView but not the release, this meant that the PageView got stuck into mouseMidZooming mode and all sort of bad things happened. Now since we don't cache if the mid mouse button is pressed (we just query it when needed) everything is better.

Ideally i'd like to know why we get the press and not the release, but not sure that's feasible to "fix".

BUGS: 321212
REVIEW: 111901
FIXED-IN: 4.11.0
2013-08-06 22:01:17 +02:00
Fabio D'Urso c64a6499e2 Show IBeam cursor instead of Cross while creating text markup annotations 2013-07-31 00:02:12 +02:00
Fabio D'Urso 39d44edbd7 Restore the open hand cursor after creating an annotation in non-continuous mode 2013-07-31 00:02:12 +02:00
Fabio D'Urso ef7aaaf4d5 updateCursor: small change to reflect that only Browse mode lets you interact with links/annotations
This patch only changes the code, the resulting behavior hasn't changed
2013-07-31 00:02:12 +02:00
Fabio D'Urso 8bf046371a Centralize cursor selection logic during creation of annotations into updateCursor 2013-07-31 00:02:07 +02:00
Yuri Chornoivan 3b73357d2f Fix some typos found by Krazy2 2013-06-24 13:46:16 +03:00
Peter Grasch 09dad5e6d2 Usability: Use crosshair cursor while annotating
REVIEW: 109633

updateCursor changes by Albert
2013-06-23 20:45:04 +02:00
Jon Mease b7ce9114c5 Undo support for PDF forms
Together with the already commited support for undo in annotations fixes 177501
BUGS: 177501
REVIEW: 110589
FIXED-IN: 4.11.0
2013-06-03 22:46:41 +02:00
Fabio D'Urso 5860fc89c5 Added shortcut to annotation config panel as review toolbar's context menu 2013-05-28 23:55:10 +02:00
Fabio D'Urso 9e7cf9ae4b Merge remote-tracking branch 'origin/master' into configurable-review-tools 2013-05-20 20:28:49 +02:00
Albert Astals Cid 446a636abf Merge remote-tracking branch 'origin/KDE/4.10' 2013-05-20 18:22:56 +02:00
Albert Astals Cid 4e05cc2526 Fix wrong check
Parker messed up the logic that force it to be in text selection mode
to be on non text selecion mode when doing an unrelated change.

As the "bug" as showed we can selectAll in non text selection mode as well
so remove the check altogether

BUGS: 159276, 319554
FIXED-IN: 4.10.4
2013-05-20 18:15:55 +02:00
Fabio D'Urso 2e0296e913 Merge remote-tracking branch 'origin/master' into configurable-review-tools
Conflicts:
	ui/pageview.cpp
	ui/pageviewannotator.cpp
2013-04-19 01:17:56 +02:00
Jon Mease 78faf1e68f Add undo/redo support for annotations
REVIEW: 107442
2013-04-06 00:22:48 +02:00
Jaydeep Solanki 1121cff1b8 Implement Open url in browser for plain text
BUGS: 281027
REVIEW: 108614
FIXED-IN: 4.11.0
2013-03-26 22:43:56 +01:00
Albert Astals Cid 04c3b836ff Merge remote-tracking branch 'origin/KDE/4.10'
Conflicts:
	generators/spectre/okularApplication_ghostview.desktop
2013-03-14 23:09:57 +01:00
Albert Astals Cid 3f3f82afa1 Fix my email address 2013-03-14 23:09:07 +01:00
Albert Astals Cid 541650a4f4 Remove the concept of observer/view id
Just use the pointer as id :-)

This is BIC and SIC, increase the soversion now to makes sure we don't forget in the future

Patch based in an earlier patch by Bogdan Cristea <cristeab@gmail.com>
REVIEW: 109115
2013-02-24 23:01:02 +01:00
Albert Astals Cid 56e20047b8 Repaint on config change
Now that the pdf generator does not incorrectly delete the pixmaps
on a config change we need to repaint the viewports in case
there has been a inverted color change or something similar
2012-12-31 12:04:23 +01:00
Fabio D'Urso c9e5d0a0b0 Make PageViewAnnotator reparse tool list on configuration change
This doesn't do anything useful at the moment. In next patch I'll turn
the tool list into a configurable option.
2012-12-27 19:38:43 +01:00
Fabio D'Urso 5b8d51d66e Fixed wrong index
BUG: 311601
2012-12-13 11:40:28 +01:00
Albert Astals Cid 7ba2f70453 Remove duplicated code 2012-12-12 22:23:17 +01:00
Albert Astals Cid f70c31aed6 Some const 2012-12-12 22:23:17 +01:00
Fabio D'Urso 7cdc42a682 Hide widget annotations from the user (some other checks)
This patch also prevents the popup window from being opened on
double-click and the annotation tooltip from being shown.
2012-12-12 20:01:46 +01:00
Tobias Koenig 38861f5f57 Hide widget annotations from the user
Widget annotations are not meant to behave like "regular" annotations.
In particular, they must not be listed in the review panel or when the
user right-clicks on form fields.
2012-12-12 19:33:48 +01:00
Fabio D'Urso 9101f9b410 Two changes in PageView's zoom combobox
- Removed useless document->supportsTiles() check in setupBaseActions()
   setupBaseActions() is called only once, before a document is opened,
   therefore supportsTiles() always returns false
 - Show the 400% entry even when tiled rendering is not available, so
   that the last entry always corresponds to the maximum allowed zoom
   level (i.e. 1600% or 400% according to whether tiled rendering is
   available or not)
2012-12-01 01:34:54 +01:00
Mailson Menezes 7528fb8c88 Change TilesManager::tilesAt use
- The second parameter has changed to an enum
 - Now Page::tilesAt only returns tiles with pixmaps
2012-11-15 20:41:17 -03:00
Mailson Menezes 66e93136f9 Limit zoom to 400% if document doesn't support tiles 2012-11-15 20:24:51 -03:00
Fabio D'Urso 0a64022a61 pagepainter: Fix wrong positioning of tiles if trim margins is on
This patch breaks positioning of other objects, which will be fixed in the
next patch.
2012-11-15 22:48:08 +01:00
Mailson Menezes d2d2fa3b2a Refactoring PageView 2012-11-12 13:11:34 -03:00
Fabio D'Urso 85d5f043a2 Removed useless Tile::operator= 2012-11-09 17:49:23 +01:00
Albert Astals Cid bb9508e2f4 Be const my friend 2012-11-09 01:10:43 +01:00
Mailson Menezes f56c5a8ac9 Merge branch 'master' into tiled-rendering 2012-11-08 20:51:01 -03:00
Fabio D'Urso 437ddad588 Hide tiles manager within okularcore
Only the Tile class (tile.h) is visible from the outside
2012-11-08 20:26:17 -03:00
Fabio D'Urso e12966b259 Removed possibility to have a tiles manager per observer
Now only the PageView can have a tiles manager.
2012-11-08 20:52:01 +01:00
Mailson Menezes f91f55d117 Split tile structure in Tile and TileNode
The new class TileNode represents a node in the tree structure
whereas Tile is just a data structure to store the pixmap and tile rect
and is used outside tiles manager.
2012-11-08 14:44:57 -03:00
Mailson Menezes da54ffdd8e Improve the evicting algorithm
The miss counter was taken away. Now the algorithm relies on the
distance between the tiles and the viewport.

Also the visibleRect() and setVisibleRect() methods were removed from
TilesManager since we now pass this information to
TilesManager::cleanupPixmapMemory()
2012-11-08 10:58:08 -03:00
Tobias Koenig 6dddb7eff8 Adapt PageView and PresentationWidget to handle ScreenAnnotations correctly
REVIEW: 106986
2012-10-25 08:30:41 +02:00
Tobias Koenig d68bba55b4 Make VideoWidget independet of associated annotation type
REVIEW: 106606
2012-10-22 13:03:36 +02:00
Albert Astals Cid c1add8acdc Merge remote-tracking branch 'origin/KDE/4.9' 2012-10-16 20:39:58 +02:00
Albert Astals Cid 5650efa667 Follow allow rules 2012-10-16 20:38:55 +02:00
Christian Holme 146369e3d2 Send word to selection clipboard on double click
BUGS: 306824
FIXED-IN: 4.9.3
2012-10-16 20:36:52 +02:00
Bogdan Cristea 7ce6990098 Separate settings in core and non core
Will make it easier to make separate apps based on the core in the future
Note this will most probably break your settings if you are not running a very up to date kdelibs (4.9 or 4.10)
so be careful on updating
REVIEW: 104947
2012-10-16 00:28:29 +02:00
Albert Astals Cid 1f2e2353b2 Small style changes 2012-10-15 20:21:43 +02:00
Jon Mease b395e742fc Support high precision QTabletEvents for creating annotations
REVIEW: 106816
2012-10-15 20:11:47 +02:00
Sandro Mani ec7b2e763d Make document scroll as necessary when in text selection mode
BUGS: 165744
FIXED-IN: 4.10.0
REVIEW: 106579
2012-09-28 17:57:03 +02:00
Albert Astals Cid ed02ecfb60 Remove the disable threading option
It was added ages ago when our threading code was not perfect, but should be top notch now so this makes not any sense
2012-09-25 21:18:10 +02:00
Tobias Koenig f70dc3c1e1 Fix visibility of VideoWidget on page change events
We have to differ between the initialization and the
'page entered' and 'page left' event.
This avoids that all VideoWidgets with poster image show up
on first slide or do no disappear when changing slide.
2012-09-21 11:20:53 +02:00
Fabio D'Urso c6f20bd1eb Killed ZoomFitText, not supported by Okular
Commit 02e7c0abfb says that it's "not yet
implemented", but that was KDE 4.0, before the "Trim margin" feature was
introduced.
2012-09-08 20:43:44 +02:00
Sandro Mani 636d4e1c75 Allow customization of scroll page keybindings
REVIEW: 106293
BUGS: 304291
FIXED-IN: 4.10.0
2012-09-05 22:12:11 +02:00
Mailson Menezes ceea13e108 Always have the correct viewport when zooming
Whenever the scrollbar value changes we request a new pixmap so we
always have an up to date viewport.
Unfortunately that can lead to unnecessary calls when zooming. That's
because the zoom event changes the value of each scrollbar but not all
at once. Instead one scrollbar value is changed after the other (leading
to two requests).
The problem here is that when the first request is made just one of the
scrollbars have its updated value while the other still carries the old
one. Previously that wasn't a big deal but now we depend on the correct
scrollbar values to get the visible viewport and thus request only the
visible tiles (and its whereabouts).
Without that change we're making requests to tiles that are not actually
visible and this only gets worse as the zoom level gets higher.
2012-09-03 13:14:20 -03:00
Sandro Mani 7d18d176bc When there is only one page, "Opposite pages" should have no effect
FIXED-IN: 4.10.0
BUGS: 305194
2012-08-30 01:03:16 +02:00
Sandro Mani 56dd5278d2 Fix Tools->review inconsistency when switching tool
BUGS: 304621
FIXED-IN: 4.9.1
(cherry picked from commit a2dd088ebd)
2012-08-27 21:01:17 +02:00
Sandro Mani a2dd088ebd Fix Tools->review inconsistency when switching tool
BUGS: 304621
FIXED-IN: 4.9.1
2012-08-27 21:00:23 +02:00
Mailson Menezes 96f325896e Keep track of visible region even when not using tiles
The visible region was set in the PixmapRequest only a tiles manager was
available. Because of that the generator could check if it was supposed
to used tiles by simply checking if its normalized rect was null.
However is good to know the visible region even when a tiles manager is
not present. This way if the request is big enough to start a tiles
manager we already know the visible region and can change the
PixmapRequest accordingly.
2012-08-24 14:02:07 -03:00
Mailson Menezes 3c79206ce2 Fix bug of not showing tiles in low profile mode 2012-08-24 13:54:29 -03:00
Mailson Menezes ac40c31f0a Improve pre-rendering
Pre-render previous page only if the viewport is near the top of the
current page.
2012-08-20 00:47:33 -03:00
Mailson Menezes 1bfe8610c9 Do not evict visible tiles
Also avoid trying to evict more tiles if the tiles manager is empty (all
tiles were previously removed)
2012-08-20 00:47:33 -03:00
Tobias Koenig 8dbd83ab2a Implement support for poster image of videos in PDF documents
With this commit Okular will show a so called poster image for PDF documents
containing movie annotations. The image will be a screenshot of the first frame
of the video.

BUGS: 301603
REVIEW: 105890
FIXED-IN: 4.10.0
2012-08-19 12:23:47 +02:00
Mailson Menezes 851a503e81 Move tiles manager to a private header 2012-08-17 15:23:58 -03:00
Tobias Koenig 719a0df886 Use different RMB menus in page view and review pane
Since the review pane has different requirements than the page view, this
change introduces a mode parameter to the AnnotationPopup ctor.

REVIEW: 106045
2012-08-15 19:21:25 +02:00
Tobias Koenig 58eb957f26 Support multiple annotations in RMB menu
Provide the actions for all annotations in the RMB menu, if multiple
annotations are located on top of each other.

BUGS: 300942
REVIEW: 106035
FIXED-IN: 4.10.0
2012-08-15 17:24:11 +02:00
Mailson Menezes 3c09b93713 Merge branch 'master' into tiled-rendering
Conflicts:
	core/document.cpp
2012-08-15 11:44:22 -03:00
Mailson Menezes b33b2cffc7 Pre-render nearby tiles
Pre-render tiles that are nearby the current viewport and also the last
tiles of the previous page and the first tiles of the next page.
2012-08-10 16:04:23 -03:00
Albert Astals Cid a0339dec66 Fix crash when a drag contains the url format but doesn't contain any url data for that format
KUrl::List::canDecode( ev->mimeData() ) doesn't mean KUrl::List::fromMimeData( ev->mimeData() ) will not be empty

BUGS: 304789
FIXED-IN: 4.9.1
2012-08-08 21:08:46 +02:00
Albert Astals Cid 06ec381288 Fix crash when a drag contains the url format but doesn't contain any url data for that format
KUrl::List::canDecode( ev->mimeData() ) doesn't mean KUrl::List::fromMimeData( ev->mimeData() ) will not be empty

BUGS: 304789
FIXED-IN: 4.9.1
2012-08-08 21:07:24 +02:00
Mailson Menezes 825528e313 Request more than one tile at once 2012-07-19 00:30:03 -03:00
Mailson Menezes 9c09eb938e Use tiles only when it's necessary
In other words: don't use tiles when the page is not big enough
2012-07-16 18:19:01 -03:00
Fabio D'Urso 76b7982f57 Keep the find bar working after ESC is pressed in PageView
Instead of directly killing the search in the core, emit a signal
caught by FindBar to tell its SearchLineEdit to reset the search
operation.
In this way, SearchLineEdit can set m_changed, and next time a new
search operation will be started, instead of attempting to use the
old one.
2012-07-12 22:56:24 +02:00
Fabio D'Urso a72fbc6a8c Keep the find bar working after ESC is pressed in PageView
Instead of directly killing the search in the core, emit a signal
caught by FindBar to tell its SearchLineEdit to reset the search
operation.
In this way, SearchLineEdit can set m_changed, and next time a new
search operation will be started, instead of attempting to use the
old one.
2012-07-12 22:53:53 +02:00
Albert Astals Cid 4c94ecab23 Remove search highlights on pressing Esc
BUGS: 301960
FIXED-IN: 4.9.0
2012-07-11 22:58:14 +02:00
Albert Astals Cid 0c92af1e29 Remove search highlights on pressing Esc
BUGS: 301960
FIXED-IN: 4.9.0
2012-07-11 22:56:30 +02:00
Mailson Menezes de2ee00ff8 Improvements on tiles manager
- Made improvements on the code (not performance)
 - Fix issue of not painting dirty tiles
2012-07-11 02:14:50 -03:00
Sebastian Dörner 8ab7683ea1 Let additional mouse buttons trigger history navigation
This is consistent with a recent change in Dolphin and with what browsers have been doing for a long time.

REVIEW: 105440
DIGEST:
2012-07-10 17:45:23 +01:00
Fabio D'Urso a022d124e6 pageview: Send pixmap preload requests in order of increasing distance from the viewport
(instead of requesting everything past it till the end of the document,
and then starting to load backwards)
2012-07-10 01:12:05 +02:00
Fabio D'Urso 47e796c980 pageview: Send pixmap preload requests in order of increasing distance from the viewport
(instead of requesting everything past it till the end of the document,
and then starting to load backwards)
2012-07-10 01:02:45 +02:00
Mailson Menezes 9f3cf45e37 Rendering with a tiles manager
Currently it's only available for PDFs and does not support rotation.
2012-07-08 18:08:38 -03:00
Mailson Menezes 48d105672f Use NormalizedRect instead of VisiblePageRect on PixmapRequest 2012-07-08 15:24:20 -03:00
Mailson Menezes 740a60048a Allow zoom up to 1600%
Based on a patch by Jason Palmer
2012-06-16 15:15:06 -03:00
Mailson Menezes a405c079f4 Rendered image is at the same size of viewport
Previously we were rendering the current viewport but the image provided
by poppler was as big as the scaled page.
2012-06-09 14:39:06 -03:00
Mailson Menezes 83282971d8 Render current viewport only 2012-05-29 14:06:02 -03:00
Thomas Etter ef818392cd Use the left/right arrow keys to change the page
REVIEW: 104596
2012-05-23 00:23:36 +02:00
Fabio D'Urso 157638f2f9 Added Annotation::BeingMoved flag to avoid refreshing pixmaps while moving annotations 2012-05-17 23:50:39 +02:00
Tobias Koenig 924fc69854 Start auto-play of video when presentation view is opened
Disable auto-play feature for page view, it's not supposed to be used
there when just browsing through a document.
2012-04-11 16:50:30 +02:00
Tobias Koenig 4639ded310 Implement autostart support for movie annotations
Evaluate MovieActions to implement autostart behavior for movie annotations.

REVIEW:104271
2012-04-03 14:18:10 +02:00
Albert Astals Cid 9d805df013 Double click selects words
BUGS: 187347
FIXED-IN: 4.9,0
2012-03-25 23:48:47 +02:00
Albert Astals Cid aa893dd0d7 Do not crash on non movie annotations
Patch by Fabio D'Urso
CCMAIL: tokoe@kde.org
2012-03-14 19:02:05 +01:00
Tobias Koenig 486df96203 Make video player behave similar to Adobe Acroread
Hide the video player initially until the user has clicked on
the annotation area. This ensures that an available 'first-frame' image
is always visible. Also change the appearance of the mouse cursor when
the annotation area is entered.

REVIEW:104159
2012-03-12 17:20:51 +01:00
Parker Coates 1a96a7c797 Remember the mouse mode on exit
The default mouse mode on Okular startup is panning. I almost always
want text selection. Somebody else might prefer rectangular selection or
zooming. This patch stores the last active mouse mode in the config and
switches to it on startup.

REVIEW:104147
2012-03-09 13:31:24 -05:00
Albert Astals Cid 4d8ba36488 Add greedy preloading option
Based on a patch by Sebastian Rose <s.rose@semkath.de>
REVIEW: 103129
BUGS: 184196
2012-03-09 00:12:20 +01:00
Albert Astals Cid 5e6e54dbb0 Do not delete m_annowindows directly
If we do that slotAnnotationWindowDestroyed bites us and the list gets out of sync
2012-03-07 23:51:36 +01:00
Albert Astals Cid b2dfb910e8 Small rework of AnnotWindow
* We do not keep them around any more time than needed (they are cheap to create)
 * AnnotWindow::slotsaveWindowText calls m_document->modifyPageAnnotation so
   edition of inline notes happens immediately
2012-01-17 23:46:37 +01:00
Stephen Anthony cdc1b0c78d Several variables aren't 'const' in PageView::slotRelayoutPages when they probably should be
REVIEW: 103486
2011-12-26 00:48:03 +01:00
Stephen Anthony a6dba2434f Improve facing pages (center first page) mode when document contains only 1 or 2 pages
REVIEW: 103424
2011-12-21 01:44:33 +01:00
Albert Astals Cid ed052f4fa1 l00p -> loop :D 2011-12-13 19:52:48 +01:00
Albert Astals Cid 73ab9e8e75 make some stuff const 2011-12-13 19:52:48 +01:00