1// Copyright (C) 2020 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 QPAGEDPAINTDEVICE_H
5#define QPAGEDPAINTDEVICE_H
6
7#include <QtGui/qtguiglobal.h>
8#include <QtGui/qpaintdevice.h>
9#include <QtGui/qpagelayout.h>
10#include <QtGui/qpageranges.h>
11
12QT_BEGIN_NAMESPACE
13
14#if defined(B0)
15#undef B0 // Terminal hang-up. We assume that you do not want that.
16#endif
17
18class QPagedPaintDevicePrivate;
19
20class Q_GUI_EXPORT QPagedPaintDevice : public QPaintDevice
21{
22public:
23 ~QPagedPaintDevice();
24
25 virtual bool newPage() = 0;
26
27 // keep in sync with QPdfEngine::PdfVersion!
28 enum PdfVersion { PdfVersion_1_4, PdfVersion_A1b, PdfVersion_1_6 };
29
30 virtual bool setPageLayout(const QPageLayout &pageLayout);
31 virtual bool setPageSize(const QPageSize &pageSize);
32 virtual bool setPageOrientation(QPageLayout::Orientation orientation);
33 virtual bool setPageMargins(const QMarginsF &margins, QPageLayout::Unit units = QPageLayout::Millimeter);
34 QPageLayout pageLayout() const;
35
36 virtual void setPageRanges(const QPageRanges &ranges);
37 QPageRanges pageRanges() const;
38
39protected:
40 QPagedPaintDevice(QPagedPaintDevicePrivate *dd);
41 QPagedPaintDevicePrivate *dd();
42 friend class QPagedPaintDevicePrivate;
43 QPagedPaintDevicePrivate *d;
44};
45
46QT_END_NAMESPACE
47
48#endif
49

source code of qtbase/src/gui/painting/qpagedpaintdevice.h