Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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 QPrinter::ColorMode printerColorMode() const;
83
84 virtual bool openPrintDevice();
85 virtual void closePrintDevice();
86
87private:
88 Q_DISABLE_COPY(QPdfPrintEnginePrivate)
89
90 friend class QCupsPrintEngine;
92
93 QString printerName;
94 QString printProgram;
95 QString selectionOption;
96
97 bool collate;
98 int copies;
99 QPrinter::PageOrder pageOrder;
100 QPrinter::PaperSource paperSource;
101
102 int fd;
103};
104
106
107#endif // QT_NO_PRINTER
108
109#endif // QPRINTENGINE_PDF_P_H
\inmodule QtCore\reentrant
Definition qdatastream.h:46
\inmodule QtCore
Definition qfile.h:93
\inmodule QtGui
Definition qimage.h:37
@ Version_1_4
Definition qpdf_p.h:135
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:28
\inmodule QtCore\reentrant
Definition qpoint.h:217
\reentrant
\reentrant
Definition qprinter.h:28
ColorMode
This enum type is used to indicate whether QPrinter should print in color or not.
Definition qprinter.h:42
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:129
\inmodule QtCore
Definition qvariant.h:65
else opt state
[0]
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
const GLfloat * m
GLuint64 key
GLuint GLuint end
GLuint64 GLenum GLint fd
GLfloat GLfloat p
[1]
QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator begin(const QRegularExpressionMatchIterator &iterator)
const char property[13]
Definition qwizard.cpp:101
args<< 1<< 2;QJSValue threeAgain=fun.call(args);QString fileName="helloworld.qs";QFile scriptFile(fileName);if(!scriptFile.open(QIODevice::ReadOnly)) QTextStream stream(&scriptFile);QString contents=stream.readAll();scriptFile.close();myEngine.evaluate(contents, fileName);myEngine.globalObject().setProperty("myNumber", 123);...QJSValue myNumberPlusOne=myEngine.evaluate("myNumber + 1");QJSValue result=myEngine.evaluate(...);if(result.isError()) qDebug()<< "Uncaught exception at line"<< result.property("lineNumber").toInt()<< ":"<< result.toString();QPushButton *button=new QPushButton;QJSValue scriptButton=myEngine.newQObject(button);myEngine.globalObject().setProperty("button", scriptButton);myEngine.evaluate("button.checkable = true");qDebug()<< scriptButton.property("checkable").toBool();scriptButton.property("show").call();QJSEngine engine;QObject *myQObject=new QObject();myQObject- setProperty)("dynamicProperty", 3)