Commit graph

154 commits

Author SHA1 Message Date
Pino Toscano
7d15f12fe0 - don't reset the pixmap memory descriptors when rotating, as the pixmaps are rotated thus the memory is preserved
- no need to notify about clearing annotations when changing page size

svn path=/trunk/playground/graphics/okular/; revision=624743
2007-01-17 23:06:40 +00:00
Pino Toscano
4f6666d509 also the page size is a feature, so thread it as such (and remove supportsPageSizes())
svn path=/trunk/playground/graphics/okular/; revision=624686
2007-01-17 18:02:53 +00:00
Tobias Koenig
5069b62a80 Make PixmapRequest::swap() public but mark it for internal usage.
svn path=/trunk/playground/graphics/okular/; revision=624665
2007-01-17 16:50:54 +00:00
Pino Toscano
e0e8803092 A bit ugly hack to make it compile better.
BUG: 140189

Tobias, any better solution than the previous situation?
CCMAIL: tokoe@kde.org

svn path=/trunk/playground/graphics/okular/; revision=624631
2007-01-17 14:20:00 +00:00
Pino Toscano
135a18b407 get rid of supportsSearching() by using a proper feature
svn path=/trunk/playground/graphics/okular/; revision=624587
2007-01-17 11:58:20 +00:00
Pino Toscano
8a7c2ad654 As requested by our usability expert Florian, add a Bookmarks menu with the bookmarks in the current document, if any.
svn path=/trunk/playground/graphics/okular/; revision=622995
2007-01-13 17:28:54 +00:00
Pino Toscano
afc18f9d97 Re-add the possibility to toggle a page bookmark quickly (ie with the popup menu).
svn path=/trunk/playground/graphics/okular/; revision=622945
2007-01-13 14:45:51 +00:00
Pino Toscano
91b7675c14 configurationWidget() is too generic -> rename to printConfigurationWidget()
svn path=/trunk/playground/graphics/okular/; revision=622782
2007-01-12 23:48:29 +00:00
Pino Toscano
24ec1e37c5 Add the ability to read from standard input, eg
$ command_that_produce_a_document | okular -
Expand a but the Generator API so a generator can directly read from the raw data read from stdin. Generators that can not read from raw data will open the temporary file with the saved data.

svn path=/trunk/playground/graphics/okular/; revision=622774
2007-01-12 22:49:14 +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
Pino Toscano
64769a62ce let the Document forward the BookmarkManager signal
svn path=/trunk/playground/graphics/okular/; revision=620158
2007-01-05 12:51:58 +00:00
Pino Toscano
81694d6a83 donìt leak in the google-like searches
svn path=/trunk/playground/graphics/okular/; revision=619924
2007-01-04 18:59:31 +00:00
Pino Toscano
9f8ea8b546 don't leak when doing AllDocument/FindNext searches
svn path=/trunk/playground/graphics/okular/; revision=619897
2007-01-04 18:13:00 +00:00
Pino Toscano
4aa85cdb49 One single char remove to create correctly the queue of pixmap requests: new asynchronous requests goes as last one in the group of other with the same priority.
Thus, if an observer requests eg pixmap for pages 2 and 3, now they are generated in the correct order the observer specified, and not in the reversed one.
Then, revert part of r619673, as the order is fixed now.

svn path=/trunk/playground/graphics/okular/; revision=619810
2007-01-04 14:28:54 +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
77efd7dcb1 Cleaned up the Document API, moved all private members/methods/slots into
the d class.

svn path=/trunk/playground/graphics/okular/; revision=619100
2007-01-02 19:05:49 +00:00
Tobias Koenig
2aa8a4c31b Moved SourceReference into its own file
svn path=/trunk/playground/graphics/okular/; revision=619076
2007-01-02 17:45:32 +00:00
Pino Toscano
915a48eb4d move the Generator configuration stuff into a new ConfigInterface
svn path=/trunk/playground/graphics/okular/; revision=619061
2007-01-02 17:14:37 +00:00
Pino Toscano
d9a844d67c move the GUI stuff out of Generator in an own GuiInterface, and adapt the ghostscript generator to its usage; renamed also some methods to more Qt4-ish names.
svn path=/trunk/playground/graphics/okular/; revision=619044
2007-01-02 16:40:22 +00:00
Pino Toscano
475d000763 Improve the way a Generator can configure a printer: add an interface with the advanced printing stuff.
The print() method remains in Generator, as it's too basic to be moved in an interface.

svn path=/trunk/playground/graphics/okular/; revision=619033
2007-01-02 16:11:40 +00:00
Pino Toscano
539921bdf6 Improving the bookmark capabilities of okular.
Adding a BookmarkManager class that takes care of handling them in a proper way.
Adding a new tab in the sidebar to manage them:
- shows all the bookmarks in all the documents, or just in the current document
- cliking on a bookmark will bring to that bookmark, loading the document if necessary
- editing a bookmark title is possible either using F2 or right click -> Rename
- right click -> Remove to remove a bookmark
The only way to add new bookmark for the moment is the "old" way, ie right click -> Add bookmark, and it's not possible add more than one bookmark per page (but the system does not limit that).
The whole system should not be too difficult to understand, I will check with our usability master Florian next days.

svn path=/trunk/playground/graphics/okular/; revision=616979
2006-12-27 16:04:49 +00:00
André Wöbbeking
6e7d98b829 adapt to Aaron's kdelibs changes
svn path=/trunk/playground/graphics/okular/; revision=616901
2006-12-27 10:03:34 +00:00
Pino Toscano
b7328d7234 add an handy DocumentViewport::isValid() and use it where possible instead of doing checks manually
svn path=/trunk/playground/graphics/okular/; revision=616667
2006-12-26 12:26:49 +00:00
Pino Toscano
dff36b98f8 simplify RegularAreaRect by avoiding the usage of pointers, as they don't give benefits anyway.
Fixing also the text extraction when using the rectangular selection across two or more pages.

svn path=/trunk/playground/graphics/okular/; revision=616264
2006-12-24 18:19:18 +00:00
Tobias Koenig
9969547b0c * observer API cleanup
* removed NotifyRequest, that looked more like a hack than a solution
  (see comment in ghostscript generator)

svn path=/trunk/playground/graphics/okular/; revision=608235
2006-11-27 08:12:39 +00:00
Tobias Koenig
81fb3a383b Further cleanup of Page API:
* getAnnotations() -> annotations()
  * setBookmark()/hasBookmark() -> setBookmarked()/isBookmarked()
  * moved as much private API of Page as possible to private class

svn path=/trunk/playground/graphics/okular/; revision=607233
2006-11-23 19:25:52 +00:00
Tobias Koenig
14d6515b16 Changed the enum SearchDir to SearchDirection and use less strange
abbreviations for its items.

Replaced the 'bool strictCase' parameter of Page::findText
with 'Qt::CaseSensitivity caseSensitivity' for better readable code.


svn path=/trunk/playground/graphics/okular/; revision=607203
2006-11-23 16:54:28 +00:00
Tobias Koenig
a844f01f0e SVN_SILENT warning--
svn path=/trunk/playground/graphics/okular/; revision=607196
2006-11-23 16:12:07 +00:00
Tobias Koenig
a7b04cb92b Replaced
Page::setSearchPage( TextPage* );
  Page::hasSearchPage();

with

  Page::setTextPage( TextPage* );
  Page::hasTextPage();

to make the API clearer. The TextPage is not only used for
searching but also for extracting selected text, so the term
'search' is confusing...


svn path=/trunk/playground/graphics/okular/; revision=607195
2006-11-23 16:09:26 +00:00
Albert Astals Cid
b10d00e4ae virtual filesystems always return true for at end, so the memory was not beign correctly calculated
svn path=/trunk/playground/graphics/okular/; revision=606586
2006-11-20 22:52:28 +00:00
Albert Astals Cid
7dacbf93fd use the constant accessors so that we don't get dettach on the containers we don't want to get
svn path=/trunk/playground/graphics/okular/; revision=606560
2006-11-20 20:28:02 +00:00
Albert Astals Cid
ac1c0b75bc const_iterator is your friend :-)
svn path=/trunk/playground/graphics/okular/; revision=606558
2006-11-20 20:10:42 +00:00
Tobias Koenig
a490cc0cd7 Add the following functionality:
* Bring QPixmap* back to make Albert happy ;)
 * Store only one QPixmap per page/size and rotate it directly
 * Rotate ObjectRects (boundary)
 * Rotate Annotations (point coordinates)
 * Don't reload pixmaps, ObjectRects and annotations on rotation

svn path=/trunk/playground/graphics/okular/; revision=606371
2006-11-20 07:53:32 +00:00
Albert Astals Cid
9099fbecf7 Some krazy fixes
svn path=/trunk/playground/graphics/okular/; revision=605992
2006-11-18 21:36:56 +00:00
Pino Toscano
2cbf32906d check that the target file exists
svn path=/trunk/playground/graphics/okular/; revision=605906
2006-11-18 15:16:16 +00:00
Pino Toscano
274469dae8 Almost complete support for inverse search within okular.
THe system generally works; what is missing is a good activating strategy (added in TODO - our usability expert is working on that), and a GUI to configure the editor.
The DVI backend was adapted to use this new feature.
(The PDF backend will use it soon.)

svn path=/trunk/playground/graphics/okular/; revision=605708
2006-11-17 22:15:15 +00:00
Tobias Koenig
1479a6d28c Small speed up patch, caches the value of getFreeMemory for 2 seconds,
that reduces the access of /proc/meminfo.

svn path=/trunk/playground/graphics/okular/; revision=605189
2006-11-15 19:39:39 +00:00
Pino Toscano
2d99ab2588 no need to create it on the heap
svn path=/trunk/playground/graphics/okular/; revision=603974
2006-11-11 00:08:35 +00:00
Pino Toscano
56e1266ae5 move initializers to the d-ptr ctor
svn path=/trunk/playground/graphics/okular/; revision=603972
2006-11-10 23:52:02 +00:00
Tobias Koenig
bea71df6e0 * Made image rotation asynchronous
* Changed Page API and PagePainter to work only with QImage

svn path=/trunk/playground/graphics/okular/; revision=601581
2006-11-03 17:57:32 +00:00
Pino Toscano
1285f20c21 be able to remove more than one annotation at once (and notify the observers only one)
svn path=/trunk/playground/graphics/okular/; revision=600979
2006-11-01 15:17:22 +00:00
Pino Toscano
2bd05e79d5 a generator can not block the gui events of the main page view, otherwise bad things will happen - it's also not really logic to allow such a thing, better think about something else if a generator wants to interact with the gui somehow
svn path=/trunk/playground/graphics/okular/; revision=600225
2006-10-29 22:33:24 +00:00
Pino Toscano
8def2109ec change the metaData() function of the Generator to use QVariant as type for the returned value and for the 'option' parameter, this gives more flexibility
svn path=/trunk/playground/graphics/okular/; revision=599847
2006-10-28 19:18:36 +00:00
Albert Astals Cid
54ad65e92f }; -> }
svn path=/trunk/playground/graphics/okular/; revision=599084
2006-10-25 17:29:24 +00:00
Tobias Koenig
d22b2f1892 A rather big change:
* Hide as much private API as possible in Generator, PixmapRequest and ExportEntry/Format
 * Renamed ExportEntry to ExportFormat and made it value based
 * Removed canExportToText() and exportToText() from Generator API and implemented this
   functionality in exportFormats()/exportTo() in the generators
 * Removed the orientation parameter from PixmapRequest and let the Document handle the rotation
   of the page (pixmap) instead

CCMAIL:okular-devel@kde.org

svn path=/trunk/playground/graphics/okular/; revision=599058
2006-10-25 15:35:53 +00:00
Pino Toscano
4c0808fabf a bit less of #include's
svn path=/trunk/playground/graphics/okular/; revision=598229
2006-10-22 23:00:39 +00:00
Pino Toscano
18028a8a2c API change in the Generator: use an empty construct, and set the document for the generator right after its construction.
Add a protected method to get the document, and hide the real document pointer as private, so the generators can't redefine it.

svn path=/trunk/playground/graphics/okular/; revision=598025
2006-10-22 11:25:08 +00:00
Pino Toscano
0381a0410e simplify
svn path=/trunk/playground/graphics/okular/; revision=597994
2006-10-22 10:09:38 +00:00