Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qprint_p.h
Go to the documentation of this file.
1
// Copyright (C) 2022 The Qt Company Ltd.
2
// Copyright (C) 2014 John Layt <jlayt@kde.org>
3
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
// Qt-Security score:significant reason:default
5
6
#
ifndef
QPRINT_P_H
7
#
define
QPRINT_P_H
8
9
//
10
// W A R N I N G
11
// -------------
12
//
13
// This file is not part of the Qt API. It exists purely as an
14
// implementation detail. This header file may change from version to
15
// version without notice, or even be removed.
16
//
17
// We mean it.
18
//
19
20
#
include
<
QtPrintSupport
/
private
/
qtprintsupportglobal_p
.
h
>
21
#
include
<
QtPrintSupport
/
qprinter
.
h
>
22
23
#
include
<
QtCore
/
qstring
.
h
>
24
#
include
<
QtCore
/
qlist
.
h
>
25
26
#
if
(
defined
Q_OS_MACOS
)
||
(
defined
Q_OS_UNIX
&&
QT_CONFIG
(
cups
)
)
27
#
include
<
cups
/
ppd
.
h
>
// Use for type defs only, don't want to actually link in main module
28
// ### QT_DECL_METATYPE_EXTERN_TAGGED once there's a qprint.cpp TU
29
Q_DECLARE_METATYPE
(
ppd_file_t
*)
30
#
endif
31
32
QT_BEGIN_NAMESPACE
33
34
#
ifndef
QT_NO_PRINTER
35
36
// From windgdi.h
37
#
define
DMBIN_UPPER
1
38
#
define
DMBIN_ONLYONE
1
39
#
define
DMBIN_LOWER
2
40
#
define
DMBIN_MIDDLE
3
41
#
define
DMBIN_MANUAL
4
42
#
define
DMBIN_ENVELOPE
5
43
#
define
DMBIN_ENVMANUAL
6
44
#
define
DMBIN_AUTO
7
45
#
define
DMBIN_TRACTOR
8
46
#
define
DMBIN_SMALLFMT
9
47
#
define
DMBIN_LARGEFMT
10
48
#
define
DMBIN_LARGECAPACITY
11
49
#
define
DMBIN_CASSETTE
14
50
#
define
DMBIN_FORMSOURCE
15
51
#
define
DMBIN_USER
256
52
53
namespace
QPrint
{
54
55
// Note: Keep in sync with QPrinter::PrinterState for now
56
// Replace later with more detailed status reporting
57
enum
DeviceState
{
58
Idle
,
59
Active
,
60
Aborted
,
61
Error
62
};
63
64
// Note: Keep in sync with QPrinter::DuplexMode
65
enum
DuplexMode
{
66
DuplexNone
= 0,
67
DuplexAuto
,
68
DuplexLongSide
,
69
DuplexShortSide
70
};
71
72
// Note: Keep in sync with QPrinter::ColorMode
73
enum
ColorMode
{
74
GrayScale
,
75
Color
76
};
77
78
// Note: Keep in sync with QPrinter::PaperSource for now
79
// If/when made public, rearrange and rename
80
enum
InputSlotId
{
81
Upper
,
82
Lower
,
83
Middle
,
84
Manual
,
85
Envelope
,
86
EnvelopeManual
,
87
Auto
,
88
Tractor
,
89
SmallFormat
,
90
LargeFormat
,
91
LargeCapacity
,
92
Cassette
,
93
FormSource
,
94
MaxPageSource
,
// Deprecated, kept for compatibility to QPrinter
95
CustomInputSlot
,
96
LastInputSlot
=
CustomInputSlot
,
97
OnlyOne
=
Upper
98
};
99
100
struct
InputSlot
{
101
QByteArray
key
;
102
QString
name
;
103
QPrint
::
InputSlotId
id
;
104
int
windowsId
;
105
};
106
107
enum
OutputBinId
{
108
AutoOutputBin
,
109
UpperBin
,
110
LowerBin
,
111
RearBin
,
112
CustomOutputBin
,
113
LastOutputBin
=
CustomOutputBin
114
};
115
116
struct
OutputBin
{
117
QByteArray
key
;
118
QString
name
;
119
QPrint
::
OutputBinId
id
;
120
};
121
122
}
123
124
struct
InputSlotMap
{
125
QPrint
::
InputSlotId
id
;
126
int
windowsId
;
127
const
char
*
key
;
128
};
129
130
struct
OutputBinMap
{
131
QPrint
::
OutputBinId
id
;
132
const
char
*
key
;
133
};
134
135
// Print utilities shared by print plugins
136
137
namespace
QPrintUtils
{
138
139
Q_PRINTSUPPORT_EXPORT
QPrint
::InputSlotId
inputSlotKeyToInputSlotId
(
const
QByteArray
&
key
);
140
Q_PRINTSUPPORT_EXPORT QByteArray
inputSlotIdToInputSlotKey
(
QPrint
::
InputSlotId
id
);
141
Q_PRINTSUPPORT_EXPORT
int
inputSlotIdToWindowsId
(
QPrint
::
InputSlotId
id);
142
Q_PRINTSUPPORT_EXPORT
QPrint
::OutputBinId
outputBinKeyToOutputBinId
(
const
QByteArray
&
key
);
143
Q_PRINTSUPPORT_EXPORT QByteArray
outputBinIdToOutputBinKey
(
QPrint
::
OutputBinId
id
);
144
Q_PRINTSUPPORT_EXPORT
QPrint
::InputSlot
paperBinToInputSlot
(
int
windowsId
,
const
QString
&
name
);
145
146
#
if
(
defined
Q_OS_MACOS
)
||
(
defined
Q_OS_UNIX
&&
QT_CONFIG
(
cups
)
)
147
// PPD utilities shared by CUPS and Mac plugins requiring CUPS headers
148
// May turn into a proper internal QPpd class if enough shared between Mac and CUPS,
149
// but where would it live? Not in base module as don't want to link to CUPS.
150
// May have to have two copies in plugins to keep in sync.
151
Q_PRINTSUPPORT_EXPORT
QPrint
::
InputSlot
ppdChoiceToInputSlot
(
const
ppd_choice_t
&
choice
);
152
Q_PRINTSUPPORT_EXPORT
QPrint
::
OutputBin
ppdChoiceToOutputBin
(
const
ppd_choice_t
&
choice
);
153
Q_PRINTSUPPORT_EXPORT
int
parsePpdResolution
(
const
QByteArray
&
value
);
154
Q_PRINTSUPPORT_EXPORT
QPrint
::
DuplexMode
ppdChoiceToDuplexMode
(
const
QByteArray
&
choice
);
155
#
endif
// Mac and CUPS PPD Utilities
156
};
157
158
#
endif
// QT_NO_PRINTER
159
160
QT_END_NAMESPACE
161
162
#
endif
// QPRINT_P_H
QOhosPdfPrintEnginePrivate
Definition
qohospdfprintengine.h:51
QOhosPdfPrintEnginePrivate::~QOhosPdfPrintEnginePrivate
~QOhosPdfPrintEnginePrivate()
QOhosPdfPrintEngine
Definition
qohospdfprintengine.h:22
QOhosPdfPrintEngine::begin
bool begin(QPaintDevice *pdev) override
Reimplement this function to initialise your paint engine when painting is to start on the paint devi...
Definition
qohospdfprintengine.cpp:28
QOhosPdfPrintEngine::end
bool end() override
Reimplement this function to finish painting on the current paint device.
Definition
qohospdfprintengine.cpp:50
QOhosPdfPrintEngine::property
QVariant property(PrintEnginePropertyKey key) const override
Returns the print engine's property specified by key.
Definition
qohospdfprintengine.cpp:159
QOhosPdfPrintEngine::setProperty
void setProperty(PrintEnginePropertyKey key, const QVariant &value) override
Sets the print engine's property specified by key to the given value.
Definition
qohospdfprintengine.cpp:127
QOhosPdfPrintEngine::~QOhosPdfPrintEngine
~QOhosPdfPrintEngine() override
QOhosPrintDevice
Definition
qohosprintdevice.h:12
QPdfPrintEnginePrivate
Definition
qprintengine_pdf_p.h:77
QPdfPrintEngine
Definition
qprintengine_pdf_p.h:46
QPointF
\inmodule QtCore\reentrant
Definition
qpoint.h:232
QOhosNativePrint
Definition
qohosnativeprint.cpp:14
QPrintUtils
Definition
qprint.cpp:41
QPrintUtils::inputSlotIdToWindowsId
int inputSlotIdToWindowsId(QPrint::InputSlotId id)
Definition
qprint.cpp:61
QPrint
Definition
qprint_p.h:53
QPrint::ColorMode
ColorMode
Definition
qprint_p.h:73
QPrint::Color
@ Color
Definition
qprint_p.h:75
QPrint::GrayScale
@ GrayScale
Definition
qprint_p.h:74
QPrint::DuplexMode
DuplexMode
Definition
qprint_p.h:65
QPrint::DuplexLongSide
@ DuplexLongSide
Definition
qprint_p.h:68
QPrint::DuplexShortSide
@ DuplexShortSide
Definition
qprint_p.h:69
QPrint::DuplexNone
@ DuplexNone
Definition
qprint_p.h:66
QPrint::DuplexAuto
@ DuplexAuto
Definition
qprint_p.h:67
QPrint::InputSlotId
InputSlotId
Definition
qprint_p.h:80
QPrint::CustomInputSlot
@ CustomInputSlot
Definition
qprint_p.h:95
QPrint::FormSource
@ FormSource
Definition
qprint_p.h:93
QPrint::OnlyOne
@ OnlyOne
Definition
qprint_p.h:97
QPrint::Envelope
@ Envelope
Definition
qprint_p.h:85
QPrint::EnvelopeManual
@ EnvelopeManual
Definition
qprint_p.h:86
QPrint::LargeCapacity
@ LargeCapacity
Definition
qprint_p.h:91
QPrint::LargeFormat
@ LargeFormat
Definition
qprint_p.h:90
QPrint::Cassette
@ Cassette
Definition
qprint_p.h:92
QPrint::Lower
@ Lower
Definition
qprint_p.h:82
QPrint::Upper
@ Upper
Definition
qprint_p.h:81
QPrint::Middle
@ Middle
Definition
qprint_p.h:83
QPrint::SmallFormat
@ SmallFormat
Definition
qprint_p.h:89
QPrint::Tractor
@ Tractor
Definition
qprint_p.h:88
QPrint::Auto
@ Auto
Definition
qprint_p.h:87
QPrint::LastInputSlot
@ LastInputSlot
Definition
qprint_p.h:96
QPrint::MaxPageSource
@ MaxPageSource
Definition
qprint_p.h:94
QPrint::Manual
@ Manual
Definition
qprint_p.h:84
QPrint::OutputBinId
OutputBinId
Definition
qprint_p.h:107
QPrint::LowerBin
@ LowerBin
Definition
qprint_p.h:110
QPrint::LastOutputBin
@ LastOutputBin
Definition
qprint_p.h:113
QPrint::RearBin
@ RearBin
Definition
qprint_p.h:111
QPrint::UpperBin
@ UpperBin
Definition
qprint_p.h:109
QPrint::CustomOutputBin
@ CustomOutputBin
Definition
qprint_p.h:112
QPrint::AutoOutputBin
@ AutoOutputBin
Definition
qprint_p.h:108
QPrint::DeviceState
DeviceState
Definition
qprint_p.h:57
QPrint::Idle
@ Idle
Definition
qprint_p.h:58
QPrint::Error
@ Error
Definition
qprint_p.h:61
QPrint::Aborted
@ Aborted
Definition
qprint_p.h:60
QPrint::Active
@ Active
Definition
qprint_p.h:59
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
__has_include
#define __has_include(x)
Definition
qcompilerdetection.h:459
InputSlotMap
Definition
qprint_p.h:124
InputSlotMap::id
QPrint::InputSlotId id
Definition
qprint_p.h:125
InputSlotMap::key
const char * key
Definition
qprint_p.h:127
InputSlotMap::windowsId
int windowsId
Definition
qprint_p.h:126
OutputBinMap
Definition
qprint_p.h:130
OutputBinMap::id
QPrint::OutputBinId id
Definition
qprint_p.h:131
OutputBinMap::key
const char * key
Definition
qprint_p.h:132
QOhosNativePrint::PrinterInfo
Definition
qohosnativeprint.h:66
QPrint::InputSlot
Definition
qprint_p.h:100
QPrint::InputSlot::windowsId
int windowsId
Definition
qprint_p.h:104
QPrint::InputSlot::id
QPrint::InputSlotId id
Definition
qprint_p.h:103
QPrint::InputSlot::key
QByteArray key
Definition
qprint_p.h:101
QPrint::InputSlot::name
QString name
Definition
qprint_p.h:102
QPrint::OutputBin
Definition
qprint_p.h:116
QPrint::OutputBin::id
QPrint::OutputBinId id
Definition
qprint_p.h:119
QPrint::OutputBin::key
QByteArray key
Definition
qprint_p.h:117
QPrint::OutputBin::name
QString name
Definition
qprint_p.h:118
qtbase
src
printsupport
kernel
qprint_p.h
Generated on
for Qt by
1.18.0