Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:08:15

0001 // Copyright (C) 2016 The Qt Company Ltd.
0002 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
0003 
0004 #ifndef QPDFWRITER_H
0005 #define QPDFWRITER_H
0006 
0007 #include <QtGui/qtguiglobal.h>
0008 
0009 #ifndef QT_NO_PDF
0010 
0011 #include <QtCore/qobject.h>
0012 #include <QtGui/qpagedpaintdevice.h>
0013 #include <QtGui/qpagelayout.h>
0014 
0015 QT_BEGIN_NAMESPACE
0016 
0017 class QIODevice;
0018 class QPdfWriterPrivate;
0019 
0020 class Q_GUI_EXPORT QPdfWriter : public QObject, public QPagedPaintDevice
0021 {
0022     Q_OBJECT
0023 public:
0024     explicit QPdfWriter(const QString &filename);
0025     explicit QPdfWriter(QIODevice *device);
0026     ~QPdfWriter();
0027 
0028     void setPdfVersion(PdfVersion version);
0029     PdfVersion pdfVersion() const;
0030 
0031     QString title() const;
0032     void setTitle(const QString &title);
0033 
0034     QString creator() const;
0035     void setCreator(const QString &creator);
0036 
0037     bool newPage() override;
0038 
0039     void setResolution(int resolution);
0040     int resolution() const;
0041 
0042     void setDocumentXmpMetadata(const QByteArray &xmpMetadata);
0043     QByteArray documentXmpMetadata() const;
0044 
0045     void addFileAttachment(const QString &fileName, const QByteArray &data, const QString &mimeType = QString());
0046 
0047 protected:
0048     QPaintEngine *paintEngine() const override;
0049     int metric(PaintDeviceMetric id) const override;
0050 
0051 private:
0052     Q_DISABLE_COPY(QPdfWriter)
0053     Q_DECLARE_PRIVATE(QPdfWriter)
0054 };
0055 
0056 QT_END_NAMESPACE
0057 
0058 #endif // QT_NO_PDF
0059 
0060 #endif