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