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
qpdfwriter.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
// Qt-Security score:significant reason:default
4
5
#
ifndef
QPDFWRITER_H
6
#
define
QPDFWRITER_H
7
8
#
include
<
QtGui
/
qtguiglobal
.
h
>
9
10
#
ifndef
QT_NO_PDF
11
12
#
include
<
QtCore
/
qobject
.
h
>
13
#
include
<
QtGui
/
qpagedpaintdevice
.
h
>
14
#
include
<
QtGui
/
qpagelayout
.
h
>
15
16
QT_BEGIN_NAMESPACE
17
18
class
QIODevice;
19
class
QPdfOutputIntent;
20
class
QPdfWriterPrivate
;
21
class
QUuid;
22
23
class
Q_GUI_EXPORT
QPdfWriter
:
public
QObject,
public
QPagedPaintDevice
24
{
25
Q_OBJECT
26
public
:
27
explicit
QPdfWriter(
const
QString &filename);
28
explicit
QPdfWriter(QIODevice *device);
29
~QPdfWriter();
30
31
void
setPdfVersion(PdfVersion version);
32
PdfVersion pdfVersion()
const
;
33
34
QString title()
const
;
35
void
setTitle(
const
QString &title);
36
37
QString creator()
const
;
38
void
setCreator(
const
QString &creator);
39
40
QUuid documentId()
const
;
41
void
setDocumentId(QUuid documentId);
42
43
QString author()
const
;
44
void
setAuthor(
const
QString &author);
45
46
bool
newPage() override;
47
48
void
setResolution(
int
resolution);
49
int
resolution()
const
;
50
51
void
setDocumentXmpMetadata(
const
QByteArray &xmpMetadata);
52
QByteArray documentXmpMetadata()
const
;
53
54
void
addFileAttachment(
const
QString &fileName,
const
QByteArray &data,
const
QString &mimeType = QString());
55
56
enum
class
ColorModel
57
{
58
RGB,
59
Grayscale,
60
CMYK,
61
Auto,
62
};
63
Q_ENUM(ColorModel)
64
65
ColorModel colorModel()
const
;
66
void
setColorModel(ColorModel model);
67
68
QPdfOutputIntent outputIntent()
const
;
69
void
setOutputIntent(
const
QPdfOutputIntent &intent);
70
71
protected
:
72
QPaintEngine *paintEngine()
const
override;
73
int
metric(PaintDeviceMetric id)
const
override;
74
75
private
:
76
Q_DISABLE_COPY(QPdfWriter)
77
Q_DECLARE_PRIVATE(QPdfWriter)
78
};
79
80
QT_END_NAMESPACE
81
82
#
endif
// QT_NO_PDF
83
84
#
endif
QMarginsF
\inmodule QtCore
Definition
qmargins.h:304
QPdfPagedPaintDevicePrivate
Definition
qpdfwriter.cpp:40
QPdfPagedPaintDevicePrivate::setPageSize
bool setPageSize(const QPageSize &pageSize) override
Definition
qpdfwriter.cpp:56
QPdfPagedPaintDevicePrivate::setPageLayout
bool setPageLayout(const QPageLayout &newPageLayout) override
Definition
qpdfwriter.cpp:49
QPdfPagedPaintDevicePrivate::QPdfPagedPaintDevicePrivate
QPdfPagedPaintDevicePrivate(QPdfWriterPrivate *d)
Definition
qpdfwriter.cpp:42
QPdfPagedPaintDevicePrivate::pd
QPdfWriterPrivate * pd
Definition
qpdfwriter.cpp:82
QPdfPagedPaintDevicePrivate::~QPdfPagedPaintDevicePrivate
~QPdfPagedPaintDevicePrivate()
Definition
qpdfwriter.cpp:46
QPdfPagedPaintDevicePrivate::pageLayout
QPageLayout pageLayout() const override
Definition
qpdfwriter.cpp:77
QPdfPagedPaintDevicePrivate::setPageMargins
bool setPageMargins(const QMarginsF &margins, QPageLayout::Unit units) override
Definition
qpdfwriter.cpp:70
QPdfPagedPaintDevicePrivate::setPageOrientation
bool setPageOrientation(QPageLayout::Orientation orientation) override
Definition
qpdfwriter.cpp:63
QPdfWriterPrivate
Definition
qpdfwriter.cpp:19
QPdfWriterPrivate::output
QFile * output
Definition
qpdfwriter.cpp:35
QPdfWriterPrivate::~QPdfWriterPrivate
~QPdfWriterPrivate()
Definition
qpdfwriter.cpp:28
QPdfWriterPrivate::QPdfWriterPrivate
QPdfWriterPrivate()
Definition
qpdfwriter.cpp:21
QPdfWriterPrivate::engine
QPdfEngine * engine
Definition
qpdfwriter.cpp:34
QPdfWriterPrivate::pdfVersion
QPdfWriter::PdfVersion pdfVersion
Definition
qpdfwriter.cpp:36
QPdfWriter
\inmodule QtGui
Definition
qpdfwriter.h:24
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtbase
src
gui
painting
qpdfwriter.h
Generated on
for Qt by
1.18.0