File indexing completed on 2026-09-19 09:34:03
0001
0002
0003
0004
0005 #ifndef QPRINTENGINE_H
0006 #define QPRINTENGINE_H
0007
0008 #include <QtPrintSupport/qtprintsupportglobal.h>
0009 #include <QtCore/qvariant.h>
0010 #include <QtPrintSupport/qprinter.h>
0011
0012
0013 Q_DECLARE_METATYPE(QMarginsF)
0014
0015 QT_BEGIN_NAMESPACE
0016
0017
0018 #ifndef QT_NO_PRINTER
0019
0020 class Q_PRINTSUPPORT_EXPORT QPrintEngine
0021 {
0022 public:
0023 virtual ~QPrintEngine();
0024
0025 enum PrintEnginePropertyKey {
0026 PPK_CollateCopies,
0027 PPK_ColorMode,
0028 PPK_Creator,
0029 PPK_DocumentName,
0030 PPK_FullPage,
0031 PPK_NumberOfCopies,
0032 PPK_Orientation,
0033 PPK_OutputFileName,
0034 PPK_PageOrder,
0035 PPK_PageRect,
0036 PPK_PageSize,
0037 PPK_PaperRect,
0038 PPK_PaperSource,
0039 PPK_PrinterName,
0040 PPK_PrinterProgram,
0041 PPK_Resolution,
0042 PPK_SelectionOption,
0043 PPK_SupportedResolutions,
0044
0045 PPK_WindowsPageSize,
0046 PPK_FontEmbedding,
0047
0048 PPK_Duplex,
0049
0050 PPK_PaperSources,
0051 PPK_CustomPaperSize,
0052 PPK_PageMargins,
0053 PPK_CopyCount,
0054 PPK_SupportsMultipleCopies,
0055 PPK_PaperName,
0056 PPK_QPageSize,
0057 PPK_QPageMargins,
0058 PPK_QPageLayout,
0059 PPK_PaperSize = PPK_PageSize,
0060
0061 PPK_CustomBase = 0xff00
0062 };
0063
0064 virtual void setProperty(PrintEnginePropertyKey key, const QVariant &value) = 0;
0065 virtual QVariant property(PrintEnginePropertyKey key) const = 0;
0066
0067 virtual bool newPage() = 0;
0068 virtual bool abort() = 0;
0069
0070 virtual int metric(QPaintDevice::PaintDeviceMetric) const = 0;
0071
0072 virtual QPrinter::PrinterState printerState() const = 0;
0073 };
0074
0075 #endif
0076
0077 QT_END_NAMESPACE
0078
0079 #endif