Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qprintengine.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QPRINTENGINE_H
6#define QPRINTENGINE_H
7
8#include <QtPrintSupport/qtprintsupportglobal.h>
9#include <QtCore/qvariant.h>
10#include <QtPrintSupport/qprinter.h>
11
12// ### move to qmargins.h
13Q_DECLARE_METATYPE(QMarginsF)
14
15QT_BEGIN_NAMESPACE
16
17
18#ifndef QT_NO_PRINTER
19
20class Q_PRINTSUPPORT_EXPORT QPrintEngine
21{
22public:
23 virtual ~QPrintEngine();
24
25 enum PrintEnginePropertyKey {
26 PPK_CollateCopies,
27 PPK_ColorMode,
28 PPK_Creator,
29 PPK_DocumentName,
30 PPK_FullPage,
31 PPK_NumberOfCopies,
32 PPK_Orientation,
33 PPK_OutputFileName,
34 PPK_PageOrder,
35 PPK_PageRect,
36 PPK_PageSize,
37 PPK_PaperRect,
38 PPK_PaperSource,
39 PPK_PrinterName,
40 PPK_PrinterProgram,
41 PPK_Resolution,
42 PPK_SelectionOption,
43 PPK_SupportedResolutions,
44
45 PPK_WindowsPageSize,
46 PPK_FontEmbedding,
47
48 PPK_Duplex,
49
50 PPK_PaperSources,
51 PPK_CustomPaperSize,
52 PPK_PageMargins,
53 PPK_CopyCount,
54 PPK_SupportsMultipleCopies,
55 PPK_PaperName,
56 PPK_QPageSize,
57 PPK_QPageMargins,
58 PPK_QPageLayout,
59 PPK_PaperSize = PPK_PageSize,
60
61 PPK_CustomBase = 0xff00
62 };
63
64 virtual void setProperty(PrintEnginePropertyKey key, const QVariant &value) = 0;
65 virtual QVariant property(PrintEnginePropertyKey key) const = 0;
66
67 virtual bool newPage() = 0;
68 virtual bool abort() = 0;
69
70 virtual int metric(QPaintDevice::PaintDeviceMetric) const = 0;
71
72 virtual QPrinter::PrinterState printerState() const = 0;
73};
74
75#endif // QT_NO_PRINTER
76
77QT_END_NAMESPACE
78
79#endif // QPRINTENGINE_H
bool begin(QPaintDevice *pdev) override
Reimplement this function to initialise your paint engine when painting is to start on the paint devi...
bool end() override
Reimplement this function to finish painting on the current paint device.
QVariant property(PrintEnginePropertyKey key) const override
Returns the print engine's property specified by key.
void setProperty(PrintEnginePropertyKey key, const QVariant &value) override
Sets the print engine's property specified by key to the given value.
~QOhosPdfPrintEngine() override
\inmodule QtCore\reentrant
Definition qpoint.h:232
Combined button and popup list for selecting options.