KDE4 printing: results of IRC meeting

Thiago Macieira thiago at kde.org
Fri Sep 14 17:32:04 BST 2007

On Friday 14 September 2007 13:56:45 Alex Merry wrote:
> On Friday 14 Sep 2007, Thiago Macieira wrote:
> > Also, we want to add virtual printers to the print dialog, depending
> > on the desktop's configuration. I don't think Qt can provide a
> > standard "Send by email" printer, much less a "Send by fax".
> >
> > This means I don't think we can do without a KPrintDialog wrapping
> > around a QPrintDialog. Unless, of course, we made QPrintDialog detect
> > KDE and use its settings...
> Actually, I'm not sure we can do it with without creating our own dialog
> from scratch.

I've just changed my mind.

I've talked to Thomas and our engineer who's working on the printing system 
for Qt 4.4 and we've come up with a solution. It's hackish, it's ugly, but 
it's the best that can be done with the available time-frame.

Here's the proposal:
1) KPrinter goes away
  It is replaced completely by QPrinter.

2) KPrintDialog goes away
  It is replaced with a function in kdeui that creates and returns a 
QPrintDialog. In KDE 4.0 with Qt 4.3, that function will try to set some 
defaults on the QPrinter that is passed as an argument (defaults loaded from 
KDE's configuration). It will also add some extra tabs if it can.

  A new function is also added that allows the addition of extra dialog pages. 
Here's where it is ugly: this function, in KDE 4.0, will work ONLY on Qt 
4.3.2 on Unix. It will NOT work on Qt 4.3.1 or 4.4.0. It will NOT work on 
Windows or on Mac.

  The KDE 4.1 version of this function -- using Qt 4.4 -- will do the proper 
thing and ask QPrintDialog to add those extra pages in such a way that it 
works in Windows and Mac as well, on their native dialogs.

3) Print to PDF and Print to PS are replaced by menu entries
  This should probably be provided as a whole "Send To" or "Export to" QMenu 
standard action from kdeui, that we can extend with .desktop files or 

  Subject to usability review, I guess.

The big drawback I can see here is that KDE 4.0 will not have print preview. 
I'm sorry, but we can't provide a print preview dialog for Qt 4.3. For 4.4 
it's in our pipeline and should be even better than what we have now. 
(*crosses fingers*).

The rest of the features of print settings should be done on CUPS itself. That 
is, you should add custom printers if you need extra tags, for instance. 
Those things should be supported in the backend, not in the frontend (the 
application). This also includes the ability to print to PDF only a selection 
of pages.

On KDE 4.1, with Qt 4.4, we'll be able to have print previews correctly, but 
that will probably require the applications to be modified to support it. 
Maybe, without modification, it can show a "cruder" print preview dialog that 
is just that: preview what would be printed.

This is the best that we can do given the short notice. The important thing to 
note here printing will work and in all platforms. And it'll have the native 
dialogs on those platforms.

And we won't be duplicating effort. QPrinter will be where the printer backend 
features need to be supported, not in KDE code. Given the lack of maintaining 
kdeprint has had in the past 2 years -- which is what led to this whole 
discussion -- I think it's a wise approach.

  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070914/2921debe/attachment.sig>

More information about the kde-core-devel mailing list