Commit graph

179 commits

Author SHA1 Message Date
Albert Astals Cid 2ca1779feb Add a way to get the PagePrivate if you have the Page 2017-03-03 00:32:08 +01:00
Martin T. H. Sandsmark f05d42eac3 core: Fix build without implicit cast to/from ascii
See previous commits for details.
2016-07-11 22:07:57 +02:00
Montel Laurent 466eb79615 Use QStringLiteral 2015-10-29 13:37:11 +01:00
Frederik Gladhorn 6c602bf0e7 Use categorized logging even more 2014-09-16 23:38:25 +02:00
Frederik Gladhorn 9d89739972 Use categorized logging 2014-09-16 23:24:36 +02:00
Frederik Gladhorn 83d3f1f6b7 Revert "Some more kDebug->qDebug"
Seems like kDebug doesn't spam the user, so this needs to use qCDebug.

This reverts commit 34fbdf8c85.
2014-09-11 02:03:46 +02:00
Frederik Gladhorn 34fbdf8c85 Some more kDebug->qDebug 2014-09-09 18:17:36 +02:00
Michal Humpula c07ee043a3 Multiple Tiles Managers per Page
It's straighforward implementation. Every single place, where there were call for (or with) TilesManager, now has a DocumentObserver as companion. The m_tiledManager reference in PagePrivate was changed to QMap<DocumentObserver, TilesManager>.

REVIEW: 113986
2014-02-19 23:41:22 +01:00
Jon Mease 43246c563b Viewport transition refinements for Find and Undo/Redo actions
REVIEW: 114060

This patch introduces viewport transitions for undo/redo actions on annotations and forms.  When an annotation/form action is undone/redone but the associated annotation/form is not currently visible, the viewport is updated to center on the undo/redo action. If the annotation/form is visible, the viewport is not updated.

The viewport transitions for the Find action have also been updated to this same algorithm.  Previously the viewport was moved to center on each matching search term even if the search term was already visible in the viewport. This lead to unnecessary viewport transitions if the search term matched several items in a single paragraph for example.

These proposed changes to the viewport transition behavior are consistent with the find and undo behavior of many existing applications including Kate, Open Office, and Foxit PDF Reader.
2013-12-29 23:27:30 +01:00
Fabio D'Urso a556126816 Fix the issue exposed by the previous patch
The patch de-singletons the PageController class.

The PageController is now per-document and it gets deleted when the
document is closed.

As consequence of this, the RotationJob's done signal will not be
delivered if the document has been closed, and thus this fixes the
crash.
2013-07-30 20:40:40 +02:00
Fabio D'Urso 3c65f81fb9 Prefer annotations in the foreground in Page::objectRect 2013-07-01 22:06:46 +02:00
Peter Grasch 4d4dd68ca2 Fix usability issues with selecting annotations
REVIEW: 109627
2013-06-23 19:22:21 +02:00
Jon Mease 3c6140b616 Fix Undo / Redo of annotation creation doesn't properly handle page rotation and adds undo unit tests
BUG: 318091
REVIEW: 109989
2013-04-13 22:54:47 +02:00
Jon Mease 78faf1e68f Add undo/redo support for annotations
REVIEW: 107442
2013-04-06 00:22:48 +02: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
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
Fabio D'Urso d3eb739814 Merged TilesManager::setWidth and setHeight into a single setSize method 2012-11-11 21:39:23 +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
Jan Binder aa6ed8afc0 Replace deprecated QMatrix by QTransform
REVIEW: 105737
2012-09-08 17:06:02 +02:00
Mailson Menezes 0053b9c015 Remove unused property from PixmapObject
This property was added before the tiles manager was created.
2012-08-24 14:02:07 -03:00
Mailson Menezes 2d5b51ff88 Fix crash when changing between memory profiles 2012-08-24 14:01:54 -03:00
Mailson Menezes 851a503e81 Move tiles manager to a private header 2012-08-17 15:23:58 -03:00
Mailson Menezes 401c3f7e5d Add rotation support to tiles manager 2012-08-17 14:30:53 -03: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 032f03a0e8 Track memory usage of tiles 2012-07-16 18:19:02 -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
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
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
Fabio D'Urso 86c92ffec2 Fixes against causes of annotation data loss + Improved GUI message logic
1) If the user had previously annotated the document with an old okular
version and the document contains existing annotations and no /Encrypt
(ie the case where annotation changes are no longer saved locally), make
Document::saveDocumentInfo write the original unmodified local
annotations back to XML, so that it seems that the original file was not
changed. If the user makes annotation changes, code from previous
patches already asks him to save them to a different document on close.

2) Ask "Save changes?" if the user has modified annotations in a .okular
archive.
BUG: 300197

3) Turned a "sorry" message in a "information" (with dontshowthisagain),
because now we also have the "Save changes?" prompt to inform the user.

4) Suppressed all annotation-related message boxes on document opening
2012-06-05 00:49:01 +02:00
Mailson Menezes 83282971d8 Render current viewport only 2012-05-29 14:06:02 -03:00
Fabio D'Urso 6c296b916b Use UUIDs intead of a (broken) counter to generate annotations' unique names
The previous counter-based approach didn't take into account existing names used
by external annotations and names used in other pages.
Instead of creating a document-global table of used names, I used random UUIDs
as a source of unique names.
2012-05-17 23:50:20 +02:00
Fabio D'Urso 249bea5985 Re-add restored annotations via Document so that AnnotationProxy gets notified
Previously, restored annotations followed a shorter path that bypassed AnnotationProxy
2012-05-17 23:50:14 +02:00
Fabio D'Urso ec9f068d77 Added AnnotationProxy to SaveInterface
Based on Pino Toscano's earlier work
2012-05-17 23:49:58 +02:00
Fabio D'Urso 07c57bb2ab Dead code removed (PagePrivate::modifyAnnotation)
The first if ("modified already") is always taken
2012-05-17 23:49:54 +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
Jiri Baum 412e3e739e table selection tool - semi-automatic dividers
BUGS: 283440
REVIEW: 102788
2011-10-31 16:33:03 +01:00
Albert Astals Cid d41f230123 Move correctTextOrder to TextPagePrivate 2011-10-17 19:09:26 +02:00
Mohammad Mahfuzur Rahman Mamun dca4ee559c Another Code Refactoring done 2011-08-21 10:44:42 +06:00
Mohammad Mahfuzur Rahman Mamun 1b8e1fc436 all files other than textpage.cpp has been changed necessarily 2011-08-17 10:59:10 +06:00
Mohammad Mahfuzur Rahman Mamun 3214307ed9 unnecessary changes removed from area.h and cpp textpage.h textpage_p.h 2011-08-17 10:45:46 +06:00
Mohammad Mahfuzur Rahman Mamun 929e4b6a0e Removed some double selection Problem 2011-08-12 08:25:21 +06:00
Mohammad Mahfuzur Rahman Mamun a2be8384c5 A little change for crash if there is no textPage but, yet correctTextOrder() is called 2011-07-22 15:07:13 +06:00
Mohammad Mahfuzur Rahman Mamun 4c4f6c1c7c text selection code moved to Page::setTextPage from Document::requestTextPage 2011-07-20 22:15:41 +06:00
Pino Toscano 40d20ca58d in each page, add a pointer to the owner document
svn path=/trunk/KDE/kdegraphics/okular/; revision=1217914
2011-01-29 15:38:18 +00:00
Albert Astals Cid 8f045d06a7 add a text() function that returns characters not containing any pixel inside the given area but the center pixel of the char rectangle
svn path=/trunk/KDE/kdegraphics/okular/; revision=1048193
2009-11-12 21:48:43 +00:00
Pino Toscano 6d0241e5d2 add functions to get the nearest object rect to a point in a page, and return its distance, and the accessor functions for object rects
based on an patch by Luigi Toscano, thanks!
CCMAIL: luigi.toscano@tiscali.it

svn path=/trunk/KDE/kdegraphics/okular/; revision=943099
2009-03-23 12:05:00 +00:00
Pino Toscano a5252a9115 add flags to selectively choose the page parts to serialize
svn path=/trunk/KDE/kdegraphics/okular/; revision=884438
2008-11-14 23:38:02 +00:00