[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Printing: KPrintPreview
From:       Alex Merry <huntedhacker () tiscali ! co ! uk>
Date:       2007-10-05 13:44:22
Message-ID: 200710051444.27875.huntedhacker () tiscali ! co ! uk
[Download RAW message or body]


On Monday 24 Sep 2007, Alex Merry wrote:
> I have here a working KPrintPreview class.  It's a KDialog, and is
> used as follows:
>
> QPrinter printer;
> KPrintPreview preview(&printer, this); // where "this" is a QWidget
> doSomePrinting(printer);
> preview.exec();

> I temporarily named the library kdeprint2, so as not to interfere
> with kdeprint.

I'm going to put it into kutils, if that's OK.  It seems stupid to have 
a library just for one class.  If people think it should go elsewhere 
(such as kdeui), then I don't object to it being moved.  Bear in mind 
that it depends on libkparts.

I don't have time to do any porting.  It should be a reasonably 
straightforward job if the application is well-designed.  Look at 
http://doc.trolltech.com/4.3/printing.html to see how the Qt4 printing 
system works.  Basically, use QPrinter rather than KPrinter, and 
QPrintDialog instead of KPrinter::setup().

Also, until there is a method for getting a QPrintDialog with an extra 
widget, you'll have to disable any additional pages.  They might 
require more involved porting anyway.

If anyone is up for adding at least an API for a customised QPrintDialog 
today, that would be great.  Then applications can be ported and 
hopefully start working when it is implemented (and when using Qt 
4.3.2+).

Alex



-- 
KDE: http://www.kde.org
Ubuntu/Kubuntu: http://www.ubuntu.org http://www.kubuntu.org

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic