Commit graph

176 commits

Author SHA1 Message Date
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 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 066beaa1dd small changes in the Generator API:
- no need for a private empty constructor
- move the signalRequestDone 'signal' to a protected visibility, as it's not meant to be called from outside a generator
- KPDF_EXPORT_PLUGIN -> OKULAR_EXPORT_PLUGIN

svn path=/trunk/playground/graphics/okular/; revision=553077
2006-06-19 22:15:07 +00:00
Pino Toscano b1973c5078 some kpdf -> okular (mostly in comments)
svn path=/trunk/playground/graphics/okular/; revision=551881
2006-06-15 21:24:00 +00:00
Pino Toscano 2a68297ce5 SVN_SILENT a bit less of mess
svn path=/branches/work/kde4/playground/graphics/okular/; revision=549949
2006-06-10 13:35:01 +00:00
Pino Toscano 60eab90248 small API changes to Generator:
- more const'ness in signals
- no need to redeclare the signals in the generators, as they are already in Generator

svn path=/branches/work/kde4/playground/graphics/okular/; revision=549941
2006-06-10 12:59:09 +00:00
Pino Toscano 09bf08b3e6 small API change for Generator: getText() just return a QString instead of a QString*, as QString is already implicitely shared
svn path=/branches/work/kde4/playground/graphics/okular/; revision=549935
2006-06-10 12:14:23 +00:00
Albert Astals Cid cb7ca95e94 pages have orientation
document has a rotation to apply over the page's own orientation
text search really works now when rotating (at least all my tests here worked)

svn path=/branches/work/kde4/playground/graphics/okular/; revision=547644
2006-06-02 20:42:57 +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 aca01f331f Support for visibility in oKular; oKular compiles and links, but it seems no plugins are found.
At the moment, the exported classes are only the one needed to make oKular and its actual plugins link, nothing more. Probably some other classes could be made visibile, but I'm not an expert about that.

svn path=/branches/work/kde4/playground/graphics/okular/; revision=538771
2006-05-08 20:12:04 +00:00
Albert Astals Cid c8a4e8e0b8 need to export that
svn path=/branches/work/kde4/playground/graphics/okular/; revision=522373
2006-03-25 11:05:39 +00:00
Albert Astals Cid 178bab06cb core builds
svn path=/branches/work/kde4/playground/graphics/okular/; revision=521179
2006-03-21 20:00:24 +00:00
Albert Astals Cid b412aba1f1 more proting, area.h still resists me
svn path=/branches/work/kde4/playground/graphics/okular/; revision=520833
2006-03-20 22:51:56 +00:00
Albert Astals Cid 6987b83b6a a bit of porting area.h is giving me lots of problems
svn path=/branches/work/kde4/playground/graphics/okular/; revision=520829
2006-03-20 22:40:11 +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 75db44d843 - sync with hdd, refactored text page, ported backends to textpage,
- fixed crash in fax, chm builds and ghostview nearly ported to libqgs

svn path=/trunk/playground/graphics/oKular/kpdf/; revision=481340
2005-11-18 20:48:01 +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
Piotr Szymanski 3cbcb2fb7f - update openDocument and freegui stuff
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=455516
2005-08-31 18:13:59 +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 bd81ccaed7 merged patch_064,065,066,068,075,091,092 (tinyurl.com/8t5ec)
svn path=/branches/kpdf/annotations/kdegraphics/kpdf/; revision=428594
2005-06-24 16:45:25 +00:00
Enrico Ros 8f4104a99a merge (refactored) patch_050,051,060
svn path=/branches/kpdf/annotations/kdegraphics/kpdf/; revision=424991
2005-06-13 15:46:23 +00:00
Albert Astals Cid 99a10e1841 All fixes done in HEAD come to annotations branch
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=395067
2005-03-05 15:59:15 +00:00
Enrico Ros 962f891b80 For Users:
Display contents faster, waste less memory. Added preloading to forward-
generate pages (if threading enabled and memory profile >= normal). Main
pages are always generated first, then thumbnails come, then preload ones,
etc.. Btw memory and cpu will be happier now.
(1 bug in memory and 1 in preloading still remains.. will be spotted soon)

For Developers:
Generator: dropped moc, api changes, better functions naming.
PDFGenerator and Document: moved requests queue to the Document.
   The generator performs only a single request a time. A flag can be
   queried to know if the generator is ready for starting another pixmap
   generation or not (in case it's generating a pixmap in background).
PixmapRequest: added priority and backgound (async) attributes.
Document: queuing requests by priority in requestPixmaps.
Observer: added defines for priorities used in doc->requestpixmaps.
PageView: delayed find-ahead timer creation (not created if not needed).
   Added preload PixmapRequests to the pixmap requests list.
ThumbnailsList: adapted to pixmapRequest changes and changed naming for
   delayed thumbanils request.

svn path=/trunk/kdegraphics/kpdf/; revision=379820
2005-01-18 16:43:36 +00:00
Enrico Ros e06c3f4c18 FixCrash 2/3: getMetaData modified. mutex locks. performance fix for TOC
generation (was 50 times slower after the all-in-one generation patch)

svn path=/trunk/kdegraphics/kpdf/; revision=376083
2005-01-07 13:07:29 +00:00
Enrico Ros ffe8ddaf9d Copying kpdf_experiments into branch and reordering directories. Look there
for the file naming map and file  versioning. Please wait until the commit
storm ends to report any bug. Albert and Enrico

svn path=/trunk/kdegraphics/kpdf/; revision=374920
2005-01-02 14:19:33 +00:00