[Okular-devel] Generic Generator for QTextDocument

Pino Toscano toscano.pino at tiscali.it
Thu Jan 11 21:54:52 CET 2007


Alle 17:54, mercoledì 10 gennaio 2007, Tobias Koenig ha scritto:
> class GenericConverter : public QObject
> [...]
> class GenericGenerator : public Generator

Since they work with text-document generators, I would choose a 
more "explicit" name, for example TextConverterBase and 
TextDocumentGenerator. Of course, better names are welcome, but imho they 
should indicate the fact that QTextDocument is used.

> To make it as easy as possible to add links, titles (toc) and meta data
> (annotations as well) the GenericConverter class can emit signals which
> take the use data as arguments together with the cursor positions in the
> QTextDocument. All the boring stuff (calculation positions -> normalized
> coordinates, creating the toc, filling DocumentSynopsis) is done by
> the GenericGenerator.
>
> One issue that crossed my plans you can see in addLink( Link*, int, int ).
> I want to pass the Link object here, so the developer can choose what
> type of link he wants to use in the Converter. However the passed object
> is use for an object rect which is deleted at every pixmapRequest, so
> passing the link here once doesn't work, because a new object is needed
> for every pixmapRequest.

Uh? I didn't get the issue, and what we delete at every PixmapRequest...

Regards,

-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/okular-devel/attachments/20070111/f538fbc9/attachment.pgp 


More information about the Okular-devel mailing list