Back to index

scribus-ng  1.3.4.dfsg+svn20071115
scwinprint.h
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 #ifndef __SCWINPRINT_H__
00008 #define __SCWINPRINT_H__
00009 
00010 #include "qimage.h"
00011 #include "scconfig.h"
00012 #include "scribusdoc.h"
00013 #include "scribusstructs.h"
00014 #include <windows.h>
00015 
00016 class ScWinPrint : public QObject
00017 {
00018        Q_OBJECT
00019 
00020 protected:
00021 
00022        bool m_abort;
00023 
00024        void resetData(void);
00025 
00026        typedef bool (ScWinPrint::*PrintPageFunc) ( ScribusDoc* doc, Page* page, PrintOptions& options, HDC printerDC, DEVMODE* devMode );
00027 
00038        bool printPages( ScribusDoc* doc, PrintOptions& options, HDC printerDC, DEVMODE* devMode, QCString& fileName, bool forceGDI = false );
00050        bool printPage_GDI ( ScribusDoc* doc, Page* page, PrintOptions& options, HDC printerDC, DEVMODE* devMode );
00062        bool printPage_PS  ( ScribusDoc* doc, Page* page, PrintOptions& options, HDC printerDC, DEVMODE* devMode );
00072        bool sendPSFile ( QString filePath, HDC printerDC, int pageWidth, int pageHeight );
00079        void setDeviceParams ( ScribusDoc* doc, PrintOptions& options, DEVMODE* devMode );
00086        int getPSPassthroughSupport( HDC printerDC );
00092        bool printerUseFilePort ( QString& printerName );
00098        bool isPostscriptPrinter( HDC dc );
00099 
00100 protected slots:
00101        void cancelRequested(void);
00102 
00103 public:
00104 
00105        ScWinPrint(void);
00106 
00115        bool print( ScribusDoc* doc, PrintOptions& options, QByteArray& devMode, bool forceGDI = false );
00116 
00126        bool gdiPrintPreview( ScribusDoc* doc, Page* page, QImage* image, PrintOptions& options, double scale = 1.0 );
00127 
00132        static QString getDefaultPrinter( void );
00133 };
00134 
00135 #endif