[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-print-devel
Subject: Re: [Kde-print-devel] Status of KDEprint in 4.0, and offer of help
From: Alex Merry <huntedhacker () tiscali ! co ! uk>
Date: 2007-09-07 13:35:50
Message-ID: 200709071435.55596.huntedhacker () tiscali ! co ! uk
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
On Friday 07 Sep 2007, Goffioul Michael wrote:
> > 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've gone through the KPrinter methods that are duplicated in QPrinter,
and everything except the stuff dealing with dialog pages (ie: all the
getter and setter methods) are simply passed to QPrinter's QPrintEngine
now. There is also scope for passing other properties to the
QPrintEngine.
As for the dialog pages - the Qt4 way is to call the
Q[Abstract]PrintDialog constructor with the QPrinter as an argument,
rather than calling QPrinter::setup(). We could adopt that approach
(keeping KPrinter::setup() for compatibility, as QPrinter does) with a
public KPrintDialog class. Even if KPrintDialog can't inherit from
QAbtractPrintDialog (I haven't looked at that yet). That would have
the advantage that you can use QPrintDialog to set up a KPrinter
(solving at least part of the issue of Windows printing - the dialog;
which should provide the printer name...).
So I certainly think it's feasible, and I suspect it will make kdeprint
a bit simpler (although it's going to be quite a bit of work converting
it... I'll try putting a skeleton together this weekend to see how it
looks).
Alex
--
KDE: http://www.kde.org
Ubuntu/Kubuntu: http://www.ubuntu.org http://www.kubuntu.org
["signature.asc" (application/pgp-signature)]
_______________________________________________
Kde-print-devel mailing list
Kde-print-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-print-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic