Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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
30#endif
31
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
53namespace QPrint {
54
55 // Note: Keep in sync with QPrinter::PrinterState for now
56 // Replace later with more detailed status reporting
63
64 // Note: Keep in sync with QPrinter::DuplexMode
71
72 // Note: Keep in sync with QPrinter::ColorMode
77
78 // Note: Keep in sync with QPrinter::PaperSource for now
79 // If/when made public, rearrange and rename
99
106
115
121
122}
123
127 const char *key;
128};
129
132 const char *key;
133};
134
135// Print utilities shared by print plugins
136
137namespace QPrintUtils {
138
139Q_PRINTSUPPORT_EXPORT QPrint::InputSlotId inputSlotKeyToInputSlotId(const QByteArray &key);
140Q_PRINTSUPPORT_EXPORT QByteArray inputSlotIdToInputSlotKey(QPrint::InputSlotId id);
142Q_PRINTSUPPORT_EXPORT QPrint::OutputBinId outputBinKeyToOutputBinId(const QByteArray &key);
143Q_PRINTSUPPORT_EXPORT QByteArray outputBinIdToOutputBinKey(QPrint::OutputBinId id);
144Q_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.
155# endif // Mac and CUPS PPD Utilities
156};
157
158#endif // QT_NO_PRINTER
159
160QT_END_NAMESPACE
161
162#endif // QPRINT_P_H
bool begin(QPaintDevice *pdev) override
Reimplement this function to initialise your paint engine when painting is to start on the paint devi...
bool end() override
Reimplement this function to finish painting on the current paint device.
QVariant property(PrintEnginePropertyKey key) const override
Returns the print engine's property specified by key.
void setProperty(PrintEnginePropertyKey key, const QVariant &value) override
Sets the print engine's property specified by key to the given value.
~QOhosPdfPrintEngine() override
\inmodule QtCore\reentrant
Definition qpoint.h:232
int inputSlotIdToWindowsId(QPrint::InputSlotId id)
Definition qprint.cpp:61
ColorMode
Definition qprint_p.h:73
@ Color
Definition qprint_p.h:75
@ GrayScale
Definition qprint_p.h:74
DuplexMode
Definition qprint_p.h:65
@ DuplexLongSide
Definition qprint_p.h:68
@ DuplexShortSide
Definition qprint_p.h:69
@ DuplexNone
Definition qprint_p.h:66
@ DuplexAuto
Definition qprint_p.h:67
InputSlotId
Definition qprint_p.h:80
@ CustomInputSlot
Definition qprint_p.h:95
@ FormSource
Definition qprint_p.h:93
@ OnlyOne
Definition qprint_p.h:97
@ Envelope
Definition qprint_p.h:85
@ EnvelopeManual
Definition qprint_p.h:86
@ LargeCapacity
Definition qprint_p.h:91
@ LargeFormat
Definition qprint_p.h:90
@ Cassette
Definition qprint_p.h:92
@ Lower
Definition qprint_p.h:82
@ Upper
Definition qprint_p.h:81
@ Middle
Definition qprint_p.h:83
@ SmallFormat
Definition qprint_p.h:89
@ Tractor
Definition qprint_p.h:88
@ Auto
Definition qprint_p.h:87
@ LastInputSlot
Definition qprint_p.h:96
@ MaxPageSource
Definition qprint_p.h:94
@ Manual
Definition qprint_p.h:84
OutputBinId
Definition qprint_p.h:107
@ LowerBin
Definition qprint_p.h:110
@ LastOutputBin
Definition qprint_p.h:113
@ RearBin
Definition qprint_p.h:111
@ UpperBin
Definition qprint_p.h:109
@ CustomOutputBin
Definition qprint_p.h:112
@ AutoOutputBin
Definition qprint_p.h:108
DeviceState
Definition qprint_p.h:57
@ Idle
Definition qprint_p.h:58
@ Error
Definition qprint_p.h:61
@ Aborted
Definition qprint_p.h:60
@ Active
Definition qprint_p.h:59
Combined button and popup list for selecting options.
QPrint::InputSlotId id
Definition qprint_p.h:125
const char * key
Definition qprint_p.h:127
QPrint::OutputBinId id
Definition qprint_p.h:131
const char * key
Definition qprint_p.h:132
QPrint::InputSlotId id
Definition qprint_p.h:103
QByteArray key
Definition qprint_p.h:101
QPrint::OutputBinId id
Definition qprint_p.h:119
QByteArray key
Definition qprint_p.h:117