Commit graph

816 commits

Author SHA1 Message Date
Piotr Szymanski
5a03d1e2a6 - add libgs helper app
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=445291
2005-08-10 20:13:07 +00:00
Piotr Szymanski
aaa190ce2e - SVN_SILENT get rid of bad file
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=445278
2005-08-10 19:45:14 +00:00
Piotr Szymanski
94635d7041 - Adding the follwoing code:
1. GSGenerator (generator ghostview, need renaming) 
     Implements the Generator class, handles PixmapRequest transmission and starts other objects.

  2. InternalDocument
     Holds information stored in document's DSC and the information set by the user:
     Page Format, BoundingBoxes, etc, some code taken from kghostview

  3. GSInterpreterLib, the synchronous pixmap generator

  4. GSInterpreterCMD, asynchronous pixmap generator that communciates with the kpdflibgsasynchelper application
  

svn path=/trunk/playground/graphics/oKular/kpdf/; revision=445276
2005-08-10 19:44:28 +00:00
Piotr Szymanski
350667967d - pscopying functions, from kghostview
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=445274
2005-08-10 19:38:45 +00:00
Piotr Szymanski
9548d85a98 - add configuration widgets for ghostscript backend
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=445273
2005-08-10 19:36:54 +00:00
Piotr Szymanski
1bf4276bf8 - add %%Copyright comment support
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=445264
2005-08-10 19:32:05 +00:00
Piotr Szymanski
c3620ca295 - forgotten file
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=445205
2005-08-10 16:39:30 +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
bb7a9f73ce - backport from head, remove nontranslantable string
- add an option to allow selecting a generator by the user if more than one generator found for given mimetype


svn path=/trunk/playground/graphics/oKular/kpdf/; revision=445154
2005-08-10 15:23:22 +00:00
Piotr Szymanski
757db52ac7 - gui support
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=442117
2005-08-01 17:47:17 +00:00
Piotr Szymanski
235e3e4c29 - support for changing rotation and added access to the programs interface
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=442116
2005-08-01 17:46:43 +00:00
Dirk Mueller
0cd70ee56c - update FSF address
- update admin dir to KDE 3.5

svn path=/trunk/playground/graphics/oKular/kpdf/; revision=439811
2005-07-29 00:03:05 +00:00
Piotr Szymanski
0be10d88e5 - code for use of command line GS interpreter, reused from kghostview, a little remodeled, still fails to work,
GS says it cant open the initial device, does it mean the pximap or the widget? does the widget need to be shown
  before it can receive communication from X11?
  Asking Luis, he might know. I wanted to use the library version of the interpreter but it 
  somehow fails to create instance... Will investigate it later.
CCMAIL: luis@luispedro.org

svn path=/trunk/playground/graphics/oKular/kpdf/; revision=439247
2005-07-27 13:52:37 +00:00
Piotr Szymanski
bb8e583945 -make the library based interprer one of the possibilities
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=438593
2005-07-25 13:25:26 +00:00
Piotr Szymanski
fdf0f2ff51 - gvinterpreter using libgs, doesnt work, gsapi fails to provide an instance, no idea why... moving to owrk on commandline gs
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=437870
2005-07-23 11:51:50 +00:00
Piotr Szymanski
9d66ee1670 - typo in makefile.am!
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=437231
2005-07-21 10:52:37 +00:00
Piotr Szymanski
1c7662dec2 - makefile changes for reorganisation
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=437102
2005-07-20 22:47:35 +00:00
Piotr Szymanski
a1989bda36 - move xpdf to genrators/xpdf/xpdf as it is that generator's backend
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=437100
2005-07-20 22:42:44 +00:00
Piotr Szymanski
df76e34a99 - add this too
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=437098
2005-07-20 22:39:05 +00:00
Piotr Szymanski
b9d106bb6f - move to generators
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=437097
2005-07-20 22:38:29 +00:00
Piotr Szymanski
fc6b0ad1f0 - reorganisation part 1, moving pdf generator to genrators/xpdf
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=437095
2005-07-20 22:33:27 +00:00
Piotr Szymanski
81bb03b454 - added suport for changing rotation of the current document, looked at ghostview code, on how to do it
still i implemented all of this myself, damn ghostview is making me lose all the joy i had in working
  on okular, working with such a badlyu document API like libgs has i just killing me...

svn path=/trunk/playground/graphics/oKular/kpdf/; revision=437094
2005-07-20 22:28:23 +00:00
Piotr Szymanski
210a0d44a0 - backport links in presentations
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=435938
2005-07-18 17:51:27 +00:00
Piotr Szymanski
931271f968 - generate kpdftextpage while loading document, makes search speedy again, and man do i mean speedy
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=434974
2005-07-15 21:50:35 +00:00
Piotr Szymanski
011516bd90 - one more
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=434948
2005-07-15 20:32:40 +00:00
Piotr Szymanski
17cb9645fb - add the frigging desktop!
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=434947
2005-07-15 20:32:11 +00:00
Piotr Szymanski
bcd8aeb475 - less debug (man this slew things down)!
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=434944
2005-07-15 20:27:34 +00:00
Piotr Szymanski
9dd7420b91 - fix error.cpp problem
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=434941
2005-07-15 20:24:53 +00:00
Piotr Szymanski
7b5063c6e1 - more build fixes
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=434935
2005-07-15 20:08:39 +00:00
Piotr Szymanski
8aef215fb5 - bah make it build
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=434930
2005-07-15 19:58:47 +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
Piotr Szymanski
369803e65b - forwardport the support for external linkage in toc
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=434864
2005-07-15 17:32:46 +00:00
Piotr Szymanski
f5bbf89218 - support for taking getting a list of suported mimelsit and nice generation of it
based on what generators provide via ktrader, includes caching the mimetype list
- handling of compressed files added too
- both fucntions basedo kviewshell's version that Wilfried Huss suggested, although with 
  significant remodelling by myself, still i see no problem on adding relevant copyrights
  to this file for the original functions' author just tell me how he/she is

svn path=/trunk/playground/graphics/oKular/kpdf/; revision=434859
2005-07-15 17:17:13 +00:00
Piotr Szymanski
a4730dc8ae - enable TEXTWORDOUTLIST, we need functioncs from it to populate abstract KPDFTextPage
- add several functions to xpdf's TextWord:
  * int getRotation() - returns the rotation of the word
  * double getEdge(int x) - returns the edge of char nr. x
  * double getBaseline() - returns the baseline of the word
  * GBool hasSpaceAfter() - returns the spaceafter property (is the word followed a space)
  * TextWord* nextWord() - returns the pointer to the next word in the current textline
- undefine HAVE_MKSTEMPS, my libkdefakes doesnt seem to have it

svn path=/trunk/playground/graphics/oKular/kpdf/; revision=434858
2005-07-15 17:05:01 +00:00
Piotr Szymanski
2b626c0baf - backport
SVN commit 431645 by aacid:
	This may fix #98891 
  SVN commit 431662 by aacid:
	typo fix
(only part.cpp/h/rc fixes left)

svn path=/trunk/playground/graphics/oKular/kpdf/; revision=434847
2005-07-15 16:28:09 +00:00
Piotr Szymanski
a61ec1c7b9 - moving this to xpdf
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=434846
2005-07-15 16:23:17 +00:00
Piotr Szymanski
6e8a08f692 - make the Page column in TOC configurable with secret config option instead of compile time switch
- mark one function to remove later
- add one more category to desktop file to be more vfolders compliant

svn path=/trunk/playground/graphics/oKular/kpdf/; revision=431970
2005-07-05 19:10:48 +00:00
Piotr Szymanski
518631979b - importing current version of annotations branch of kpdf
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=431968
2005-07-05 18:54:44 +00:00
Piotr Szymanski
565b813fdf - fix compilation
svn path=/branches/kpdf/annotations/kdegraphics/kpdf/; revision=431884
2005-07-05 13:44:39 +00:00
Enrico Ros
d3d8999aea don't crash if the generator doesn't support searching text
svn path=/branches/kpdf/annotations/kdegraphics/kpdf/; revision=428596
2005-06-24 16:47:47 +00:00
Enrico Ros
789e799ba7 generate smooth scaled image of the requested size (looks/caches/works
a lot better this way)

svn path=/branches/kpdf/annotations/kdegraphics/kpdf/; revision=428595
2005-06-24 16:47:16 +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
e7fadb9ab5 merged patch_088 (tinyurl.com/8t5ec)
svn path=/branches/kpdf/annotations/kdegraphics/kpdf/; revision=428593
2005-06-24 16:43:45 +00:00
Enrico Ros
51b07b3169 merged patch_053,062 (tinyurl.com/8t5ec)
svn path=/branches/kpdf/annotations/kdegraphics/kpdf/; revision=428592
2005-06-24 16:43:19 +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
383459da8d applying patch_086,087 (tinyurl.com/8t5ec)
svn path=/branches/kpdf/annotations/kdegraphics/kpdf/; revision=428589
2005-06-24 16:41:55 +00:00
Enrico Ros
a4b2be7c84 applying patch_105,106 (of: tinyurl.com/8t5ec)
svn path=/branches/kpdf/annotations/kdegraphics/kpdf/; revision=428588
2005-06-24 16:41:03 +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
Albert Astals Cid
f8f17e75f9 Even more Style Guide fixes on the same sentence, do you know how much i suck?
svn path=/branches/kpdf/annotations/kdegraphics/kpdf/; revision=427194
2005-06-19 22:18:41 +00:00
Albert Astals Cid
1aedb3855d Style guide fixes
svn path=/branches/kpdf/annotations/kdegraphics/kpdf/; revision=427186
2005-06-19 22:01:32 +00:00