[Kde-print-devel] Future of KPrinter

Alex Merry huntedhacker at tiscali.co.uk
Sat Sep 8 21:29:08 CEST 2007


Thomas Zander suggested we kill off KPrinter in favour of QPrinter 
(http://lists.kde.org/?l=kde-core-devel&m=118918127627566&w=2).

Here's a list of the features provided by the KDE printing system that 
the Qt printing system doesn't provide:

* Customisable print dialogs - would require implementing our own 
KPrintDialog
* 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 - 
would require implementing our own KPrintDialog
* 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)
* Custom margins - would require extending QPrinter and implementing our 
own backends (which might use a Qt builtin backend)
* Pre-print filtering - would require extending QPrinter and 
implementing our own backends (which might use a Qt builtin backend)
* "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)
* Print preview - more complicated.  We could probably provide a 
KPrintPreview class that uses a QPrinter to print to a file and then 
display that:

QPrinter printer;
KPrintPreview preview(printer); // configures the printer as needed
// paint to the QPrinter as normal
preview.show();

Note that the printer kcm could be kept (without the option 
for "special" printers except via eg: CUPS) even if the whole of the 
kde printing API was scrapped.

Are custom margins really needed?


So, the choices are:

* scrap KPrint* and just use Qt's system, (but keeping the printers kcm)
* scrap KPrinter and use QPrinter, but provide KPrintDialog as an 
extensible printing dialog integrated with the KDE print management 
system (and it can also delegate to QPrintDialog on Windows), and maybe 
KPrintPreview as above - this is what Thomas suggested
* provide KPrinter, a subclass of QPrinter, and potentially implement 
our own backend(s), as well as KPrintDialog


Personally, I'm being more and more convinced by Thomas' suggestion 
(together with KPrintPreview).  If we get programs to get a page list 
from KPrintDialog rather than QPrinter, we should be able to implement 
everything except for pre-print filtering and special printers.  The 
latter we could possibly even do using QPrinter::setPrintProgram() [on 
X11 only], and the former seems quite specialist.


I'd like a decision to be made on this ASAP, please, so I can start 
working on something.

Alex

PS: Thomas said that he will talk to the printing trolls about the 
missing features, but we wouldn't get them until 4.4 and we may not get 
any of them, of course


-- 
KDE: http://www.kde.org
Ubuntu/Kubuntu: http://www.ubuntu.org http://www.kubuntu.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-print-devel/attachments/20070908/3f9a7576/attachment.pgp 


More information about the Kde-print-devel mailing list