--===============1396195951== Content-Type: multipart/signed; boundary="nextPart1764644.m2lnvDbI0U"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart1764644.m2lnvDbI0U Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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,=20 and everything except the stuff dealing with dialog pages (ie: all the=20 getter and setter methods) are simply passed to QPrinter's QPrintEngine=20 now. There is also scope for passing other properties to the=20 QPrintEngine. As for the dialog pages - the Qt4 way is to call the=20 Q[Abstract]PrintDialog constructor with the QPrinter as an argument,=20 rather than calling QPrinter::setup(). We could adopt that approach=20 (keeping KPrinter::setup() for compatibility, as QPrinter does) with a=20 public KPrintDialog class. Even if KPrintDialog can't inherit from=20 QAbtractPrintDialog (I haven't looked at that yet). That would have=20 the advantage that you can use QPrintDialog to set up a KPrinter=20 (solving at least part of the issue of Windows printing - the dialog;=20 which should provide the printer name...). So I certainly think it's feasible, and I suspect it will make kdeprint=20 a bit simpler (although it's going to be quite a bit of work converting=20 it... I'll try putting a skeleton together this weekend to see how it=20 looks). Alex =2D-=20 KDE: http://www.kde.org Ubuntu/Kubuntu: http://www.ubuntu.org http://www.kubuntu.org --nextPart1764644.m2lnvDbI0U Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQBG4VO2BRauKLutZ9ARAhZKAJ97wgyE7aU6t0Mjok+oawZ76baroACfTVrR OTS991bdlmkJ5hKuD94qeJQ= =SJ5G -----END PGP SIGNATURE----- --nextPart1764644.m2lnvDbI0U-- --===============1396195951== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kde-print-devel mailing list Kde-print-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-print-devel --===============1396195951==--