KDEPrint code cleanup

Dominik Seichter domseichter at web.de
Fri Aug 1 11:02:56 BST 2003

Am Freitag, 1. August 2003 11:47 schrieb Michael Goffioul:
> > In KBarcode I use the header kdepint/kmmanager.h and the classes
> > KMManager and KMPrinter. As the header was installed as default, I
> > thought it was part of the public API and I could use it. If you rename
> > KMManager this would break KBarcode. So I object therefore.
> >
> > Both above mentioned classes are needed in KBarcode so that the user can
> > specify a printer name as commandline option and KBarcode can print to
> > it. Maybe this can also be done without using this classes, but I have no
> > idea how to do it.
> Indeed, those classes are not intended to be used outside KDEPrint.
> They have been installed for the only purpose to split KDEPrint's
> code into pieces (in kdelibs and kdebase). That's why they are not
> documented as KPrinter and KPrintDialog are.
> Just a dumb question then: why don't you use the regular mechanism
> for printer selection using the print dialog?
Because one shall be able to use KBarcode in batch printing mode. One can do 
"kbarcode -b datafile.cvs -l label.kbarcode -d MyPrinter" to print lot's of 
labels in batchmode on the printer MyPrinter. So the printer can be selected 
without opening a dialog. I have seen no other way to do this.

The KBarcode source code could of course be fixed with some #ifdef's so that 
compiling will work even against every KDE versions, but old binaries would 
be broken.

CU Dom
Dominik Seichter - domseichter at web.de
Krename - http://www.krename.net
KBarcode - http://www.kbarcode.net

More information about the kde-core-devel mailing list