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
qohosnativeprint.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 QOHOSNATIVEPRINT_H_
5#define QOHOSNATIVEPRINT_H_
6
7#include <QString>
8#include <QStringList>
9#include <QVector>
10#include <QtGlobal>
11#if __has_include(<BasicServicesKit/ohprint.h>)
12#include <BasicServicesKit/ohprint.h>
13#else
14#include <ohprint/print_base.h>
15#include <ohprint/print_capi.h>
16#endif
17
18QT_BEGIN_NAMESPACE
19
20namespace QOhosNativePrint
21{
22
30
32{
36 // FIXME: supportedMediaTypes is a list inside a string. It should be parsed. However, currently
37 // we are not using information about supported media types, so just treat it as a string
40 // FIXME: supportedPaperSources is a list inside a string. It should be parsed. However,
41 // currently we are not using information about supported paper sources, so just treat it as a
42 // string
48};
49
64
79
80bool connectPrinter(const QString &deviceId);
81
82bool startPrintJob(const Print_PrintJob &job);
83
84bool queryPrinterIdList(QStringList &printerIdList);
85
86bool queryPrinterInfo(const QString &printerId, PrinterInfo &printerInfo);
87
89
91
93
94int convertPixelsPerThousandDpiToPoints(quint32 pixelsPerThousandDpi);
95
96}
97
98QT_END_NAMESPACE
99
100#endif // QOHOSNATIVEPRINT_H_
bool queryPrinterIdList(QStringList &printerIdList)
bool connectPrinter(const QString &deviceId)
bool startPrintJob(const Print_PrintJob &job)
bool queryPrinterInfo(const QString &printerId, PrinterInfo &printerInfo)
int convertPixelsPerThousandDpiToPoints(quint32 pixelsPerThousandDpi)
#define __has_include(x)
QVector< Print_Quality > supportedQualities
QVector< Print_OrientationMode > supportedOrientations
QVector< Print_DuplexMode > supportedDuplexModes
QVector< Print_ColorMode > supportedColorModes
QVector< Print_Resolution > supportedResolutions
PrinterDefaultValues defaultValues
PrinterCapabilities capabilities