tdeprint
kprinterimpl.h
00001
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 <tqobject.h>
00025 #include <tqstringlist.h>
00026 #include <tqmap.h>
00027 #include <tqptrlist.h>
00028
00029 #include <tdelibs_export.h>
00030
00031 class KPrinter;
00032 class KMPrinter;
00033
00034 class TDEPRINT_EXPORT KPrinterImpl : public TQObject
00035 {
00036 Q_OBJECT
00037 public:
00038 KPrinterImpl(TQObject *parent = 0, const char *name = 0);
00039 virtual ~KPrinterImpl();
00040
00041 virtual bool setupCommand(TQString& cmd, KPrinter*);
00042 virtual void preparePrinting(KPrinter*);
00043 virtual void broadcastOption(const TQString& key, const TQString& value);
00044
00045 bool printFiles(KPrinter*, const TQStringList&, bool removeflag = false);
00046
00047
00048
00049
00050 int filterFiles(KPrinter*, TQStringList&, bool removeflag = false);
00051 int autoConvertFiles(KPrinter*, TQStringList&, bool removeflag = false);
00052 void saveOptions(const TQMap<TQString,TQString>& opts);
00053 const TQMap<TQString,TQString>& loadOptions() const { return m_options; }
00054 TQString tempFile();
00055 TQString quote(const TQString&);
00056 void statusMessage(const TQString&, KPrinter* = 0);
00057
00058 protected:
00059 bool startPrinting(const TQString& cmd, KPrinter *printer, const TQStringList& files, bool removeflag = false);
00060 int dcopPrint(const TQString& cmd, const TQStringList& files, bool removeflag = false);
00061 bool setupSpecialCommand(TQString&, KPrinter*, const TQStringList&);
00062 int doFilterFiles(KPrinter* pr, TQStringList& files, const TQStringList& flist, const TQMap<TQString,TQString>& opts, bool removeflag = false);
00063 void loadAppOptions();
00064 void saveAppOptions();
00065
00066 protected:
00067 TQMap<TQString,TQString> m_options;
00068 };
00069
00070 #endif