Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qcupsprintengine_p.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
4#ifndef QCUPSPRINTENGINE_P_H
5#define QCUPSPRINTENGINE_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include "QtPrintSupport/qprintengine.h"
19
20#include <QtCore/qstring.h>
21#include <QtGui/qpaintengine.h>
22
23#include <private/qpaintengine_p.h>
24#include <private/qprintdevice_p.h>
25#include <private/qprintengine_pdf_p.h>
26
28
30
32{
33 Q_DECLARE_PRIVATE(QCupsPrintEngine)
34public:
36 virtual ~QCupsPrintEngine();
37
38 // reimplementations QPdfPrintEngine
41 // end reimplementations QPdfPrintEngine
42
43private:
44 Q_DISABLE_COPY_MOVE(QCupsPrintEngine)
45};
46
48{
49 Q_DECLARE_PUBLIC(QCupsPrintEngine)
50public:
53
54 bool openPrintDevice() override;
55 void closePrintDevice() override;
56
57private:
58 Q_DISABLE_COPY_MOVE(QCupsPrintEnginePrivate)
59
60 void changePrinter(const QString &newPrinter);
61 void setPageSize(const QPageSize &pageSize);
62
63 QPrintDevice m_printDevice;
64 QStringList cupsOptions;
65 QString cupsTempFile;
66 QPrint::DuplexMode duplex;
67 bool duplexRequestedExplicitly = false;
68};
69
71
72#endif // QCUPSPRINTENGINE_P_H
QCupsPrintEngine(QPrinter::PrinterMode m, const QString &deviceId)
\inmodule QtGui
Definition qpagesize.h:22
friend class QCupsPrintEnginePrivate
PrintEnginePropertyKey
This enum is used to communicate properties between the print engine and QPrinter.
PrinterMode
This enum describes the mode the printer should work in.
Definition qprinter.h:31
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qvariant.h:65
DuplexMode
Definition qprint_p.h:64
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
const GLfloat * m
GLuint64 key
const char property[13]
Definition qwizard.cpp:101
args<< 1<< 2;QJSValue threeAgain=fun.call(args);QString fileName="helloworld.qs";QFile scriptFile(fileName);if(!scriptFile.open(QIODevice::ReadOnly)) QTextStream stream(&scriptFile);QString contents=stream.readAll();scriptFile.close();myEngine.evaluate(contents, fileName);myEngine.globalObject().setProperty("myNumber", 123);...QJSValue myNumberPlusOne=myEngine.evaluate("myNumber + 1");QJSValue result=myEngine.evaluate(...);if(result.isError()) qDebug()<< "Uncaught exception at line"<< result.property("lineNumber").toInt()<< ":"<< result.toString();QPushButton *button=new QPushButton;QJSValue scriptButton=myEngine.newQObject(button);myEngine.globalObject().setProperty("button", scriptButton);myEngine.evaluate("button.checkable = true");qDebug()<< scriptButton.property("checkable").toBool();scriptButton.property("show").call();QJSEngine engine;QObject *myQObject=new QObject();myQObject- setProperty)("dynamicProperty", 3)