| 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 | |
| 4 | #ifndef QPLATFORMPRINTERSUPPORT_H |
| 5 | #define QPLATFORMPRINTERSUPPORT_H |
| 6 | // |
| 7 | // W A R N I N G |
| 8 | // ------------- |
| 9 | // |
| 10 | // This file is part of the QPA API and is not meant to be used |
| 11 | // in applications. Usage of this API may make your code |
| 12 | // source and binary incompatible with future versions of Qt. |
| 13 | // |
| 14 | |
| 15 | #include <QtPrintSupport/qtprintsupportglobal.h> |
| 16 | #include <QtPrintSupport/qprinter.h> |
| 17 | |
| 18 | #include <QtCore/qstringlist.h> |
| 19 | #include <QtCore/qlist.h> |
| 20 | #include <QtCore/qhash.h> |
| 21 | |
| 22 | QT_BEGIN_NAMESPACE |
| 23 | |
| 24 | #ifndef QT_NO_PRINTER |
| 25 | |
| 26 | typedef QHash<QString, QString> PrinterOptions; |
| 27 | |
| 28 | class QPageSize; |
| 29 | class QPlatformPrintDevice; |
| 30 | class QPrintDevice; |
| 31 | class QPrintEngine; |
| 32 | |
| 33 | class Q_PRINTSUPPORT_EXPORT QPlatformPrinterSupport |
| 34 | { |
| 35 | public: |
| 36 | QPlatformPrinterSupport(); |
| 37 | virtual ~QPlatformPrinterSupport(); |
| 38 | |
| 39 | virtual QPrintEngine *createNativePrintEngine(QPrinter::PrinterMode printerMode, const QString &deviceId = QString()); |
| 40 | virtual QPaintEngine *createPaintEngine(QPrintEngine *, QPrinter::PrinterMode printerMode); |
| 41 | |
| 42 | virtual QPrintDevice createPrintDevice(const QString &id); |
| 43 | virtual QStringList availablePrintDeviceIds() const; |
| 44 | virtual QString defaultPrintDeviceId() const; |
| 45 | |
| 46 | protected: |
| 47 | static QPrintDevice createPrintDevice(QPlatformPrintDevice *device); |
| 48 | static QPageSize createPageSize(const QString &id, QSize size, const QString &localizedName); |
| 49 | }; |
| 50 | |
| 51 | #endif // QT_NO_PRINTER |
| 52 | |
| 53 | QT_END_NAMESPACE |
| 54 | |
| 55 | #endif // QPLATFORMPRINTERSUPPORT_H |
| 56 | |