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
31
QT_BEGIN_NAMESPACE
32
33
class
QPrintEngine
;
34
class
QPreviewPaintEngine
;
35
class
QPicture
;
36
37
class
Q_PRINTSUPPORT_EXPORT
QPrinterPrivate
38
{
39
Q_DECLARE_PUBLIC(
QPrinter
)
40
public
:
41
QPrinterPrivate
(
QPrinter
*printer)
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
57
~QPrinterPrivate
() {
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
75
void
setProperty
(
QPrintEngine::PrintEnginePropertyKey
key
,
const
QVariant
&
value
);
76
77
QPrinter::PrinterMode
printerMode
;
78
QPrinter::OutputFormat
outputFormat
;
79
QPrinter::PdfVersion
pdfVersion
;
80
QPrintEngine
*
printEngine
;
81
QPaintEngine
*
paintEngine
;
82
83
QPrintEngine
*
realPrintEngine
;
84
QPaintEngine
*
realPaintEngine
;
85
#if QT_CONFIG(printpreviewwidget)
86
QPreviewPaintEngine
*previewEngine;
87
#endif
88
89
QPrinter
*
q_ptr
;
90
91
QPrinter::PrintRange
printRange
;
92
93
uint
use_default_engine
: 1;
94
uint
had_default_engines
: 1;
95
96
uint
validPrinter
: 1;
97
uint
hasCustomPageMargins
: 1;
98
99
// Used to remember which properties have been manually set by the user.
100
QSet<QPrintEngine::PrintEnginePropertyKey>
m_properties
;
101
};
102
103
QT_END_NAMESPACE
104
105
#endif
// QT_NO_PRINTER
106
107
#endif
// QPRINTER_P_H
QList
Definition
qlist.h:74
QPagedPaintDevice::PdfVersion
PdfVersion
The PdfVersion enum describes the version of the PDF file that is produced by QPrinter or QPdfWriter.
Definition
qpagedpaintdevice.h:28
QPaintEngine
\inmodule QtGui
Definition
qpaintengine.h:51
QPicture
The QPicture class is a paint device that records and replays QPainter commands.
Definition
qpicture.h:19
QPreviewPaintEngine
Definition
qpaintengine_preview_p.h:30
QPrintEngine
\reentrant
Definition
qprintengine.h:20
QPrintEngine::PrintEnginePropertyKey
PrintEnginePropertyKey
This enum is used to communicate properties between the print engine and QPrinter.
Definition
qprintengine.h:23
QPrinterInfo
The QPrinterInfo class gives access to information about existing printers.
Definition
qprinterinfo.h:22
QPrinterPrivate
Definition
qprinter_p.h:38
QPrinterPrivate::use_default_engine
uint use_default_engine
Definition
qprinter_p.h:93
QPrinterPrivate::q_ptr
QPrinter * q_ptr
Definition
qprinter_p.h:89
QPrinterPrivate::validPrinter
uint validPrinter
Definition
qprinter_p.h:96
QPrinterPrivate::pdfVersion
QPrinter::PdfVersion pdfVersion
Definition
qprinter_p.h:79
QPrinterPrivate::outputFormat
QPrinter::OutputFormat outputFormat
Definition
qprinter_p.h:78
QPrinterPrivate::had_default_engines
uint had_default_engines
Definition
qprinter_p.h:94
QPrinterPrivate::printerMode
QPrinter::PrinterMode printerMode
Definition
qprinter_p.h:77
QPrinterPrivate::m_properties
QSet< QPrintEngine::PrintEnginePropertyKey > m_properties
Definition
qprinter_p.h:100
QPrinterPrivate::~QPrinterPrivate
~QPrinterPrivate()
Definition
qprinter_p.h:57
QPrinterPrivate::printEngine
QPrintEngine * printEngine
Definition
qprinter_p.h:80
QPrinterPrivate::realPaintEngine
QPaintEngine * realPaintEngine
Definition
qprinter_p.h:84
QPrinterPrivate::paintEngine
QPaintEngine * paintEngine
Definition
qprinter_p.h:81
QPrinterPrivate::realPrintEngine
QPrintEngine * realPrintEngine
Definition
qprinter_p.h:83
QPrinterPrivate::QPrinterPrivate
QPrinterPrivate(QPrinter *printer)
Definition
qprinter_p.h:41
QPrinterPrivate::get
static QPrinterPrivate * get(QPrinter *printer)
Definition
qprinter_p.h:61
QPrinterPrivate::hasCustomPageMargins
uint hasCustomPageMargins
Definition
qprinter_p.h:97
QPrinterPrivate::printRange
QPrinter::PrintRange printRange
Definition
qprinter_p.h:91
QPrinter
\reentrant
Definition
qprinter.h:28
QPrinter::OutputFormat
OutputFormat
The OutputFormat enum is used to describe the format QPrinter should use for printing.
Definition
qprinter.h:69
QPrinter::PrinterMode
PrinterMode
This enum describes the mode the printer should work in.
Definition
qprinter.h:31
QPrinter::PrintRange
PrintRange
Used to specify the print range selection option.
Definition
qprinter.h:72
QScopedPointer::get
T * get() const noexcept
Definition
qscopedpointer.h:110
QSet
Definition
qset.h:18
QVariant
\inmodule QtCore
Definition
qvariant.h:64
setProperty
object setProperty("down", true)
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1545
value
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
Definition
qeglstreamconvenience_p.h:46
mode
GLenum mode
Definition
qopengles2ext.h:333
key
GLuint64 key
Definition
qopengles2ext.h:2268
format
GLint GLsizei GLsizei GLenum format
Definition
qopengles2ext.h:206
QT_CONFIG
#define QT_CONFIG(feature)
Definition
qtconfigmacros.h:65
init
static QT_BEGIN_NAMESPACE void init(QTextBoundaryFinder::BoundaryType type, QStringView str, QCharAttributes *attributes)
Definition
qtextboundaryfinder.cpp:10
uint
unsigned int uint
Definition
qtypes.h:29
if
if(qFloatDistance(a, b)<(1<< 7))
[0]
Definition
src_corelib_global_qnumeric.cpp:5
nullptr
QObject::connect nullptr
Definition
src_corelib_kernel_qobject.cpp:255
false
return false
Definition
src_corelib_thread_qatomic.cpp:23
qtbase
src
printsupport
kernel
qprinter_p.h
Generated by
1.9.7