/* * UBImportVirtualPrinter.h * * Created on: 18 mars 2009 * Author: Julien */ #ifndef UBIMPORTVIRTUALPRINTER_H_ #define UBIMPORTVIRTUALPRINTER_H_ #include #include "UBImportAdaptor.h" #include "document/UBDocumentProxy.h" /** * This class import ini file that are generated by Uniboard Printer. */ class UBImportVirtualPrinter: public UBImportAdaptor { Q_OBJECT; public: UBImportVirtualPrinter(QObject *parent = 0); virtual ~UBImportVirtualPrinter(); // this is the name of the default printer that must be reset after importing from virtual printer. // this allow other import adaptor to backup default printer, then set Uniboard printer as default printer and launch the // print. Then when uniboard will import the file from virtual printer, it will reset the default printer to this one. static QString sOriginalDefaultPrintername; /** * The document expecting to be merged with incoming data */ static QPointer pendingDocument; virtual QStringList supportedExtentions(); virtual QString importFileFilter(); virtual UBDocumentProxy* importFile(const QFile& pFile, const QString& pGroup); virtual bool addFileToDocument(UBDocumentProxy* pDocument, const QFile& pFile); private: QString pdfFileName(const QFile& pFile); QStringList emfFileNames(const QFile& pFile); void cleanUp(const QFile& pFile, const QString& pPdfFileName, QStringList pEmfFilenames); }; #endif /* UBIMPORTVIRTUALPRINTER_H_ */