[Kde-print-devel] KDE4 printing: results of IRC meeting
Alex Merry
huntedhacker at tiscali.co.uk
Thu Sep 13 01:30:00 CEST 2007
http://techbase.kde.org/Projects/KDEPrint/Meeting_2007_09_12
http://techbase.kde.org/Projects/KDEPrint/Going_Forward
First of all: the Printing kcm. This partly works and partly doesn't.
It should be noted that, providing it's basically in a usable state for
4.0, we can improve it for 4.1 etc. without a problem, because it's not
bound by BC guarantees.
I'm not sure it shouldn't move to kdebase/workspace, and that would give
us more time to fix it (since kdebase/runtime freezes sooner - I'm
assuming runtime actually freezes on Oct 3rd).
We decided in the meeting that we should go for a solution that relies
heavily on QPrinter/QPrintDialog at this stage.
The two must-have features for 4.0 that Qt doesn't provide (yet) are
print preview and custom dialog options. [We didn't get to discuss too
many technical details in the meeting, unfortunately.]
Print Preview:
TT are working on a cross-platform solution for 4.4. In the
meantime, we can print to a file and use Okular.
Technical considerations:
- we need to know when the printing is finished
- we probably want to make use of Qt 4.4's print preview for
KDE4.1, preferably without requiring any application changes
(or even recompiles)
UI considerations:
- We don't need File->Print Preview to be possible, necessarily,
if the option is available from the printing dialog
The only way I can see of doing this is to subclass QPrinter with a
doPreview(bool) method, which places an intermediate QPaintEngine
between the QPrinter and its internal QPaintEngine that catches the
end() call.
If we don't mind having some API that will be redundant by 4.1,
and possibly resulting inconsistent print previews between apps,
we can have something like my earlier suggestion:
[QK]Printer printer;
KPrintPreview preview(&printer);
doPrint(printer);
preview.exec();
where KPrintPreview sets printer to output to a file in its
constructor, and shows the preview in exec() [this way is
easier to implement].
Extensible print dialog:
We can either implement our own dialog or we can use
QPrintDialog. The latter option is ONLY POSSIBLE IF WE
REQUIRE Qt 4.3.2 OR LATER!!! TT are exporting the
method qt_printdialog_add_extension_tab() in 4.3.2.
This will be proper API in 4.4, but we can use this in the
meantime from a KPrintDialog class.
Note that this won't necessarily help us with the print
preview issue, because the widget can only be added
as a tab.
Thomas Zander would like us to end up using QPrinter and QPrintDialog
exclusively from programs (NB: this does NOT affect the kcm). The only
thing we'd lose in the long run from not having our own KPrinter class
should be arbitrary page selection from with the printing dialog (it's
still possible from within the application - such as checkboxes on a
page thumbnail view: there's a "selection" option in the print dialog).
I think we would gain more than we lost by using QPrintDialog in the
long run, especially as TT seem to be quite aware of its current
shortcomings and are actively fixing it up for Qt4.4.
This is my understanding of the situation. I have the remainder of this
week, limited time next week and an unknown amount of time the week
after to work on this.
One last thing: before people start complaining about loss of
functionality, we have, so far, two coders who know next to nothing
about printing, one or two more with limited time and little knowledge
of the kde print codebase, a printing guru with little knowledge of the
kde print codebase and maintainer who has very little time to spare on
this. And a deadline in three weeks.
Alex
--
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/20070913/8f78d8af/attachment.pgp
More information about the Kde-print-devel
mailing list