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
Modified the constructors to specify if a rect represents a rectangular region or an elliptic one; added a new one to create a region defined using a polygon.
Adapted to the new API the generators that support links (all but the DjVu one - will be adapted and improved soon).
svn path=/trunk/playground/graphics/okular/; revision=561890
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
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
- 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
- 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
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
Also, the structure for backward search is there, (just...) need to add a findTextInternalBackward and do the job there.
svn path=/branches/work/kde4/playground/graphics/okular/; revision=545298
You need poppler from cvs as of today, i'll change the check to a bigger version number once a new poppler gets released
There are still some problems i think but i'm commiting to see if someone wants to help ;-)
Includes some EBN fixes by Christian Mueller
svn path=/branches/work/kde4/playground/graphics/okular/; revision=540404
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
Created a oKularcore lib, so the generators ca link to it, and made the oKularpart link to it too, of course.
Adapted the sources of the Okularpart to the new location for the generated settings.h.
svn path=/branches/work/kde4/playground/graphics/okular/; revision=523729
- 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
- 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
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
* 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
- 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
existing ones, updated 'tools.xml' with new names and made generator_pdf
parse pdf icon names as lowercase. Added SVG sources too for the icons.
- note that I suck as icon maker, so plz make good looking icons and don't
complain about these - :-))
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=405395
a bug in Annotation::Window.
PDFGenerator: added postprocessing for handle the special pdf cases on
TextAnnotations (where window geometry is embedded in annotation, not
in popup and the annotation should be represented as an icon).
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=404023
Warning before running out of memory and stop pixmap request.
CCMAIL: 103435@bugs.kde.org
PagePainter:
Not related to the bug: avoid scaling up slow pixmaps.
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=403884
and retrieval xml test. This second rewrite seems better than the
previous one. Maybe it's not perfect bug finally it's good enought
to move ahead now.
Annotations:
Restored and verified XML loading/saving with recursive storing and
retrieval of referenced objects. 100% verified and tested. Finally
all is working as expected. The structure is clean and it's simple
to choose the way to go now: rendering. Updated AnnotationUtils, More
comments, removed leak.
Page:
Adapted to changes to AnnotationUtils and Annotation, changed context
saving.
Misc updates on TODO and PDFGenerator (fixed Ext flag).
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=403863
Better flow in annotations parser.
Annotation:
Cleanups in header.
PageView:
Adjusted a squelch.. I think a neural network it's the least we can do
to choose that float number between 0.6 and 0.7.
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=403319
PDFGenerator:
Changed parser to deal with the new data structures:
1) Popups are not inserted anymore as annotations, but parsed and
scheduled for later merging with other annotations. Shared popups are
permitted (the pdf reference doesn't clarify on this, so we better
support them).
2) Annotations can have an internal hieracy. When an IRT annotation is
found, it's parsed and scheduled for later merging in the parent's
tree.
The merges take place at the end of the annotation retrieval. At that
point all cross-objects are in memory and we can resolve/reparent
stuff.
README.Annotations:
Note on internal parser.
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=403219
all the reviews on the document (pretty unuseful now, but that will
change ;-). Another step to good kpdf annotations.
Part:
Added Reviews toolbox pane. Added (commented out while doing it right)
searchline for toc; just works.
Misc:
Observer: added id for Reviews pane (as document observer it monitors
document/annotations changes). Page: added 2 temporary accessors for
annotations (will change soon). Makefile: added side_reviews.cpp to
compilation. Searchwidget: slight better spacing to look consistant with
the review panel.
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=400307
annotations in the 'document tie file'. Every attribute of kpdf dss
can be dumped to disk. Only rendering prevents HEAD merging now! :-)
Annotations:
Storage: full annotations saving/loding on the tied XML is implemented.
every annotation put on a page (either loaded from a pdf or created
internally is loaded and saved when opening/closing a document).
Attributes are dumped to XML and reloaded from it via qdom
DataStructures: internal changes, better naming, some attributes fused.
PopupAnnotation has become WindowAnnotation
PDF16Parser: 100% completeness for the types we support
PDFGenerator:
adapted to annotation ds changes. better parsing on a couple of attrs.
correctly handle 'F'.
Misc:
Document: remove/cleanup debugs, Page: performance testing stuff added,
PagePainter: setPen( annot->color ), PageV..or: typo,
TODO: many changes
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=398789
Changed loadDocumentInfo/saveDocumentInfo semantics. Document settings
are saved by Document, but page related stuff (bookmark state,
annotations, ...) are loaded/saved by the KPDFPage itself.
Annotation:
Better usage of dom entities (QDomElement(s) -> QDomNode(s)). Added const
modifier to 'saveSettings' methods.
Part:
Use setCheckedState for the show/hide left panel menu entry. Use icon
too. Bumped .rc revision.
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=397236
AFAIK the kpdf team is once again the first opensource reader to get
support for a cool feature. All annotations in pdf file are read and
converted to our internal data structures. Then they'll be rendered on
screen and changed/saved to our xml file.
Annotations completely supported and parsed from PDF: [markup], popup,
text, freetext, line, polygon, polyline, highlight, underline, squiggly,
strikeout, stamp, ink. Partial support for: [base], geom.
Annotations:
Added/Changed the passive annotation data structures to contain and
generalize the attributes of annotation classes. Missing attributes
(won't be handled by kpdf): base{P,AP,AS,A,AA,StructPar,OC}, geom{RD}.
Little changes to the PDF1.6 summary in header.
PDFGenerator:
Internal parser (discussed with Albert) directly in top of xpdf. Read
object nodes of type 'Annot' and parse the whole set of attributes as
defined in the PDF1.6 spec (for supported annotations).
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=396909
Annotation: the class has been passivized. It's only a data container now,
no more active manipulation of events/paints.
PageViewAnnotator: this class has been created to handle creating annots.
PageView creates its 'Annotator on demand. The annotator parses tool
definition from the 'tool.xml' file.
The Annotator internally uses AnnotatorEngine(s) to react to mouse events
and the annotation is created when the job is really finished.
Page: added a (maybe temporary) NormalizedPoint to complement Norm..Rect.
PageViewUtils: removed PageViewEditTools and cleaned up header.
conf/: added a debug option for showing annotation boundary while creating
one and added a temporary 'debug' toolbox in the config dialogs.
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=394959
pageviewtoolbox.cpp/.h: Removed.
PageViewToolBar (was PageViewToolbox): Moved def/impl inside the
pageviewutils.c/.h files. Uses eventfilter to get notified when the
anchorWidget changes in size. Cleaned up code.
Annotations: added empty code.
PageView: removed some code. fixed rmb popup menu hidden if no document
was opened.
Updated TODO.
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=393302
SearchWidget). Splitted SearchType::GoogleLike in GoogleAll and GoogleAny
to mark pages if all words are present or at least one is present resp.
--TODOs;
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=391354
really nice (and well documented) API! Passwords of protected files are
stored in the 'KPdf' folder of the Network wallet.
Updated todo.
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=391251
implement annotations now (and create the save/load procedure).
Annotations: converging to a stable Annotation definition. Changed a bit
the paint functions. Added a first 'template' annotation, a simple
pen-like segments recorder for framework testing purposes only. This
has events filters in place and the rough paint function implemented.
PageView: removed the MouseEdit mode and using that button for toggling
the editToolBox instead. Added Annotation support. When the Annotation
is created, all pageView events flow through that new object. Repaint
of damaged/old areas is done internally and is based on the geometry
of the annotation we're creating. When an Annotation is complete, it
is reparented to the Page that adds it to its internal list.
From that point on the annotation will be rendered by pagePainter
using the pixmap-based paint function provided by the annotation
itself.
PagePainter: draws annotations stored in pages when rendering (using the
'rought paint function' till the good pixmap based one will be in
place.
Page: added preliminary support for adding Annotation(s) to the page
and deleting them all.
Document: added the pass-through call to add an Annotation to the Page
and notify observers.
PageViewToolbox: can be draged and attached to any side. Position is
remembered between runs (choose your side and that the toolbox will
always be there). Available on Right and Bottom sides too. Emits -1
when the current tool is deselected.
Misc: added Annotations to both the 'observers changed flags' and the
'pagepainter' ones and updated ui classes accordingly.
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=390638
User Interface: added a toolbox for selecting an annotation tool without
polluting the toolbar (pageviewtoolbox animated widget). Icons of that
toolbar are gimped version of ones in nuvola icontheme.
Core: added annotation class. this will support all features (except for
silly ones (really there are some!)) from pdf 1.6 specs but abstracted
in the kdpf way. (api changes in progress...)
About annotations: only some incomplete interfaces are in plasefor now.
Every type of pdf annotations has tens of parameters. I think we'll render
correctly everything but provide only simple and useful tools for making
annotations over the pages, otherwise a 'Qt designer like' property view
will be required to do fine adjustment over the crappy thousands of
settings. (and we're aiming at a quick and simple viewer with lots of
coolness, not chaos).
Note: the code has been wrongly committed to HEAD before,but soon reverted.
Have fun!
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=388768
- Keep the original url on the document so we can open relative file names
- Add Enrico and my copyright
svn path=/trunk/kdegraphics/kpdf/; revision=386244
Removed old code, reworked bad code.
I have no more reported crashes now.
No plans for additions or code changes till 3.4 release.
Thank you all kpdf users, Have Fun!
svn path=/trunk/kdegraphics/kpdf/; revision=385897