From kde-core-devel Tue Sep 11 15:07:17 2007 From: Thomas Zander Date: Tue, 11 Sep 2007 15:07:17 +0000 To: kde-core-devel Subject: Re: Future of KPrinter Message-Id: <200709111707.17949.Thomas.Zander () trolltech ! com> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=118952327017330 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--nextPart16100682.51HJOfFfJY" --nextPart16100682.51HJOfFfJY Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tuesday 11 September 2007 14:13:50 Alex Merry wrote: > On Tuesday 11 Sep 2007, Thomas Zander wrote: > > On Saturday 08 September 2007 21:29:08 Alex Merry wrote: > > > * Straightforward printer options (try clicking "properties" for a > > > printer in the print dialog of the Qt assistant program, and doing > > > the same in kolourpaint), ie: integration with KDE print management > > > system > > > > Yeah, I kind of like the Gui in KDE and the richness of features. The > > thing is; there need not be any difference between Qt and KDE in this > > respect. > > The Qt dialog has issues, for sure, and those need fixing. So my > > suggestion is that we do that in a way that both Qt and KDE like the > > newly created QPrintDialog. Saves a lot of duplication :) > > My intention was to follow the QPrintDialog use pattern with > KPrintDialog anyway - KDE Print has always tried to behave like > QPrinter from an application developer's point of view. Trolltech thinks the QPrintDialog as it exists on Unix needs work, and I'm= =20 quite fond of the KDE one we have in KDE3. So what about joining forces an= d=20 making the QPrintDialog rock, and thus make all our lives easier? > > > * Printing a list of pages (such as 1,4,6-8) or the current page - > > > would required extending QPrinter and implementing our own > > > KPrintDialog, or we could just tell people to get this info from > > > KPrintDialog (it's only needed by the application, not by the > > > printing system) > > > > QPrinter already has this. As does the QPrintDialog. > > See QPrinter::fromPage(), QPrinter::toPage() > > That only allows you to print, eg: pages 4-8. Not page 1, page 4, pages > 7-9 and pages 14-18. QTestDocument::print() can't do this, because the > user can't select it in QPrintDialog and QPrintDialog can't tell > QPrinter about it. What QPrinter now has are 3 modes; 1) Print all of the document. 2) Print a page-range. Which has a start and an end. 3) Print a selection of pages. QPrinter has this mode as a setter, but the most used usecase is shown pret= ty=20 clearly in KGhostView with its checkboxes under the pages. This means that= =20 the application, not the print engine has a selection. The printing engine can't know which pages need to be printed, it still nee= ds=20 to be the application that chooses to print a page or not. The alternative is to print/paint the whole document and then to post proce= ss=20 the result to remove the pages you don't want. This is suboptimal, but can= =20 be useful if the app doesn't want to support this. The print-preview dial= og=20 can do this, though. Which again means no support in QPrinter is needed. Would that work for you? > > > * "Special" printers (like Send Fax via KFax) independent of eg: > > > CUPS - would require extending QPrinter and implementing our own > > > backends (which might use a Qt builtin backend when not printing to > > > the special printers) > > > > I'm thinking this can actually be done using the > > QPrinter::setPrintProgram (const QString &) > > method already. > > Actually, I think you're right about that. It still requires our own > KPrintDialog, though. Why? What kind of option can not be added to a revamped QPrintDialog? > > > * Print preview - more complicated. > > > > We looked at this and we have a preview dialog that will be available > > on the labs soon, and will likely be added to 4.4. > > Do you know what the use pattern will be? ie: how does the application > developer get the preview to display? If we implement a stand-in for > 4.0, I think we should follow the same pattern. I talked here at TT and I'm aiming for some blogging goodness start of next= =20 week by the guy that made it. > I think we may still need KPrintDialog for integration with the control > panel (when clicking Properties). But we'll discuss that on Wednesday, > along with the other bits. Ok, speak to you then. =2D-=20 Thomas Zander --nextPart16100682.51HJOfFfJY Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBG5q8lCojCW6H2z/QRAiQEAKCZPHxdELUUPKgvaoKXjbWRNG1LUQCg0y0j MPtcMjqJrzro0a1EFNfaLN4= =QUoF -----END PGP SIGNATURE----- --nextPart16100682.51HJOfFfJY--