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

List:       kde-core-devel
Subject:    Re: New KDE printing system
From:       Michael Goffioul <goffioul () imec ! be>
Date:       2001-02-28 14:07:48
[Download RAW message or body]

Guillaume Laurent wrote:

> On Wednesday 28 February 2001 14:33, Michael Goffioul wrote:
>
> > Briefly said, a KPrinter object is NOT a real printer, it is an interface
> > between the Qt drawing primitives and a real printer, the latter being
> > configurable.
>
> OK, but as long as there is no restriction in using several ones, there's no
> need to wrap KFactory. If there is, make KPrinter a singleton.

There's no theoretical restriction in having several KPrinter objects, however
you need to use the factory to create them. As the factory is a singleton and
only contains one printer object, you will only have one KPrinter object also.
I'm using this scheme because the KPrinter class is an abstract class, the
real objects are like KCupsPrinter, KLpdPrinter, ... You can't instantiate
a KPrinter object. In fact you shouldn't: the real printing work is done in
subclasses, a KPrinter object doesn't do anything useful. The factory is
there to create the real object according to the user settings.

Is this a problem ?

Michael.

--
------------------------------------------------------------------
Michael Goffioul                IMEC-DESICS-MIRA
e-mail: goffioul@imec.be        (Mixed-Signal and RF Applications)
Tel:    +32/16/28-8510          Kapeldreef, 75
Fax:    +32/16/28-1515          3001 HEVERLEE, BELGIUM
------------------------------------------------------------------

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

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