Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
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
<
QtCore
/
qscopedpointer
.
h
>
8
#
include
<
QtCore
/
qtemporarydir
.
h
>
9
#
include
<
qprintengine_pdf_p
.
h
>
10
11
#
if
__has_include
(
<
BasicServicesKit
/
ohprint
.
h
>
)
12
#
include
<
BasicServicesKit
/
ohprint
.
h
>
13
#
else
14
#
include
<
ohprint
/
print_base
.
h
>
15
#
endif
16
17
QT_BEGIN_NAMESPACE
18
19
class
QOhosPdfPrintEnginePrivate
;
20
21
class
QOhosPdfPrintEngine
:
public
QPdfPrintEngine
22
{
23
Q_DISABLE_COPY
(
QOhosPdfPrintEngine
)
24
Q_DECLARE_PRIVATE
(
QOhosPdfPrintEngine
)
25
26
public
:
27
QOhosPdfPrintEngine
(
QPrinter
::
PrinterMode
mode
,
const
QString
&
deviceId
);
28
~
QOhosPdfPrintEngine
()
override
;
29
30
bool
begin
(QPaintDevice *pdev)
override
;
31
bool
end
()
override
;
32
33
void
setProperty
(PrintEnginePropertyKey key,
const
QVariant &value)
override
;
34
QVariant
property
(PrintEnginePropertyKey key)
const
override
;
35
36
private
:
37
Print_DuplexMode nativeDuplexMode()
const
;
38
Print_ColorMode nativeColorMode()
const
;
39
Print_OrientationMode nativeOrientationMode()
const
;
40
41
void
updateUnsupportedPrinterParameters();
42
43
QString m_deviceId;
44
QPrinter::DuplexMode m_duplexMode =
QPrinter
::
DuplexNone
;
45
int
m_copies = 1;
46
47
static
QTemporaryDir s_tempDir;
48
};
49
50
class
QOhosPdfPrintEnginePrivate
:
public
QPdfPrintEnginePrivate
51
{
52
Q_DISABLE_COPY
(
QOhosPdfPrintEnginePrivate
)
53
Q_DECLARE_PUBLIC
(
QOhosPdfPrintEngine
)
54
55
public
:
56
QOhosPdfPrintEnginePrivate
(
QPrinter
::
PrinterMode
m
);
57
~
QOhosPdfPrintEnginePrivate
();
58
};
59
60
QT_END_NAMESPACE
61
62
#
endif
// QOHOSPDFPRINTENGINE_H_
QOhosPdfPrintEnginePrivate
Definition
qohospdfprintengine.h:51
QOhosPdfPrintEnginePrivate::~QOhosPdfPrintEnginePrivate
~QOhosPdfPrintEnginePrivate()
QOhosPdfPrintEngine
Definition
qohospdfprintengine.h:22
QOhosPdfPrintEngine::begin
bool begin(QPaintDevice *pdev) override
Reimplement this function to initialise your paint engine when painting is to start on the paint devi...
Definition
qohospdfprintengine.cpp:28
QOhosPdfPrintEngine::end
bool end() override
Reimplement this function to finish painting on the current paint device.
Definition
qohospdfprintengine.cpp:50
QOhosPdfPrintEngine::property
QVariant property(PrintEnginePropertyKey key) const override
Returns the print engine's property specified by key.
Definition
qohospdfprintengine.cpp:159
QOhosPdfPrintEngine::setProperty
void setProperty(PrintEnginePropertyKey key, const QVariant &value) override
Sets the print engine's property specified by key to the given value.
Definition
qohospdfprintengine.cpp:127
QOhosPdfPrintEngine::~QOhosPdfPrintEngine
~QOhosPdfPrintEngine() override
QOhosPrintDevice
Definition
qohosprintdevice.h:12
QOhosNativePrint
Definition
qohosnativeprint.cpp:14
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
__has_include
#define __has_include(x)
Definition
qcompilerdetection.h:459
QOhosNativePrint::PrinterInfo
Definition
qohosnativeprint.h:66
qtbase
src
plugins
printsupport
ohos
qohospdfprintengine.h
Generated on
for Qt by
1.18.0