20#include "klpdprinterimpl.h"
24#include <tdestandarddirs.h>
27KLpdPrinterImpl::KLpdPrinterImpl(TQObject *parent,
const char *name)
28: KPrinterImpl(parent,name)
32KLpdPrinterImpl::~KLpdPrinterImpl()
36TQString KLpdPrinterImpl::executable()
38 return TDEStandardDirs::findExe(
"lpr");
41bool 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().