[Kde-print-devel] Status of KDEprint in 4.0, and offer of help
Goffioul Michael
goffioul at imec.be
Fri Sep 7 10:03:05 BST 2007
> On Wednesday 05 September 2007 09:53:08 Goffioul Michael wrote:
> > 1) make KPrinter inherit QPrinter
>
> For all us new to the kdeprint framework, I'd really like to
> know *all* the reasons why we need a KPrinter class in the
> first place :)
>
> Would you be able to write provide us with that list?
Honestly, I don't remember exactly *all* the reasons. It's almost
7 years ago and at that time, it was Qt-2.x; the print API was
much less flexible that it is now. But IIRC, it was mainly due
to the lack of polymorphism of the Qprinter class (for instance,
setters were virtual, but not the getters) and its limited
support for print options, which made it difficult to extend
(for instance, margins were specified as 2 numbers, while I wanted
it as 4 numbers).
I'm not really aware of the current Qprinter API, but I'm pretty
sure those limitations have disappeared and/or can be worked
around more easily. Now why a Kprinter and not simply a Qprinter?
Here, I'm thinking about applications that extend the print dialog
with their own GUI and store additional print options in the
Kprinter object: could you do something similar with a Qprinter?
I also see in the current API that Qprinter::setEngines is protected;
so if you want to use your own engines (note: I don't know if this
would be needed in the context of kdeprint), you need to inherit
from Qprinter.
Michael.
More information about the kde-core-devel
mailing list