20 #include "klpdprinterimpl.h"
24 #include <kstandarddirs.h>
25 #include <tdelocale.h>
27 KLpdPrinterImpl::KLpdPrinterImpl(TQObject *parent,
const char *name)
28 : KPrinterImpl(parent,name)
32 KLpdPrinterImpl::~KLpdPrinterImpl()
36 TQString KLpdPrinterImpl::executable()
38 return TDEStandardDirs::findExe(
"lpr");
41 bool KLpdPrinterImpl::setupCommand(TQString& cmd,
KPrinter *printer)
43 TQString exestr = executable();
46 printer->
setErrorMessage(i18n(
"The <b>%1</b> executable could not be found in your path. Check your installation.").arg(
"lpr"));
49 cmd = TQString::fromLatin1(
"%1 -P %2 '-#%3'").arg(exestr).arg(quote(printer->
printerName())).arg(printer->
numCopies());
This class is the main interface to access the TDE print framework.
void setErrorMessage(const TQString &msg)
Sets the last error message.
TQString printerName() const
See TQPrinter::printerName().
int numCopies() const
See TQPrinter::numCopies().