Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qprinter_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 QPRINTER_P_H
5#define QPRINTER_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
19#include <QtPrintSupport/private/qtprintsupportglobal_p.h>
20
21#ifndef QT_NO_PRINTER
22
23#include "QtPrintSupport/qprinter.h"
24#include "QtPrintSupport/qprinterinfo.h"
25#include "QtPrintSupport/qprintengine.h"
26#include "QtCore/qpointer.h"
27#include "QtCore/qset.h"
28
29#include <limits.h>
30
32
33class QPrintEngine;
35class QPicture;
36
37class Q_PRINTSUPPORT_EXPORT QPrinterPrivate
38{
39 Q_DECLARE_PUBLIC(QPrinter)
40public:
42 : pdfVersion(QPrinter::PdfVersion_1_4),
43 printEngine(nullptr),
44 paintEngine(nullptr),
45 realPrintEngine(nullptr),
46 realPaintEngine(nullptr),
47#if QT_CONFIG(printpreviewwidget)
48 previewEngine(nullptr),
49#endif
50 q_ptr(printer),
51 printRange(QPrinter::AllPages),
52 use_default_engine(true),
53 validPrinter(false)
54 {
55 }
56
58
59 }
60
61 static QPrinterPrivate *get(QPrinter *printer) {
62 return printer->d_ptr.get();
63 }
64
65 void init(const QPrinterInfo &printer, QPrinter::PrinterMode mode);
66
67 QPrinterInfo findValidPrinter(const QPrinterInfo &printer = QPrinterInfo());
68 void initEngines(QPrinter::OutputFormat format, const QPrinterInfo &printer);
69 void changeEngines(QPrinter::OutputFormat format, const QPrinterInfo &printer);
70#if QT_CONFIG(printpreviewwidget)
71 QList<const QPicture *> previewPages() const;
72 void setPreviewMode(bool);
73#endif
74
76
82
85#if QT_CONFIG(printpreviewwidget)
86 QPreviewPaintEngine *previewEngine;
87#endif
88
90
92
95
98
99 // Used to remember which properties have been manually set by the user.
101};
102
104
105#endif // QT_NO_PRINTER
106
107#endif // QPRINTER_P_H
Definition qlist.h:74
PdfVersion
The PdfVersion enum describes the version of the PDF file that is produced by QPrinter or QPdfWriter.
\inmodule QtGui
The QPicture class is a paint device that records and replays QPainter commands.
Definition qpicture.h:19
\reentrant
PrintEnginePropertyKey
This enum is used to communicate properties between the print engine and QPrinter.
The QPrinterInfo class gives access to information about existing printers.
uint use_default_engine
Definition qprinter_p.h:93
QPrinter * q_ptr
Definition qprinter_p.h:89
QPrinter::PdfVersion pdfVersion
Definition qprinter_p.h:79
QPrinter::OutputFormat outputFormat
Definition qprinter_p.h:78
uint had_default_engines
Definition qprinter_p.h:94
QPrinter::PrinterMode printerMode
Definition qprinter_p.h:77
QSet< QPrintEngine::PrintEnginePropertyKey > m_properties
Definition qprinter_p.h:100
QPrintEngine * printEngine
Definition qprinter_p.h:80
QPaintEngine * realPaintEngine
Definition qprinter_p.h:84
QPaintEngine * paintEngine
Definition qprinter_p.h:81
QPrintEngine * realPrintEngine
Definition qprinter_p.h:83
QPrinterPrivate(QPrinter *printer)
Definition qprinter_p.h:41
static QPrinterPrivate * get(QPrinter *printer)
Definition qprinter_p.h:61
uint hasCustomPageMargins
Definition qprinter_p.h:97
QPrinter::PrintRange printRange
Definition qprinter_p.h:91
\reentrant
Definition qprinter.h:28
OutputFormat
The OutputFormat enum is used to describe the format QPrinter should use for printing.
Definition qprinter.h:69
PrinterMode
This enum describes the mode the printer should work in.
Definition qprinter.h:31
PrintRange
Used to specify the print range selection option.
Definition qprinter.h:72
T * get() const noexcept
Definition qset.h:18
\inmodule QtCore
Definition qvariant.h:64
object setProperty("down", true)
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLenum mode
GLuint64 key
GLint GLsizei GLsizei GLenum format
#define QT_CONFIG(feature)
static QT_BEGIN_NAMESPACE void init(QTextBoundaryFinder::BoundaryType type, QStringView str, QCharAttributes *attributes)
unsigned int uint
Definition qtypes.h:29
if(qFloatDistance(a, b)<(1<< 7))
[0]
QObject::connect nullptr