Go to the
documentation of this file.
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #ifndef QPRINTENGINE_H
00043 #define QPRINTENGINE_H
00044
00045 #include <QtCore/qvariant.h>
00046 #include <QtGui/qprinter.h>
00047
00048 QT_BEGIN_HEADER
00049
00050 QT_BEGIN_NAMESPACE
00051
00052 QT_MODULE(Gui)
00053
00054 #ifndef QT_NO_PRINTER
00055
00056 class Q_GUI_EXPORT QPrintEngine
00057 {
00058 public:
00059 virtual ~QPrintEngine() {}
00060 enum PrintEnginePropertyKey {
00061 PPK_CollateCopies,
00062 PPK_ColorMode,
00063 PPK_Creator,
00064 PPK_DocumentName,
00065 PPK_FullPage,
00066 PPK_NumberOfCopies,
00067 PPK_Orientation,
00068 PPK_OutputFileName,
00069 PPK_PageOrder,
00070 PPK_PageRect,
00071 PPK_PageSize,
00072 PPK_PaperRect,
00073 PPK_PaperSource,
00074 PPK_PrinterName,
00075 PPK_PrinterProgram,
00076 PPK_Resolution,
00077 PPK_SelectionOption,
00078 PPK_SupportedResolutions,
00079
00080 PPK_WindowsPageSize,
00081 PPK_FontEmbedding,
00082 PPK_SuppressSystemPrintStatus,
00083
00084 PPK_Duplex,
00085
00086 PPK_PaperSources,
00087 PPK_CustomPaperSize,
00088 PPK_PageMargins,
00089 PPK_CopyCount,
00090 PPK_SupportsMultipleCopies,
00091 PPK_PaperSize = PPK_PageSize,
00092
00093 PPK_CustomBase = 0xff00
00094 };
00095
00096 virtual void setProperty(PrintEnginePropertyKey key, const QVariant &value) = 0;
00097 virtual QVariant property(PrintEnginePropertyKey key) const = 0;
00098
00099 virtual bool newPage() = 0;
00100 virtual bool abort() = 0;
00101
00102 virtual int metric(QPaintDevice::PaintDeviceMetric) const = 0;
00103
00104 virtual QPrinter::PrinterState printerState() const = 0;
00105
00106 #ifdef Q_WS_WIN
00107 virtual HDC getPrinterDC() const { return 0; }
00108 virtual void releasePrinterDC(HDC) const { }
00109 #endif
00110
00111 };
00112
00113 #endif // QT_NO_PRINTER
00114
00115 QT_END_NAMESPACE
00116
00117 QT_END_HEADER
00118
00119 #endif // QPRINTENGINE_H