Commit graph

133 commits

Author SHA1 Message Date
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
Pino Toscano dd40052d86 old code
svn path=/trunk/playground/graphics/okular/; revision=597993
2006-10-22 09:48:31 +00:00
Tobias Koenig fccd412d69 * Added documentation to Generator API
* Moved all implementations to generator.cpp
 * Added 'const' where it make sense
 * Adapted all generators (except gs)

svn path=/trunk/playground/graphics/okular/; revision=597525
2006-10-20 16:51:46 +00:00
Albert Astals Cid 5143cd2512 Report page size
It's only reported in case it makes sense for the format
Only implemented for pdf atm
If all pages have the same size it's reported on document properties
else there's a label shown in the new bottom bar with the size of the current page

svn path=/trunk/playground/graphics/okular/; revision=595822
2006-10-15 19:37:14 +00:00
Pino Toscano c52a0e622b Change the way we rotate the pages.
Instead of telling the generators to do the work themselves (that was usually destraoying the ld pages and creating the new ones), now we just rotate the page objects deleting only their "mutable" contents.
This way, generators can just return true in their supportRotation() to make okular rotate the pages for them for free. Of course they still have to generate the page pixmaps according to the given page rotation.
Now, there's a new rotationChanged() function in the Generator API so generator that needs it can be norified about the document rotation changing.

CCMAIL: developers@okular.org

svn path=/trunk/playground/graphics/okular/; revision=593632
2006-10-08 15:07:23 +00:00
Pino Toscano 42310e184c Restructuring a bit how the text-editor-like selection works:
* putting it in an own view mode
* associating the selection to every page
* using a better algorithm to calculate the selection, even in a page range
* moving its drawing from the page view to the page painter, so it's possibile to draw it just like it's done with eg annotations

Other changes (more or less related):
* moved the annotation popup to a better place, so it won't interfere with annotation drawing
* commented some debug code in TextPage

svn path=/trunk/playground/graphics/okular/; revision=588795
2006-09-26 22:22:01 +00:00
Tobias Koenig df7d144c10 Moved all classes in core/ into the 'Okular' namespace and removed
nearly all references to kpdf (knewstuff still missing).

svn path=/trunk/playground/graphics/okular/; revision=586993
2006-09-21 08:45:36 +00:00
Tobias Koenig 4cb4c1c86b Add convenience ctor
svn path=/trunk/playground/graphics/okular/; revision=586703
2006-09-20 11:44:58 +00:00
Albert Astals Cid 4e04b301f1 Almost foget to fordwardport r582561
Fix bug 133507 that prevented the correct restoring of the document viewport on session restore for remote documents

svn path=/trunk/playground/graphics/okular/; revision=584932
2006-09-15 21:08:48 +00:00
Pino Toscano 8357b47a8c Annotations:
support the Hidden and DenyDelete flags

svn path=/trunk/playground/graphics/okular/; revision=584409
2006-09-14 18:42:28 +00:00
Tobias Koenig 5bfa5435a8 URL -> url renaming to reimplement the correct KPart::openUrl()...
svn path=/trunk/playground/graphics/okular/; revision=578859
2006-08-30 13:02:48 +00:00
Chu Xiaodong e207d0d6f4 Note&TextBox annotation remove operation enabled
svn path=/trunk/playground/graphics/okular/; revision=571630
2006-08-10 06:32:03 +00:00
Chu Xiaodong 3f81e3788f Free TextAnnotation,pop-up window and annotation properties dialog added.
svn path=/trunk/playground/graphics/okular/; revision=571124
2006-08-08 15:31:13 +00:00
Pino Toscano b6d7a36eda Small addition to the Ganarator API: bool closeDocument().
Now every generator has to implement this one and put (if necessary) all the code for cleaning up all the stuff related to the currently open document.
For now the return value it is not read, but generators as strongly suggested to return tru o false, whether all the operations in there went fine.

svn path=/trunk/playground/graphics/okular/; revision=562210
2006-07-14 10:54:29 +00:00
Pino Toscano fe1b6e750a query for a property using the right way
svn path=/trunk/playground/graphics/okular/; revision=561606
2006-07-12 17:19:26 +00:00
Pino Toscano e3825a2870 Forward port SVN commit 561026 by aacid:
finally commit patch by Mary Ellen Foster to implement wish 109078
Incidentally also implements wish 127382
Sorry for having taken so long.

svn path=/trunk/playground/graphics/okular/; revision=561300
2006-07-11 19:57:17 +00:00
Albert Astals Cid 49d26ab042 fordwardport kpdf bug #122845
svn path=/trunk/playground/graphics/okular/; revision=560203
2006-07-09 14:38:35 +00:00
Pino Toscano e40af42c63 SVN_SILENT improve a bit
svn path=/trunk/playground/graphics/okular/; revision=559498
2006-07-07 14:32:09 +00:00
Pino Toscano c0d67ae2e3 sort the plugins we have for the current file by priority (more priority ... less priority)
improve a bit the message of the generator selection dialog

svn path=/trunk/playground/graphics/okular/; revision=559497
2006-07-07 14:28:21 +00:00
Pino Toscano 12edea34f8 adapt to the new snapshot
svn path=/trunk/playground/graphics/okular/; revision=558247
2006-07-04 23:09:39 +00:00
Pino Toscano f516679bf6 raise to 30msecs the document rendering queue polling interval
svn path=/trunk/playground/graphics/okular/; revision=558102
2006-07-04 17:54:05 +00:00
Pino Toscano b3a4b27956 New skeleton for giving the generators the possibility to export the document they open in some format they support.
The text exporting option is detached from that other options and always visible (disabled if not supported), so it could be easier for the user to find it out.

svn path=/trunk/playground/graphics/okular/; revision=556922
2006-07-01 22:17:53 +00:00