Commit graph

126 commits

Author SHA1 Message Date
Pino Toscano
5e0c1a1671 hm, we always need to 'transform' all the annotations, so the internal data are (re)set correctly
svn path=/trunk/KDE/kdegraphics/okular/; revision=722543
2007-10-07 15:10:58 +00:00
Pino Toscano
b321f9ea21 when adding a rotated annotation to a rotated page, rotate its base coordinates to 0-degrees, then rotate again all its stuff correctly
svn path=/trunk/KDE/kdegraphics/okular/; revision=722456
2007-10-07 11:00:57 +00:00
Pino Toscano
99a99a1590 instead of just keeping the transformation matrix, add the pointer to the owning page in a text page, so a text page can know more information, and with no need to manually be updated by the page
svn path=/trunk/KDE/kdegraphics/okular/; revision=708443
2007-09-04 22:37:39 +00:00
Pino Toscano
bf9af4433d move deleteTextSelections() to the private class
svn path=/trunk/KDE/kdegraphics/okular/; revision=708155
2007-09-03 23:47:12 +00:00
Pino Toscano
d81d4aedd9 small api fixup ('const QContainer' it's pointless as return value)
svn path=/trunk/KDE/kdegraphics/okular/; revision=708147
2007-09-03 23:01:57 +00:00
Pino Toscano
351f66a9b4 remove TextPage::transform() from the public API, and make the Page change the TextPage transformation easily
svn path=/trunk/KDE/kdegraphics/okular/; revision=708085
2007-09-03 19:58:30 +00:00
Pino Toscano
d66f6b8f4a better check before starting searching on a NULL text page...
svn path=/trunk/KDE/kdegraphics/okular/; revision=708081
2007-09-03 19:38:46 +00:00
Pino Toscano
9a1b575ac0 properly rotate/transform the text page and the highlight areas
svn path=/trunk/KDE/kdegraphics/okular/; revision=708054
2007-09-03 18:32:07 +00:00
Pino Toscano
b480fc0670 do nothing if we have no form fields for a page, but form saved data for it are there anyway
svn path=/trunk/KDE/kdegraphics/okular/; revision=705035
2007-08-26 23:31:01 +00:00
Pino Toscano
35a51a9d06 stupid me, don't increment the end() iterator ;(
also, check that the index in the local save file refers to an existent form field

svn path=/trunk/KDE/kdegraphics/okular/; revision=705003
2007-08-26 20:55:56 +00:00
Albert Astals Cid
41c25cb208 Back from holiday, let's do some comitting :-)
* Update some copyright years and mail addresses
 * Search does not block the GUI anymore YUHUUUUU
   Well, it it does but it's almost unperceptible, that means the searching methods of Document no longer return a bool but a void and the Document::searchFinished signal is used to know if something was found, nothing was found or the user pressed the cancel button !YES! one can cancel search now :-)
 * TextPage no longer holds the area and the current transformed area, it took TOO MUCH memory, now we transform the area each time, it's much more CPU intensive but i could not measure a time loss while searching big documents and i could measure HUNDREDS of MB of usage less.
 * MICRO optimization: Change some code to not detach some containers
 * I still don't have ADSL so this is something like a "blind" commit, Pino will check it compiles against current KDE, not against what's on my computers

svn path=/trunk/KDE/kdegraphics/okular/; revision=699701
2007-08-13 22:25:27 +00:00
Pino Toscano
5150419e81 adapt the debug stuff to the new kdebug way:
- make the output looking more or less like before (using nospace() or removing the spaces)
- remove endl and '\n' at the end of debug outputs
- fixing the QDebug operator<<'s around
- isolate the debug area number of the core into a separate header, and apply it instead of the numbers found in textpage.cpp

svn path=/trunk/KDE/kdegraphics/okular/; revision=694667
2007-07-31 10:19:48 +00:00
Pino Toscano
ba765a3b69 give the right parent page to the annotations also when restoring them from xml
svn path=/trunk/KDE/kdegraphics/okular/; revision=689162
2007-07-17 20:04:30 +00:00
Pino Toscano
b41dcfeddc - store a pointer of the owning page in each annotation
- preliminary API for translating an annotation

svn path=/trunk/KDE/kdegraphics/okular/; revision=689133
2007-07-17 18:10:25 +00:00
Albert Astals Cid
2437917e47 Do not start numberOfPagesWithPixmaps threads because that brings the system down, just start what threadweaver thinks its best
Probably still have to tell the weaver how to optimize for memory consumption but it's an improvement anyways

svn path=/trunk/KDE/kdegraphics/okular/; revision=683383
2007-07-04 16:55:33 +00:00
Albert Astals Cid
723c3a482a move rotationjob.h to rotationjob_p.h
svn path=/trunk/KDE/kdegraphics/okular/; revision=683286
2007-07-04 14:39:52 +00:00
Pino Toscano
3ce672f586 Albert fixed poppler, now I can activate the form saving
svn path=/trunk/KDE/kdegraphics/okular/; revision=683267
2007-07-04 14:04:01 +00:00
Pino Toscano
fa6b376626 Add the possibility to remember the contents of form fields when closing a document, and to restore them when reopening the document.
For now it's disabled, as I want to investigate a bit more with poppler wrt text fields, and to verify if that is an acceptable behaviour.

svn path=/trunk/KDE/kdegraphics/okular/; revision=683212
2007-07-04 11:41:45 +00:00
Pino Toscano
6256757e2b make the Page really take ownership of the text selection set to it, thus deleting it as the HighlightAreaRect "clones" the passed rect
svn path=/trunk/KDE/kdegraphics/okular/; revision=673084
2007-06-08 23:06:04 +00:00
Pino Toscano
48d0f95745 delete the previous action when setting a new one
svn path=/trunk/KDE/kdegraphics/okular/; revision=661489
2007-05-05 18:22:26 +00:00
Pino Toscano
325b8711ea move the setTextSelections, setHighlight and deleteHighlights to the private class of Page, as they are private for now
svn path=/trunk/KDE/kdegraphics/okular/; revision=661486
2007-05-05 18:07:34 +00:00
Pino Toscano
e79cd474d9 move the Page rotating and changing page functions to the private class
svn path=/trunk/KDE/kdegraphics/okular/; revision=660214
2007-05-01 23:36:57 +00:00
Pino Toscano
5f21b15d99 Link -> Action renaming.
Step #2: Link -> Action for the action hierarchy, and for the ObjectRect type.

svn path=/trunk/KDE/kdegraphics/okular/; revision=656140
2007-04-20 12:37:12 +00:00
Pino Toscano
f3e484082d Link -> Action renaming.
Step #1: link.(cpp|h) -> action.(cpp|h)

svn path=/trunk/KDE/kdegraphics/okular/; revision=656123
2007-04-20 11:26:05 +00:00
Albert Astals Cid
0d47b62715 krazy include order issues
svn path=/trunk/KDE/kdegraphics/okular/; revision=655893
2007-04-19 18:30:20 +00:00
Pino Toscano
3f84c8ccad move modifyAnnotation to the private class
svn path=/trunk/KDE/kdegraphics/okular/; revision=655132
2007-04-17 19:55:18 +00:00
Pino Toscano
acd19bc8f7 move the Page serialization functions to the private class, and make Document access to them
svn path=/trunk/KDE/kdegraphics/okular/; revision=653988
2007-04-14 19:58:17 +00:00
Pino Toscano
5deae607aa do time profiling only when needed
svn path=/trunk/playground/graphics/okular/; revision=648103
2007-03-30 14:27:22 +00:00
Pino Toscano
95bb597a85 hide the text selection inside the private class of Page
svn path=/trunk/playground/graphics/okular/; revision=648095
2007-03-30 14:08:20 +00:00
Pino Toscano
229f3cf1de add a private function for the nearest Page pixmap, for the PagePainter usage;
this way, the pixmap structure can be finally hidden in the private class

svn path=/trunk/playground/graphics/okular/; revision=646502
2007-03-25 22:36:41 +00:00
Pino Toscano
36b894c75a Create a (private) PageController that handles the rotation jobs from all the pages.
This removes the needs for Page to be a QObject (it's the PageController that connects to the jobs and emits the right signals), so it again a "cheap" object.

svn path=/trunk/playground/graphics/okular/; revision=646010
2007-03-24 10:47:22 +00:00
Pino Toscano
a67410f74f move the private class of Page in an own private header
svn path=/trunk/playground/graphics/okular/; revision=645963
2007-03-24 00:18:54 +00:00
Pino Toscano
bc8036dc62 they are constant methods, so let them be 'const'
svn path=/trunk/playground/graphics/okular/; revision=641248
2007-03-10 17:25:14 +00:00
Pino Toscano
db8a10dc2c Preliminary supports for text and choice form fields.
This includes:
- the interfaces for the generators
- the basic widgets for editing their value
- a top bar for show/hide the forms of a document
- the implementation of the forms for the PDF backend
still nothing that can be done with them, nor the value of the forms can be saved...
... but it's a start! :-)

svn path=/trunk/playground/graphics/okular/; revision=637001
2007-02-25 00:07:59 +00:00
Pino Toscano
1d27a90fd3 a slightly better usage of the Qt containers, saving also some lookups when using the QMap's
svn path=/trunk/playground/graphics/okular/; revision=632853
2007-02-12 14:15:51 +00:00
Pino Toscano
dd6ddee116 tokoe does not know that Page::text() and TextPage::text() have different functions ;)
fixing a crash when getting the whole text of a page

svn path=/trunk/playground/graphics/okular/; revision=628802
2007-01-31 14:29:28 +00:00
Pino Toscano
e59275b54a don't look twice, iterator is better
svn path=/trunk/playground/graphics/okular/; revision=627946
2007-01-28 17:28:28 +00:00
Pino Toscano
10a6e3943e SVN_SILENT small #include cleanup
svn path=/trunk/playground/graphics/okular/; revision=627931
2007-01-28 16:47:13 +00:00
Pino Toscano
9cda7888d9 small api fix
svn path=/trunk/playground/graphics/okular/; revision=625715
2007-01-20 22:04:10 +00:00
Pino Toscano
b163e04115 Support for labelling the pages, and for displaying the page label (if any) in the table of contents side pane.
svn path=/trunk/playground/graphics/okular/; revision=625312
2007-01-19 23:30:32 +00:00
Pino Toscano
1b49db09d5 be sure to delete the old pixmap before setting a new one
svn path=/trunk/playground/graphics/okular/; revision=621863
2007-01-09 23:37:26 +00:00
Pino Toscano
5636ac551f don't leak memory when loading page actions from poppler, and sound objects
svn path=/trunk/playground/graphics/okular/; revision=620533
2007-01-06 14:25:33 +00:00
Pino Toscano
18fab3d130 Improve the way we deal with generators that give the possibility to change the size of the pages: instead of let them destroy and recreate the pages (bad), ask them the sizes they support, then do the work ourselves and notify the generator when the work is done.
While I was at it, I changed from "paper size" to "page size", it should be better.

svn path=/trunk/playground/graphics/okular/; revision=620411
2007-01-05 23:12:06 +00:00
Pino Toscano
4b922367e2 Use a proper enum to deal with orientation/rotation all around okular.
svn path=/trunk/playground/graphics/okular/; revision=620312
2007-01-05 17:09:47 +00:00
Tobias Koenig
42614623e8 Rotate the highlights correctly
svn path=/trunk/playground/graphics/okular/; revision=620273
2007-01-05 15:16:36 +00:00
Pino Toscano
bd14706edb leak a bit less memory
svn path=/trunk/playground/graphics/okular/; revision=619558
2007-01-03 17:57:03 +00:00
Tobias Koenig
ea51ee18f5 Do a lot of include cleanups... we install all important
header files now

svn path=/trunk/playground/graphics/okular/; revision=619492
2007-01-03 14:30:48 +00:00
Tobias Koenig
86a1fd3b69 Big cleanup of Document API and documentation:
* add full API docs
 * renamed getMetaData -> metaData
 * removed supportsRotation in Document and Generator
 * moved Permission and SearchDirection enums into separated header core/global.h

svn path=/trunk/playground/graphics/okular/; revision=619183
2007-01-02 22:37:55 +00:00
Tobias Koenig
14ea3ab2ef Further documentation and API cleanups
svn path=/trunk/playground/graphics/okular/; revision=619054
2007-01-02 17:05:49 +00:00
Pino Toscano
c51c412057 ok, let's sdo it seriously now: use the right precision for the page duration that a PDF can give us
svn path=/trunk/playground/graphics/okular/; revision=618194
2006-12-31 14:41:34 +00:00