kextprinterimpl.cpp
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 #include "kextprinterimpl.h"
00021 #include "kprinter.h"
00022 
00023 #include <qfile.h>
00024 #include <kstandarddirs.h>
00025 #include <kconfig.h>
00026 #include <klocale.h>
00027 
00028 KExtPrinterImpl::KExtPrinterImpl(QObject *parent, const char *name, const QStringList & )
00029 : KPrinterImpl(parent,name)
00030 {
00031 }
00032 
00033 KExtPrinterImpl::~KExtPrinterImpl()
00034 {
00035 }
00036 
00037 void KExtPrinterImpl::preparePrinting(KPrinter *printer)
00038 {
00039     printer->setOption("kde-qtcopies",QString::number(printer->numCopies()));
00040 }
00041 
00042 bool KExtPrinterImpl::setupCommand(QString& cmd, KPrinter *printer)
00043 {
00044     cmd = printer->option("kde-printcommand").stripWhiteSpace();
00045     if (cmd.isEmpty())
00046     {
00047         printer->setErrorMessage(i18n("Empty print command."));
00048         return false;
00049     }
00050 
00051     return true;
00052 }
 
This file is part of the documentation for kdeprint Library Version 3.2.0.