5#ifndef QPAINTENGINE_PREVIEW_P_H
6#define QPAINTENGINE_PREVIEW_P_H
20#include <QtPrintSupport/private/qtprintsupportglobal_p.h>
21#include <QtGui/qpaintengine.h>
22#include <QtPrintSupport/qprintengine.h>
28class QPreviewPaintEnginePrivate;
37 bool begin(QPaintDevice *dev)
override;
40 void updateState(
const QPaintEngineState &state)
override;
42 void drawPath(
const QPainterPath &path)
override;
43 void drawPolygon(
const QPointF *points,
int pointCount, PolygonDrawMode mode)
override;
44 void drawTextItem(
const QPointF &p,
const QTextItem &textItem)
override;
46 void drawPixmap(
const QRectF &r,
const QPixmap &pm,
const QRectF &sr)
override;
47 void drawTiledPixmap(
const QRectF &r,
const QPixmap &pm,
const QPointF &p)
override;
53 void setProxyEngines(QPrintEngine *printEngine, QPaintEngine *paintEngine);
55 void setProperty(PrintEnginePropertyKey key,
const QVariant &value)
override;
void drawPath(const QPainterPath &path) override
The default implementation ignores the path and does nothing.
void setProxyEngines(QPrintEngine *printEngine, QPaintEngine *paintEngine)
bool begin(QPaintDevice *dev) override
Reimplement this function to initialise your paint engine when painting is to start on the paint devi...
QList< const QPicture * > pages()
void drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode) override
Reimplement this virtual function to draw the polygon defined by the pointCount first points in point...
bool abort() override
Instructs the print engine to abort the printing process.
void drawTextItem(const QPointF &p, const QTextItem &textItem) override
This function draws the text item textItem at position p.
QPaintEngine::Type type() const override
Reimplement this function to return the paint engine \l{Type}.
bool end() override
Reimplement this function to finish painting on the current paint device.
QVariant property(PrintEnginePropertyKey key) const override
Returns the print engine's property specified by key.
void updateState(const QPaintEngineState &state) override
Reimplement this function to update the state of a paint engine.
QPrinter::PrinterState printerState() const override
Returns the current state of the printer being used by the print engine.
int metric(QPaintDevice::PaintDeviceMetric) const override
Returns the metric for the given id.
bool newPage() override
Instructs the print engine to start a new page.
void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr) override
Reimplement this function to draw the part of the pm specified by the sr rectangle in the given r.
void drawTiledPixmap(const QRectF &r, const QPixmap &pm, const QPointF &p) override
Reimplement this function to draw the pixmap in the given rect, starting at the given p.
void setProperty(PrintEnginePropertyKey key, const QVariant &value) override
Sets the print engine's property specified by key to the given value.
QT_REQUIRE_CONFIG(printpreviewwidget)