kprinterimpl.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KPRINTERIMPL_H
00022 #define KPRINTERIMPL_H
00023
00024 #include <qobject.h>
00025 #include <qstringlist.h>
00026 #include <qmap.h>
00027 #include <qptrlist.h>
00028
00029 #include <kdelibs_export.h>
00030
00031 class KPrinter;
00032 class KMPrinter;
00033
00034 class KDEPRINT_EXPORT KPrinterImpl : public QObject
00035 {
00036 Q_OBJECT
00037 public:
00038 KPrinterImpl(QObject *parent = 0, const char *name = 0);
00039 virtual ~KPrinterImpl();
00040
00041 virtual bool setupCommand(QString& cmd, KPrinter*);
00042 virtual void preparePrinting(KPrinter*);
00043 virtual void broadcastOption(const QString& key, const QString& value);
00044
00045 bool printFiles(KPrinter*, const QStringList&, bool removeflag = false);
00046
00047
00048
00049
00050 int filterFiles(KPrinter*, QStringList&, bool removeflag = false);
00051 int autoConvertFiles(KPrinter*, QStringList&, bool removeflag = false);
00052 void saveOptions(const QMap<QString,QString>& opts);
00053 const QMap<QString,QString>& loadOptions() const { return m_options; }
00054 QString tempFile();
00055 QString quote(const QString&);
00056 void statusMessage(const QString&, KPrinter* = 0);
00057
00058 protected:
00059 bool startPrinting(const QString& cmd, KPrinter *printer, const QStringList& files, bool removeflag = false);
00060 int dcopPrint(const QString& cmd, const QStringList& files, bool removeflag = false);
00061 bool setupSpecialCommand(QString&, KPrinter*, const QStringList&);
00062 int doFilterFiles(KPrinter* pr, QStringList& files, const QStringList& flist, const QMap<QString,QString>& opts, bool removeflag = false);
00063 void loadAppOptions();
00064 void saveAppOptions();
00065
00066 protected:
00067 QMap<QString,QString> m_options;
00068 };
00069
00070 #endif
|