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