Qt
6.x
The Qt SDK
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerations
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Related Symbols
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
Loading...
Searching...
No Matches
qcocoaprintdevice_p.h
Go to the documentation of this file.
1
// Copyright (C) 2014 John Layt <jlayt@kde.org>
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 QCOCOAPRINTDEVICE_H
5
#define QCOCOAPRINTDEVICE_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 for the convenience
12
// of internal files. This header file may change from version to version
13
// without notice, or even be removed.
14
//
15
// We mean it.
16
//
17
18
#include <qpa/qplatformprintdevice.h>
19
#include <private/qglobal_p.h>
20
21
#ifndef QT_NO_PRINTER
22
23
#include <QtCore/qhash.h>
24
#include <ApplicationServices/ApplicationServices.h>
25
26
#include <QtPrintSupport/qtprintsupportglobal.h>
27
28
#include <cups/ppd.h>
29
30
QT_BEGIN_NAMESPACE
31
32
class
QCocoaPrintDevice
:
public
QPlatformPrintDevice
33
{
34
public
:
35
QCocoaPrintDevice
();
36
explicit
QCocoaPrintDevice
(
const
QString
&
id
);
37
virtual
~QCocoaPrintDevice
();
38
39
bool
isValid
()
const override
;
40
bool
isDefault
()
const override
;
41
42
QPrint::DeviceState
state
()
const override
;
43
44
QPageSize
defaultPageSize
()
const override
;
45
46
QMarginsF
printableMargins
(
const
QPageSize
&pageSize,
QPageLayout::Orientation
orientation,
47
int
resolution)
const override
;
48
49
int
defaultResolution
()
const override
;
50
51
QPrint::InputSlot
defaultInputSlot
()
const override
;
52
53
QPrint::OutputBin
defaultOutputBin
()
const override
;
54
55
QPrint::DuplexMode
defaultDuplexMode
()
const override
;
56
57
QPrint::ColorMode
defaultColorMode
()
const override
;
58
59
PMPrinter
macPrinter
()
const
;
60
PMPaper
macPaper
(
const
QPageSize
&pageSize)
const
;
61
62
protected
:
63
void
loadPageSizes
()
const override
;
64
void
loadResolutions
()
const override
;
65
void
loadInputSlots
()
const override
;
66
void
loadOutputBins
()
const override
;
67
void
loadDuplexModes
()
const override
;
68
void
loadColorModes
()
const override
;
69
#if QT_CONFIG(mimetype)
70
void
loadMimeTypes()
const override
;
71
#endif
72
73
private
:
74
QPageSize
createPageSize(
const
PMPaper &paper)
const
;
75
bool
openPpdFile();
76
77
// Mac Core Printing
78
PMPrinter m_printer;
79
PMPrintSession m_session;
80
mutable
QHash<QString, PMPaper>
m_macPapers;
81
82
// PPD File
83
ppd_file_t *m_ppd;
84
85
QMarginsF
m_customMargins;
86
mutable
QHash<QString, QMarginsF>
m_printableMargins;
87
};
88
89
QT_END_NAMESPACE
90
91
#endif
// QT_NO_PRINTER
92
#endif
// QCOCOAPRINTDEVICE_H
QCocoaPrintDevice
Definition
qcocoaprintdevice_p.h:33
QCocoaPrintDevice::~QCocoaPrintDevice
virtual ~QCocoaPrintDevice()
Definition
qcocoaprintdevice.mm:81
QCocoaPrintDevice::defaultResolution
int defaultResolution() const override
Definition
qcocoaprintdevice.mm:206
QCocoaPrintDevice::defaultOutputBin
QPrint::OutputBin defaultOutputBin() const override
Definition
qcocoaprintdevice.mm:300
QCocoaPrintDevice::loadResolutions
void loadResolutions() const override
Definition
qcocoaprintdevice.mm:191
QCocoaPrintDevice::defaultPageSize
QPageSize defaultPageSize() const override
Definition
qcocoaprintdevice.mm:163
QCocoaPrintDevice::loadOutputBins
void loadOutputBins() const override
Definition
qcocoaprintdevice.mm:276
QCocoaPrintDevice::QCocoaPrintDevice
QCocoaPrintDevice()
Definition
qcocoaprintdevice.mm:35
QCocoaPrintDevice::loadColorModes
void loadColorModes() const override
Definition
qcocoaprintdevice.mm:361
QCocoaPrintDevice::state
QPrint::DeviceState state() const override
Definition
qcocoaprintdevice.mm:104
QCocoaPrintDevice::macPrinter
PMPrinter macPrinter() const
Definition
qcocoaprintdevice.mm:427
QCocoaPrintDevice::defaultDuplexMode
QPrint::DuplexMode defaultDuplexMode() const override
Definition
qcocoaprintdevice.mm:346
QCocoaPrintDevice::printableMargins
QMarginsF printableMargins(const QPageSize &pageSize, QPageLayout::Orientation orientation, int resolution) const override
Definition
qcocoaprintdevice.mm:178
QCocoaPrintDevice::loadDuplexModes
void loadDuplexModes() const override
Definition
qcocoaprintdevice.mm:318
QCocoaPrintDevice::defaultInputSlot
QPrint::InputSlot defaultInputSlot() const override
Definition
qcocoaprintdevice.mm:258
QCocoaPrintDevice::isDefault
bool isDefault() const override
Definition
qcocoaprintdevice.mm:99
QCocoaPrintDevice::macPaper
PMPaper macPaper(const QPageSize &pageSize) const
Definition
qcocoaprintdevice.mm:434
QCocoaPrintDevice::isValid
bool isValid() const override
Definition
qcocoaprintdevice.mm:94
QCocoaPrintDevice::defaultColorMode
QPrint::ColorMode defaultColorMode() const override
Definition
qcocoaprintdevice.mm:371
QCocoaPrintDevice::loadPageSizes
void loadPageSizes() const override
Definition
qcocoaprintdevice.mm:136
QCocoaPrintDevice::loadInputSlots
void loadInputSlots() const override
Definition
qcocoaprintdevice.mm:231
QHash
\inmodule QtCore
Definition
qhash.h:818
QMarginsF
\inmodule QtCore
Definition
qmargins.h:274
QPageLayout::Orientation
Orientation
This enum type defines the page orientation.
Definition
qpagelayout.h:33
QPageSize
\inmodule QtGui
Definition
qpagesize.h:22
QPlatformPrintDevice
Definition
qplatformprintdevice.h:36
QString
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition
qstring.h:127
QPrint::ColorMode
ColorMode
Definition
qprint_p.h:71
QPrint::DuplexMode
DuplexMode
Definition
qprint_p.h:64
QPrint::DeviceState
DeviceState
Definition
qprint_p.h:56
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1545
QPrint::InputSlot
Definition
qprint_p.h:98
QPrint::OutputBin
Definition
qprint_p.h:114
qtbase
src
printsupport
platform
macos
qcocoaprintdevice_p.h
Generated by
1.9.7