blob: d3bd9a789a808152d6406b7bf7b76d0f843a9320 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef GRAPHPRINTER_H
#define GRAPHPRINTER_H
#include <QtCore/qfile.h>
#include <QtGui>
#include <QtPrintSupport>
#include <QtQml/qqmlregistration.h>
class GraphPrinter : public QObject {
Q_OBJECT
QML_ELEMENT
public:
explicit GraphPrinter(QObject *parent = 0);
~GraphPrinter() override;
Q_INVOKABLE QString generatePDF(const QUrl &path, const QImage &image);
Q_INVOKABLE QString print(const QImage &image, const QString printerName);
Q_INVOKABLE QStringList getPrinters();
Q_INVOKABLE qreal maxTextureSize();
};
#endif // GRAPHPRINTER_H
|