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
qohospdfprintengine.h
Go to the documentation of this file.
1// Copyright (C) 2025 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 QOHOSPDFPRINTENGINE_H_
5#define QOHOSPDFPRINTENGINE_H_
6
7#include <QScopedPointer>
8#include <QTemporaryDir>
9#include <qprintengine_pdf_p.h>
10
12
14
16{
19
20public:
23
24 bool begin(QPaintDevice *pdev) override;
25 bool end() override;
26
27 void setProperty(PrintEnginePropertyKey key, const QVariant &value) override;
28 QVariant property(PrintEnginePropertyKey key) const override;
29
30private:
31 Print_DuplexMode nativeDuplexMode() const;
32 Print_ColorMode nativeColorMode() const;
33 Print_OrientationMode nativeOrientationMode() const;
34
35 void updateUnsupportedPrinterParameters();
36
37 QString m_deviceId;
38 QPrinter::DuplexMode m_duplexMode = QPrinter::DuplexNone;
39 int m_copies = 1;
40
41 static QTemporaryDir s_tempDir;
42};
43
53
54QT_END_NAMESPACE
55
56#endif // QOHOSPDFPRINTENGINE_H_
bool begin(QPaintDevice *pdev) override
Reimplement this function to initialise your paint engine when painting is to start on the paint devi...
bool end() override
Reimplement this function to finish painting on the current paint device.
QVariant property(PrintEnginePropertyKey key) const override
Returns the print engine's property specified by key.
void setProperty(PrintEnginePropertyKey key, const QVariant &value) override
Sets the print engine's property specified by key to the given value.
~QOhosPdfPrintEngine() override
Combined button and popup list for selecting options.