13#include <QtGui/qpagelayout.h>
16#include "private/qcore_unix_p.h"
47 if (!
d->openPrintDevice()) {
62 d->closePrintDevice();
104 d->collate =
value.toBool();
110 d->creator =
value.toString();
113 d->title =
value.toString();
123 d->copies =
value.toInt();
129 d->outputFileName =
value.toString();
137 d->m_pageLayout.setPageSize(pageSize);
145 d->m_pageLayout.setPageSize(pageSize);
158 d->printerName =
value.toString();
161 d->printProgram =
value.toString();
164 d->resolution =
value.toInt();
167 d->selectionOption =
value.toString();
170 d->embedFonts =
value.toBool();
179 d->m_pageLayout.setMargins(
QMarginsF(margins.
at(0).toReal(), margins.
at(1).toReal(),
180 margins.
at(2).toReal(), margins.
at(3).toReal()));
186 d->m_pageLayout.setPageSize(pageSize);
191 d->m_pageLayout.setUnits(pair.second);
192 d->m_pageLayout.setMargins(pair.first);
245 ret =
d->m_pageLayout.orientation();
248 ret =
d->outputFileName;
254 ret =
d->m_pageLayout.pageSize().id();
257 ret =
d->m_pageLayout.pageSize().name();
260 ret =
d->m_pageLayout.pageSize().windowsId();
263 ret =
d->paperSource;
266 ret =
d->printerName;
269 ret =
d->printProgram;
278 ret =
d->m_pageLayout.fullRectPixels(
d->resolution);
281 ret =
d->m_pageLayout.paintRectPixels(
d->resolution);
284 ret =
d->selectionOption;
290 ret =
d->m_pageLayout.fullRectPoints().size();
300 ret.setValue(
d->m_pageLayout.pageSize());
308 ret.setValue(
d->m_pageLayout);
338 #if defined(Q_OS_WIN) && defined(Q_CC_MSVC)
355 pageOrder(
QPrinter::FirstPageFirst),
bool open(OpenMode flags) override
Opens the file using OpenMode mode, returning true if successful; otherwise false.
virtual void close()
First emits aboutToClose(), then closes the device and sets its OpenMode to NotOpen.
qsizetype size() const noexcept
const_reference at(qsizetype i) const noexcept
constexpr qreal right() const noexcept
Returns the right margin.
constexpr qreal left() const noexcept
Returns the left margin.
constexpr qreal top() const noexcept
Returns the top margin.
constexpr qreal bottom() const noexcept
Returns the bottom margin.
bool isValid() const
Returns true if this page layout is valid.
Orientation
This enum type defines the page orientation.
bool isValid() const
Returns true if this page size is valid.
QString name() const
Returns a localized human-readable name for the page size.
PageSizeId id() const
Returns the standard QPageSize::PageSizeId of the page, or QPageSize::Custom.
PageSizeId
This enum type lists the available page sizes as defined in the Postscript PPD standard.
QPageLayout pageLayout() const
int metric(QPaintDevice::PaintDeviceMetric metricType) const
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.
void setPdfVersion(PdfVersion version)
~QPdfPrintEnginePrivate()
virtual bool openPrintDevice()
QPdfPrintEnginePrivate(QPrinter::PrinterMode m)
virtual void closePrintDevice()
bool end() override
Reimplement this function to finish painting on the current paint device.
int metric(QPaintDevice::PaintDeviceMetric) const override
Returns the metric for the given id.
QPrinter::PrinterState state
QPdfPrintEngine(QPrinter::PrinterMode m, QPdfEngine::PdfVersion version=QPdfEngine::Version_1_4)
virtual ~QPdfPrintEngine()
bool begin(QPaintDevice *pdev) override
Reimplement this function to initialise your paint engine when painting is to start on the paint devi...
bool newPage() override
Instructs the print engine to start a new page.
virtual void setProperty(PrintEnginePropertyKey key, const QVariant &value) override
Sets the print engine's property specified by key to the given value.
virtual QVariant property(PrintEnginePropertyKey key) const override
Returns the print engine's property specified by key.
PrintEnginePropertyKey
This enum is used to communicate properties between the print engine and QPrinter.
@ PPK_SupportedResolutions
@ PPK_SupportsMultipleCopies
PaperSource
This enum type specifies what paper source QPrinter is to use.
ColorMode
This enum type is used to indicate whether QPrinter should print in color or not.
PrinterMode
This enum describes the mode the printer should work in.
PageOrder
This enum type is used by QPrinter to tell the application program how to print.
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
Combined button and popup list for selecting options.
std::pair< T1, T2 > QPair
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
Q_GUI_EXPORT int qt_defaultDpi()
constexpr decltype(auto) qMakePair(T1 &&value1, T2 &&value2) noexcept(noexcept(std::make_pair(std::forward< T1 >(value1), std::forward< T2 >(value2))))