no simple way to print a QTextDocument in KDE(?)
Thomas Zander
zander at kde.org
Wed Jul 25 08:00:33 BST 2007
On Wednesday 25 July 2007 04:12:06 Andreas Hartmetz wrote:
> On Wednesday 25 July 2007 03:44:43 Kelly wrote:
> > On Tuesday, July 24, 2007 8:40 pm Andreas Hartmetz wrote:
> > > Can somebody familiar with the matter think of a solution that
> > > works now, or how much stuff would need to be changed to make it
> > > work? One solution might be a KTextDocument that just reimplements
> > > print(), for example. Or KPrinter::printTextDocument() [...]
> >
> > Couldn't you just create a class that inherits KPrinter and keeps a
> > QPrinter variable or vice versa or something like that? I'd suggest
> > inheriting both, but I'm willing to bet there'll be naming conflicts.
>
> Well, both are *big* classes interacting with ten different things
> each,
If I understood right, the best plan would have been to replace one or two
of those things it interacts with, allowing you to keep using QPrinter as
normal.
> There is so much stuff to printing - paper size, page setup, choosing a
> paper tray (yes!), driver options, fonts (use printer fonts or not),
> rasterization, the connection may break, the user may abort, there migh
> be a paper jam etc etc...
And QPrinter supports all of that; its just that a 'nextpage' hook is
needed and some other small things.
It would have been great if someone had the time prior to the freeze to do
the refactoring required to have kdeprint be a factory for a QPrinter
with all the right hooks.
--
Thomas Zander
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070725/7748739a/attachment.sig>
More information about the kde-core-devel
mailing list