Commit graph

846 commits

Author SHA1 Message Date
Laurent Montel
b72814a9d4 Fix postincremental
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=459553
2005-09-11 12:07:31 +00:00
Albert Astals Cid
7a051d3ee2 configure improvements
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=457815
2005-09-06 16:46:20 +00:00
Adriaan de Groot
15bbda73ca Dox fixes: match parameters w/ @param list; looks like CHMFile::ParseAndFillIndex got a little out-of-sync.
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=457302
2005-09-05 14:14:31 +00:00
Piotr Szymanski
1904ae6d05 - a better version of tsdgeos's fix
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=456227
2005-09-02 10:33:03 +00:00
Piotr Szymanski
bfee50a06f - last commit fixes crashes on page_count and etc, adding a note about dsc too
- Wilfried, could you recheck oKular from svn and rebuild it, should work for you now :)
CCMAIL:Wilfried Huss <Wilfried.Huss@gmx.at>

svn path=/trunk/playground/graphics/oKular/kpdf/; revision=456053
2005-09-02 00:52:20 +00:00
Piotr Szymanski
481dd5f9f1 - incorporate tsdgeos's remodelling of configure.in.in check for libgs
- fix loading docuemnts that dont have the dsc by using one page of local papersize with the pixmap generated by ghostscript after sending the whole document, fixes first bigger bug in oKular

svn path=/trunk/playground/graphics/oKular/kpdf/; revision=456051
2005-09-02 00:48:27 +00:00
Piotr Szymanski
241ca3b987 - another possible fix
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=455535
2005-08-31 19:06:33 +00:00
Piotr Szymanski
eda1c570d7 - try not to crash
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=455534
2005-08-31 19:03:27 +00:00
Piotr Szymanski
3c689f5b01 - dont crash when generator not initialised
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=455529
2005-08-31 18:57:37 +00:00
Piotr Szymanski
6f4ead4d5f - dont shadow the true classes variable
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=455521
2005-08-31 18:27:16 +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
402ec73285 - add one moreconstructor for objectrect
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=455042
2005-08-30 13:24:29 +00:00
Piotr Szymanski
e84607d34c - use the per character textpage generation by default
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=450786
2005-08-19 02:40:39 +00:00
Piotr Szymanski
0513ddeb58 - my wrapper around both KHTMLPart and KCHMView's chmlib wrapper so that we get a rendered page.
- What works: 
  + viewing documents 
  + thumbnail generation
  + calculating page sizes based on the size of their KHTMLView
  + table of contents

- What is pending:
  + using internal index, will code it once I comeback, wasted too much time on textpage generation

- What probably will not work:
  + printing the entire document, no CHM viewer provides it now
    it would need some kind of being able to print multiple HTML files
    at once or sth similar (maybe anyone else has an idea?)

- About generating the textpage:
  I went a long way, with enormous, and I do mean enormous help from SadEagle explaining to me how
  to use the KHTML API to generate the text page in a usable way (actually getCaretPos is depreciated
  and not document, and if you try to read the code, you'll notice it delegate the important stuff
  further and further into the KHTML core. Understanding KHTML's core is a bit too much to require 
  at the moment.

  Well finally I had something close to working, some words are matched properly - the rectangles are ok,
  most are matched with a one/one and a half offshot to the right, finally some are not matched because
  getCaretPost returns -1 as the left X border, I have no idea why, when I am asking for a

  This is why I am ccing to kfm-devel, if anyone of you guys, has a while to spare and would be kind 
  enough, I would like to ask you to look at generator_t.cpp and the 
      void TGenerator::recursiveExploreNodes(DOM::Node node,KPDFTextPage *tp)
  function, and tell me what seems wrong there? Also if you knwo a better way to get per character
  coordinates for every character in the text inside a HTML Page, please let me know.

CCMAIL:kfm-devel@kde.org


svn path=/trunk/playground/graphics/oKular/kpdf/; revision=450785
2005-08-19 02:37:37 +00:00
Piotr Szymanski
c394549b81 - reusing code from KCHHViewer, contains a small wrapper around chmlib and a better version of kio-msits then the one from kdevelop, added minor modifications by myself so that they can be used in oKular, also stripped the library of unneeded stuff
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=450783
2005-08-19 02:22:44 +00:00
Piotr Szymanski
e73e14bb1e - adding the directory for CHM backend (also to Makefile.am, no configure check yet, you need to have chmlib installed and have chm_lib.h in your include path, libchm in your lib path)
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=450782
2005-08-19 02:20:03 +00:00
Adriaan de Groot
8ce31e10d2 Enable apidox in oKular (and for this module). Automatic generation is enabled at http://www.englishbreakfastnetwork.org/
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=450319
2005-08-17 21:57:54 +00:00
Piotr Szymanski
687fe3c0fc - trying to fix the automake issue
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=448935
2005-08-13 16:27:32 +00:00
Grzegorz Jaskiewicz
7c7feb611d that's the way
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=448918
2005-08-13 15:10:45 +00:00
Grzegorz Jaskiewicz
5160ae8d50 make file for svn/cvs
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=448916
2005-08-13 15:03:25 +00:00
Piotr Szymanski
c259a8fc9d - I get:
make: *** No rule to make target `gssettingswidget.lo', needed by `libgssettings.la'.  Stop.
  but everything seems to be ok in the makefile.am, help me please


svn path=/trunk/playground/graphics/oKular/kpdf/; revision=445674
2005-08-11 15:31:20 +00:00
Piotr Szymanski
d2dc54a926 - fix compile
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=445650
2005-08-11 14:27:09 +00:00
Piotr Szymanski
8b5a0e4746 - dont know what it does, but hey its a change and it works
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=445398
2005-08-11 03:41:30 +00:00
Piotr Szymanski
21d9c299d0 - interpreters contain anticrash fixes,
- GSLogWindow initially based on kghostview code got a total overhaul and is practically rewritten
- THIS SHOULD COMPLETE 3rd of5 DELIVERABLES, 5 am, need sleep now.

svn path=/trunk/playground/graphics/oKular/kpdf/; revision=445397
2005-08-11 03:37:38 +00:00
Piotr Szymanski
b55e0c3d71 - API headers of ESP Ghostscript 8.15rc3, but should work with any other Ghostscript with libgs. GPL
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=445396
2005-08-11 03:00:14 +00:00
Piotr Szymanski
ac523a75a5 - add relevant signals (xpdf)
- port to new api (kimgio)

svn path=/trunk/playground/graphics/oKular/kpdf/; revision=445384
2005-08-11 01:00:20 +00:00
Piotr Szymanski
83a91ddbe9 - comment out textpage genration on loading of document (takes too much time, need a different way)
- port to new generator API/desktop

svn path=/trunk/playground/graphics/oKular/kpdf/; revision=445382
2005-08-11 00:48:11 +00:00
Piotr Szymanski
c5b853601e - adding the libgs detection functions
Ghostscript backend depends on libgs Ghostscript shared library.
- BTW. anyone know how to add a -Lsth flag to KDE_CHECK_LIB so it can be found if nonstandard directory is chosen?


svn path=/trunk/playground/graphics/oKular/kpdf/; revision=445369
2005-08-10 23:58:01 +00:00
Piotr Szymanski
571fe69b58 - sync X before sending pixmap, works ok now
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=445318
2005-08-10 21:37:35 +00:00
Piotr Szymanski
691a5324ab - update to reflect current state, only libgs configure check pending and this is finished
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=445294
2005-08-10 20:17:00 +00:00
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