--nextPart2957608.GsQxGMS3gn Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Saturday 08 September 2007 21:29:08 Alex Merry wrote: > Thomas Zander suggested we kill off KPrinter in favour of QPrinter > (http://lists.kde.org/?l=3Dkde-core-devel&m=3D118918127627566&w=3D2). > > Here's a list of the features provided by the KDE printing system that > the Qt printing system doesn't provide: > > * Customisable print dialogs=20 In Qt4.4 we are looking to add a method on QAbstractPrintDialog to add a=20 widget to it. This would then appear as a tab in the expected place on=20 the different platforms. Since KDE4.0 will probably not depend on Qt4.4 we (TT) can make sure an=20 exported symbol will be available in 4.3.2 > * 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=20 thing is; there need not be any difference between Qt and KDE in this=20 respect. The Qt dialog has issues, for sure, and those need fixing. So my=20 suggestion is that we do that in a way that both Qt and KDE like the=20 newly created QPrintDialog. Saves a lot of duplication :) > * 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() =46or the people just tuning in; the following (pseudo) code sample is what= =20 the majority of the applications will actually do. // this method will be called when the user presses the 'print' button. void MyApp::print() { // create a printer that the print dialog will set all the options on. QPrinter *printer =3D new QPrinter(); // create a dialog to show the printer option. QPrintDialog *dia =3D new QPrintDialog(printer, parentWidget); // optionally apps can have their own options widget. MyOptionsWidget *options =3D new MyOptionsWidget(); dia->addOptionsPane(options); dia->exec(); // at this point the QPrinter object is initialized with size / etc by // the dialog. printer->setFoo(options->bar()); // process my own options myQTextDocument->print(printer): // do the actual printing. } This gives you a feel what we can do. So, all 'weird' options like page ranges and other stuff has to be handled= =20 by the actual printing code. QTextDocument::print IIRC does already=20 handle this. > * Custom margins - would require extending QPrinter and implementing > our own backends (which might use a Qt builtin backend) I'm going to try to get a setPageRect(const QRect &contentSize) on=20 QPrinter, not for 4.3 though. > * Pre-print filtering - would require extending QPrinter and > implementing our own backends (which might use a Qt builtin backend) This is for things like the filter tab in the KDE3 print dialog, right? I'm not so sure we should still have that, at least in the normal print=20 dialog; all those options are only useful if we print to postscript. And=20 we can't assume that anymore. =46or example, on Windows the output format is defined by the=20 printer-driver. And even on Unix/Mac the output format can be PDF. So this feature really should be re-thought. > * "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=20 QPrinter::setPrintProgram (const QString &) method already. > * Print preview - more complicated. We looked at this and we have a preview dialog that will be available on=20 the labs soon, and will likely be added to 4.4. Bottom line; * for kde4.0 we can use QPrinter completely, we can use the (ugly)=20 QPrintDialog as well since its fully functional, just not that pretty. * We will add the missing features in Qt for 4.4 and later versions to=20 make sure that the KDE printing experience is just as good as the KDe3=20 one, and probably even better. * We still need the kde control panel to configure printing, =2D-=20 Thomas Zander --nextPart2957608.GsQxGMS3gn Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBG5nlyCojCW6H2z/QRAs8/AJsFSIQ9RVZyVEqg9/A3YetaFgwfUgCfTIRe lPXnEH+GVqD8dPiDi/rCVlQ= =W4wT -----END PGP SIGNATURE----- --nextPart2957608.GsQxGMS3gn--