Commit graph

56 commits

Author SHA1 Message Date
Tobias Koenig fd73c59b97 Adapt to new KMainWindow API
svn path=/trunk/playground/graphics/okular/; revision=635671
2007-02-20 15:48:18 +00:00
Pino Toscano d6e7010942 Refactor a bit the way we load the generator libraries: hide the hash with the Generator completely into the Document, so the Document have the complete control over them.
Add fillConfigDialog() and supportedMimeTypes() to the Document, so the Part can get all the info it needs with no need to own the generator structure.
This also loads all the generators when asking for their config widget, but that can be improved easily now; furthermore, all the generators used to load documents are kept.

svn path=/trunk/playground/graphics/okular/; revision=627909
2007-01-28 15:46:10 +00:00
Albert Astals Cid 1963e95fe6 Fix 140482 for okular too
svn path=/trunk/playground/graphics/okular/; revision=627479
2007-01-26 18:54:41 +00:00
Pino Toscano 516c69cfd6 SVN_SILENT tidy
svn path=/trunk/playground/graphics/okular/; revision=626158
2007-01-22 10:59:01 +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
Leandro Emanuel López 12862b7f46 Applied indentation. Four spaces, no tabs
svn path=/trunk/playground/graphics/okular/; revision=622791
2007-01-13 00:33:50 +00:00
Leandro Emanuel López 21c42d89c7 Don't leak memory
svn path=/trunk/playground/graphics/okular/; revision=622789
2007-01-13 00:18:44 +00:00
Leandro Emanuel López 26f4618ae3 Moved the handleCompressed method to part
svn path=/trunk/playground/graphics/okular/; revision=622784
2007-01-12 23:54:26 +00:00
Laurent Montel 34edbef72d Port to new api
svn path=/trunk/playground/graphics/okular/; revision=621624
2007-01-09 11:02:04 +00:00
Pino Toscano 20661ff61e Add an interface (implemented by the Part) for controlling the really basic document viewer functionalities. This (along with a small refactor in the okular shell) gives the user the possibility to start okular with:
-p, --page <page> : to select the startup page
      --presentation : to start directly in presentation mode
implementing also KPDF wishes #134115 and #137905.

svn path=/trunk/playground/graphics/okular/; revision=619681
2007-01-04 00:20:50 +00:00
Pino Toscano 5ce4b0674e Make okular able to copy the text selection to the clipboard (finally!).
svn path=/trunk/playground/graphics/okular/; revision=607496
2006-11-24 21:02:38 +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
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 f27f44fd79 Detach the progress widget from the minibar, and move the minibar as a small toolbar on the bottom of the page view.
Implements KPDF wish #102788.

svn path=/trunk/playground/graphics/okular/; revision=595764
2006-10-15 15:59:22 +00:00
Albert Astals Cid 0d942a0cce fordward port r595680
*******
When reloading a document because it changed still be in presentation mode after the reload
*******
and while at it make the document reloading work again

svn path=/trunk/playground/graphics/okular/; revision=595690
2006-10-15 12:26:16 +00:00
Pino Toscano 3f06c92940 remove qt3 hack and make the left toolbox collapsible again
svn path=/trunk/playground/graphics/okular/; revision=595267
2006-10-13 19:30:39 +00:00
Pino Toscano ac87494ce0 As suggested by our usability expert Florian, add a bar above the page view showing in case the document has embedded files, that can be clsed with the X button.
svn path=/trunk/playground/graphics/okular/; revision=591837
2006-10-03 10:11:16 +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
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
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
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
Pino Toscano 12e7a137d2 Port to the new snapshot.
Quite bad that menus and icons don't work...

svn path=/trunk/playground/graphics/okular/; revision=557452
2006-07-03 10:15:55 +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
Pino Toscano 598280790b New actions Prev/Next Bookmark for navigating back and forth in the bookmarked pages.
svn path=/trunk/playground/graphics/okular/; revision=554556
2006-06-24 10:56:06 +00:00
Albert Astals Cid eabbaeaead oKular is now okular
svn path=/branches/work/kde4/playground/graphics/okular/; revision=550782
2006-06-12 18:25:18 +00:00
Albert Astals Cid 703ed15db3 port to dbus, at least compiles, but i'm not sure it'll work
svn path=/branches/work/kde4/playground/graphics/okular/; revision=548432
2006-06-05 14:55:36 +00:00
Albert Astals Cid 13dde4096f use the nice code brad wrote for poppler that allows you to extract embedded files from a pdf document.
svn path=/branches/work/kde4/playground/graphics/okular/; revision=545966
2006-05-28 16:54:54 +00:00
Pino Toscano a617da1646 declare this action as it really is
svn path=/branches/work/kde4/playground/graphics/okular/; revision=541319
2006-05-15 22:18:52 +00:00
Albert Astals Cid 3a9c4de7c8 compile
svn path=/branches/work/kde4/playground/graphics/okular/; revision=538745
2006-05-08 18:57:49 +00:00
Albert Astals Cid 7ae1f13b3f when i said all linked i lied because i still had to commit that ;-)
svn path=/branches/work/kde4/playground/graphics/okular/; revision=522271
2006-03-24 22:57:41 +00:00
Pino Toscano 8b41489e2f porting
svn path=/branches/work/kde4/playground/graphics/okular/; revision=522251
2006-03-24 21:31:46 +00:00
Albert Astals Cid 6c6a1ac522 branchport r510876
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=510882
2006-02-18 12:06:52 +00:00
Piotr Szymanski 4387e1489e - GIGANTIC 2700 line diff with LOTS OF FEATURES!
- 1. editor-like text selection, and I do mean it, its not pseudo-editor 
  (like the ones acroread and kviewshell have) it doesnt intersect the 
  selection area with words under it, no, it does a lot more, including 
  work on cursors and searching for the text area closest to the given
  cursor
- 2. rotation support, change the orientation of the documents if 
  you need too :)
- 3. the kfaxview backend works beautifully, porting kviewshell backends
  is damn easy ! djvu and dvi will be next!
- 4. Hardware Blending of selection rectangles! We now use XRender 
  instead of KImageEffect, makes a damn faster blend!
- 5. Overview mode - as seen in Kviewshell, but quite a bit extended, 
  the kviewshell is only one state, while we support it in both 
  continous and non-continous form
- BTW. I coded all those features myself, (apart from kfaxview backend library)
  it is an impressive bit right? but oKular cant be run by only one person, 
  join in on the fun! i can introduce you into the code just mail niedakh@gmail.com


svn path=/trunk/playground/graphics/oKular/kpdf/; revision=509871
2006-02-15 18:54:49 +00:00
Piotr Szymanski 5e0e973e12 - add supported mimetype caching to the kpdf part properly
- begin work on ghostscript backend port to libqgs
- minor tweak in configure.in.bot 

svn path=/trunk/playground/graphics/oKular/kpdf/; revision=486447
2005-12-07 21:25:25 +00:00
Piotr Szymanski d09fd28b89 - MERGE KPDF 3.5 CHANGES
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=477586
2005-11-04 11:59:51 +00:00
Albert Astals Cid 671091cc02 renaming++
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=471470
2005-10-17 19:20:32 +00:00
Albert Astals Cid 3a09624824 some more kpdf -> oKular
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=471466
2005-10-17 19:16:31 +00:00
Piotr Szymanski 34b8e28322 - Page/Link: tooltips for links backported
- Page: rotation does not switch height and width
- Document/Part/Generator:
  1. Add API for attaching stuff to the interface: ActionCollection and the Navigation Panel
     also add possibility to merge an XML .rc file with menu layout. Relevant functions are:

     QString Generator::getXMLFile(), returns a QString with your .rc file name.
     void  Generator::setupGUI (KActionCollection* , QToolbox* ), add your components to the user interface

  2. Supporting backend settings:
     If during startup, backends which provide a configuration ([X-KDE-oKularHasInternalSettings]
     set to true) are found, a menu item: configure backends is created, clicking on it results in
     loading all the generators that have settings, but not those that dont. the Generator::addPages(KConfigDialog *dlg)
     function should be overloaded by a generator and dlg->addPage should be used to add pages.

     If a user opens a file that needs an already loaded generator, the already loaded one is used instead of loading another.

  3. Error/Warning/Notice sending support, to send a notice/error/warning, add a relevant notice/error/warning(QString& txt ,int duration)
     to the generator class, and sending a message to the user is as simple as emitting a signal!

  4. Intercepting of events generated by the PageView is done by Generator::handleEvent(QEvent*), subclass it, do a switch on QEvent::type(), handle your
     event and return true if pageview is to proceed with its handling or false if not.

  5. Support configuring the KPrinter on the generator side, use Generator::canConfigurePrinter(), return true there, and you get a nonconfigured KPrinter in your
     Generator::print()

  6. PixmapRequest handling update:
     a.) Generator::canGeneratePixmap is now Generator::canGeneratePixmap(bool async)
     b.) Document::sendGeneratorRequests is a slot now
     c.) Old way of sending pixmaps (Document::requestPixmaps(QValueList<PixmapRequest*> checking if we can generate pixmap if not, waiting for receiving)
         is replaced with: requestPixmaps only queues the pixmap all checking if w can generate is done in sendGeneratorReqest, the sendGeneratorRequest is
         run in three places:
         1.  in requestPixmaps when we receive a request
         2.  in requestDone if pixmapStack is not empty
         3.  sendGeneratorRequest, apart from removing invalid requests, takes the current request and if generator canGeratePixmap(request->async)
        it removes the pixmap from stack and sends to generator if not, QTimer::singleshots to itself after 20ms, it ends when stack has no valid pixmap request

  7. Added a commented out zoom field to PixmapGenerator, mightcome in handy sometime

- TextPage: add instructions that handle simplyfing the RegularAreaRect, no more double painted borders in selection rectangles, this rocks.


svn path=/trunk/playground/graphics/oKular/kpdf/; revision=445196
2005-08-10 16:14:39 +00:00
Piotr Szymanski 36ab5c8965 - make generators plugins by:
* moving all xpdf stuff from core and part to inside generator_pdf
   * adding abstract KPDFText class and KPDFTextEntity to hold either
     glyph, or word or textline
- support for importing PS files as pdf like on annots branch
- synced with annots branch
- abstract text layer with search for words in different lines
- added RegularArea<NormalizedShape,Shape> template class
  which inherits QValueList<NormalizedShape*> and is used
  to hold regular areas of given shape (finite collections of the shape)
- loading of relevant generators via ktrader for given mimetype
- the deliverables 1 and 2 of my SoC proposition are delivered
  next: 1. fix one spotted regression and 2. code ghostview backend


svn path=/trunk/playground/graphics/oKular/kpdf/; revision=434883
2005-07-15 18:20:57 +00:00
Enrico Ros 60463481c5 applying patch_113 (tinyurl.com/8t5ec)
svn path=/branches/kpdf/annotations/kdegraphics/kpdf/; revision=428591
2005-06-24 16:42:44 +00:00
Enrico Ros 027d040c6c applying patch_040,041 (of: tinyurl.com/8t5ec)
svn path=/branches/kpdf/annotations/kdegraphics/kpdf/; revision=428587
2005-06-24 16:39:57 +00:00
Enrico Ros 5fa94e1643 merging patch_080,085
svn path=/branches/kpdf/annotations/kdegraphics/kpdf/; revision=425031
2005-06-13 17:39:58 +00:00
Enrico Ros 7b6b7a359d KPDF HotNewStuff Browser!
It's not yet complete (file dowload and internal notifies are missing) but
the new stuff browser is running. The ui is modeled on an Aaron's mockup.

NewStuff:
  Fetches the providers list (kpdf.kde.org/newstuff/providers.xml), lets
  the user select a provider and displays provider's contents in a KHMTL
  part (for flexibility and eye candy).
  Internally we use KNS' Entry and Provider structures only, doing all the
  transfer operations by hand via KIO::get jobs. Download will be done
  internally too (to give better consistancy in the interface).
  Network timeouts, problems or info messages are notified in a statusbar-
  like widget and we try to keep all information in the dialog, without
  using messageBoxes

Part:
  Added the action and the dialog invocation

Makefiles:
  Link the KNEWSTUFF and KHTML libraries.

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=405828
2005-04-16 00:25:26 +00:00
Enrico Ros 659ae73bc8 Fixed crash when exiting with kapp->quit(). Usually the Settings singleton
is deleted after all classes, but when kpdf is run stand-alone and quit()
is used (currently only by clicking on Quit links) the app could crash.
-> Best practice: don't use KConfigXT settings classes for storing values
on destructors (do it when a parameter is updated).
CCMAIL: Mikolaj Machowski <mikmach@wp.pl>

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=403765
2005-04-07 12:47:24 +00:00
Enrico Ros e5ed6251a6 Implemented PDF:FullScreen and Close action to KPDF 'Presentation' and
'EndPresentation' actions. Based on testcase by Mikolaj.

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=403726
2005-04-07 09:53:15 +00:00
Jakub Stachowski 664d441534 Added action for showing/hiding left panel and removed it from settings.
"Watch file" moved to settings dialog.
BUG: 99316

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=396976
2005-03-12 15:39:04 +00:00
Enrico Ros c4ecddd149 Fixing the "can't hide left panel" bug.
svn path=/trunk/kdegraphics/kpdf/; revision=388679
2005-02-12 14:34:12 +00:00
Enrico Ros 9e73b4235e Fixed type-ahead searches. Reworked search code. Found alternative way to
setRasterOp. Cleaned up RenningSearch class. Performance fix on actions.

svn path=/trunk/kdegraphics/kpdf/; revision=385447
2005-02-02 18:18:26 +00:00
Enrico Ros d1e074058b cleanups and scroll api
svn path=/trunk/kdegraphics/kpdf/; revision=385040
2005-02-01 18:23:55 +00:00
Tobias Koenig 0cc0b192cd Don't open multiple presentation widgets when slotShowPresentation() is called
multiple times (e.g. when the watched PDF has changed)

svn path=/trunk/kdegraphics/kpdf/; revision=383178
2005-01-28 11:04:03 +00:00