Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qprintengine_pdf_p.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
4#ifndef QPRINTENGINE_PDF_P_H
5#define QPRINTENGINE_PDF_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include "QtPrintSupport/qprintengine.h"
19
20#ifndef QT_NO_PRINTER
21#include "QtCore/qdatastream.h"
22#include "QtCore/qmap.h"
23#include "QtCore/qstring.h"
24#include "QtGui/qpaintengine.h"
25#include "QtGui/qpainterpath.h"
26
27#include "private/qfontengine_p.h"
28#include "private/qpdf_p.h"
29#include "private/qpaintengine_p.h"
30#include "qprintengine.h"
31#include "qprint_p.h"
32
34
35class QImage;
36class QDataStream;
37class QPen;
38class QPointF;
39class QRegion;
40class QFile;
41
43
44class Q_PRINTSUPPORT_EXPORT QPdfPrintEngine : public QPdfEngine, public QPrintEngine
45{
46 Q_DECLARE_PRIVATE(QPdfPrintEngine)
47public:
49 virtual ~QPdfPrintEngine();
50
51 // reimplementations QPaintEngine
52 bool begin(QPaintDevice *pdev) override;
53 bool end() override;
54 // end reimplementations QPaintEngine
55
56 // reimplementations QPrintEngine
57 bool abort() override {return false;}
58 QPrinter::PrinterState printerState() const override {return state;}
59
60 bool newPage() override;
61 int metric(QPaintDevice::PaintDeviceMetric) const override;
62 virtual void setProperty(PrintEnginePropertyKey key, const QVariant &value) override;
63 virtual QVariant property(PrintEnginePropertyKey key) const override;
64 // end reimplementations QPrintEngine
65
67
68protected:
70
71private:
72 Q_DISABLE_COPY(QPdfPrintEngine)
73};
74
75class Q_PRINTSUPPORT_EXPORT QPdfPrintEnginePrivate : public QPdfEnginePrivate
76{
77 Q_DECLARE_PUBLIC(QPdfPrintEngine)
78public:
81
82 virtual bool openPrintDevice();
83 virtual void closePrintDevice();
84
85private:
86 Q_DISABLE_COPY(QPdfPrintEnginePrivate)
87
88 friend class QCupsPrintEngine;
90
91 QString printerName;
92 QString printProgram;
93 QString selectionOption;
94
95 bool collate;
96 int copies;
97 QPrinter::PageOrder pageOrder;
98 QPrinter::PaperSource paperSource;
99
100 int fd;
101};
102
104
105#endif // QT_NO_PRINTER
106
107#endif // QPRINTENGINE_PDF_P_H
\inmodule QtCore\reentrant
Definition qdatastream.h:30
\inmodule QtCore
Definition qfile.h:93
\inmodule QtGui
Definition qimage.h:37
QPaintEngineState * state
int metric(QPaintDevice::PaintDeviceMetric metricType) const
Definition qpdf.cpp:1410
bool begin(QPaintDevice *pdev) override
Reimplement this function to initialise your paint engine when painting is to start on the paint devi...
Definition qpdf.cpp:1473
bool newPage()
Definition qpdf.cpp:1329
bool end() override
Reimplement this function to finish painting on the current paint device.
Definition qpdf.cpp:1529
@ Version_1_4
Definition qpdf_p.h:139
QPrinter::PrinterState state
QPrinter::PrinterState printerState() const override
Returns the current state of the printer being used by the print engine.
bool abort() override
Instructs the print engine to abort the printing process.
\inmodule QtGui
Definition qpen.h:25
\inmodule QtCore\reentrant
Definition qpoint.h:214
\reentrant
\reentrant
Definition qprinter.h:28
PrinterMode
This enum describes the mode the printer should work in.
Definition qprinter.h:31
PrinterState
\value Idle \value Active \value Aborted \value Error
Definition qprinter.h:64
The QRegion class specifies a clip region for a painter.
Definition qregion.h:27
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
\inmodule QtCore
Definition qvariant.h:64
object setProperty("down", true)
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
const GLfloat * m
GLuint64 key
GLuint64 GLenum GLint fd
GLfloat GLfloat p
[1]
const char property[13]
Definition qwizard.cpp:101