QtBase  v6.3.1
Public Member Functions | Friends | List of all members
QWin32PrintEngine Class Reference

#include <qprintengine_win_p.h>

Inheritance diagram for QWin32PrintEngine:
Inheritance graph
[legend]
Collaboration diagram for QWin32PrintEngine:
Collaboration graph
[legend]

Public Member Functions

 QWin32PrintEngine (QPrinter::PrinterMode mode, const QString &deviceId)
 
bool begin (QPaintDevice *dev) override
 
bool end () override
 
void updateState (const QPaintEngineState &state) override
 
void updateMatrix (const QTransform &matrix)
 
void updateClipPath (const QPainterPath &clip, Qt::ClipOperation op)
 
void drawPath (const QPainterPath &path) override
 
void drawPolygon (const QPointF *points, int pointCount, PolygonDrawMode mode) override
 
void drawTextItem (const QPointF &p, const QTextItem &textItem) override
 
void drawPixmap (const QRectF &r, const QPixmap &pm, const QRectF &sr) override
 
void drawTiledPixmap (const QRectF &r, const QPixmap &pm, const QPointF &p) override
 
void setProperty (PrintEnginePropertyKey key, const QVariant &value) override
 
QVariant property (PrintEnginePropertyKey key) const override
 
bool newPage () override
 
bool abort () override
 
int metric (QPaintDevice::PaintDeviceMetric) const override
 
QPrinter::PrinterState printerState () const override
 
QPaintEngine::Type type () const override
 
HDC getDC () const
 
void releaseDC (HDC) const
 
void setGlobalDevMode (HGLOBAL globalDevNames, HGLOBAL globalDevMode)
 
HGLOBAL * createGlobalDevNames ()
 
HGLOBAL globalDevMode ()
 
- Public Member Functions inherited from QAlphaPaintEngine
 ~QAlphaPaintEngine ()
 
- Public Member Functions inherited from QPaintEngine
 QPaintEngine (PaintEngineFeatures features=PaintEngineFeatures())
 
virtual ~QPaintEngine ()
 
bool isActive () const
 
void setActive (bool newState)
 
virtual void drawRects (const QRect *rects, int rectCount)
 
virtual void drawRects (const QRectF *rects, int rectCount)
 
virtual void drawLines (const QLine *lines, int lineCount)
 
virtual void drawLines (const QLineF *lines, int lineCount)
 
virtual void drawEllipse (const QRectF &r)
 
virtual void drawEllipse (const QRect &r)
 
virtual void drawPoints (const QPointF *points, int pointCount)
 
virtual void drawPoints (const QPoint *points, int pointCount)
 
virtual void drawPolygon (const QPoint *points, int pointCount, PolygonDrawMode mode)
 
virtual void drawImage (const QRectF &r, const QImage &pm, const QRectF &sr, Qt::ImageConversionFlags flags=Qt::AutoColor)
 
void setPaintDevice (QPaintDevice *device)
 
QPaintDevicepaintDevice () const
 
void setSystemClip (const QRegion &baseClip)
 
QRegion systemClip () const
 
void setSystemRect (const QRect &rect)
 
QRect systemRect () const
 
virtual QPoint coordinateOffset () const
 
void fix_neg_rect (int *x, int *y, int *w, int *h)
 
bool testDirty (DirtyFlags df)
 
void setDirty (DirtyFlags df)
 
void clearDirty (DirtyFlags df)
 
bool hasFeature (PaintEngineFeatures feature) const
 
QPainterpainter () const
 
void syncState ()
 
bool isExtended () const
 
virtual QPixmap createPixmap (QSize size)
 
virtual QPixmap createPixmapFromImage (QImage image, Qt::ImageConversionFlags flags=Qt::AutoColor)
 
- Public Member Functions inherited from QPrintEngine
virtual ~QPrintEngine ()
 

Friends

class QPrintDialog
 
class QPageSetupDialog
 

Additional Inherited Members

- Public Types inherited from QPaintEngine
enum  PaintEngineFeature {
  PrimitiveTransform = 0x00000001 , PatternTransform = 0x00000002 , PixmapTransform = 0x00000004 , PatternBrush = 0x00000008 ,
  LinearGradientFill = 0x00000010 , RadialGradientFill = 0x00000020 , ConicalGradientFill = 0x00000040 , AlphaBlend = 0x00000080 ,
  PorterDuff = 0x00000100 , PainterPaths = 0x00000200 , Antialiasing = 0x00000400 , BrushStroke = 0x00000800 ,
  ConstantOpacity = 0x00001000 , MaskedBrush = 0x00002000 , PerspectiveTransform = 0x00004000 , BlendModes = 0x00008000 ,
  ObjectBoundingModeGradients = 0x00010000 , RasterOpModes = 0x00020000 , PaintOutsidePaintEvent = 0x20000000 , AllFeatures = 0xffffffff
}
 
enum  DirtyFlag {
  DirtyPen = 0x0001 , DirtyBrush = 0x0002 , DirtyBrushOrigin = 0x0004 , DirtyFont = 0x0008 ,
  DirtyBackground = 0x0010 , DirtyBackgroundMode = 0x0020 , DirtyTransform = 0x0040 , DirtyClipRegion = 0x0080 ,
  DirtyClipPath = 0x0100 , DirtyHints = 0x0200 , DirtyCompositionMode = 0x0400 , DirtyClipEnabled = 0x0800 ,
  DirtyOpacity = 0x1000 , AllDirty = 0xffff
}
 
enum  PolygonDrawMode { OddEvenMode , WindingMode , ConvexMode , PolylineMode }
 
enum  Type {
  X11 , Windows , QuickDraw , CoreGraphics ,
  MacPrinter , QWindowSystem , OpenGL , Picture ,
  SVG , Raster , Direct3D , Pdf ,
  OpenVG , OpenGL2 , PaintBuffer , Blitter ,
  Direct2D , User = 50 , MaxUser = 100
}
 
- Public Types inherited from QPrintEngine
enum  PrintEnginePropertyKey {
  PPK_CollateCopies , PPK_ColorMode , PPK_Creator , PPK_DocumentName ,
  PPK_FullPage , PPK_NumberOfCopies , PPK_Orientation , PPK_OutputFileName ,
  PPK_PageOrder , PPK_PageRect , PPK_PageSize , PPK_PaperRect ,
  PPK_PaperSource , PPK_PrinterName , PPK_PrinterProgram , PPK_Resolution ,
  PPK_SelectionOption , PPK_SupportedResolutions , PPK_WindowsPageSize , PPK_FontEmbedding ,
  PPK_Duplex , PPK_PaperSources , PPK_CustomPaperSize , PPK_PageMargins ,
  PPK_CopyCount , PPK_SupportsMultipleCopies , PPK_PaperName , PPK_QPageSize ,
  PPK_QPageMargins , PPK_QPageLayout , PPK_PaperSize = PPK_PageSize , PPK_CustomBase = 0xff00
}
 
- Protected Member Functions inherited from QAlphaPaintEngine
 QAlphaPaintEngine (QAlphaPaintEnginePrivate &data, PaintEngineFeatures devcaps={ })
 
QRegion alphaClipping () const
 
bool continueCall () const
 
void flushAndInit (bool init=true)
 
void cleanUp ()
 
- Protected Member Functions inherited from QPaintEngine
 QPaintEngine (QPaintEnginePrivate &data, PaintEngineFeatures devcaps=PaintEngineFeatures())
 
- Protected Attributes inherited from QPaintEngine
QPaintEngineStatestate
 
PaintEngineFeatures gccaps
 
uint active: 1
 
uint selfDestruct: 1
 
uint extended: 1
 
QScopedPointer< QPaintEnginePrivated_ptr
 

Detailed Description

Definition at line 72 of file qprintengine_win_p.h.

Constructor & Destructor Documentation

◆ QWin32PrintEngine()

QWin32PrintEngine::QWin32PrintEngine ( QPrinter::PrinterMode  mode,
const QString deviceId 
)

Definition at line 82 of file qprintengine_win.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ abort()

bool QWin32PrintEngine::abort ( )
overridevirtual

Instructs the print engine to abort the printing process. Returns true if successful; otherwise returns false.

Implements QPrintEngine.

Definition at line 275 of file qprintengine_win.cpp.

◆ begin()

bool QWin32PrintEngine::begin ( QPaintDevice pdev)
overridevirtual

Reimplement this function to initialise your paint engine when painting is to start on the paint device pdev. Return true if the initialization was successful; otherwise return false.

See also
end(), isActive()

Reimplemented from QAlphaPaintEngine.

Definition at line 112 of file qprintengine_win.cpp.

Here is the call graph for this function:

◆ createGlobalDevNames()

HGLOBAL * QWin32PrintEngine::createGlobalDevNames ( )

Definition at line 1568 of file qprintengine_win.cpp.

Here is the caller graph for this function:

◆ drawPath()

void QWin32PrintEngine::drawPath ( const QPainterPath path)
overridevirtual

The default implementation ignores the path and does nothing.

Reimplemented from QAlphaPaintEngine.

Definition at line 809 of file qprintengine_win.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawPixmap()

void QWin32PrintEngine::drawPixmap ( const QRectF r,
const QPixmap pm,
const QRectF sr 
)
overridevirtual

Reimplement this function to draw the part of the pm specified by the sr rectangle in the given r.

Reimplemented from QAlphaPaintEngine.

Definition at line 523 of file qprintengine_win.cpp.

Here is the call graph for this function:

◆ drawPolygon()

void QWin32PrintEngine::drawPolygon ( const QPointF points,
int  pointCount,
PolygonDrawMode  mode 
)
overridevirtual

Reimplement this virtual function to draw the polygon defined by the pointCount first points in points, using mode mode.

Note
At least one of the drawPolygon() functions must be reimplemented.

Reimplemented from QAlphaPaintEngine.

Definition at line 829 of file qprintengine_win.cpp.

Here is the call graph for this function:

◆ drawTextItem()

void QWin32PrintEngine::drawTextItem ( const QPointF p,
const QTextItem textItem 
)
overridevirtual

This function draws the text item textItem at position p. The default implementation of this function converts the text to a QPainterPath and paints the resulting path.

Reimplemented from QAlphaPaintEngine.

Definition at line 281 of file qprintengine_win.cpp.

Here is the call graph for this function:

◆ drawTiledPixmap()

void QWin32PrintEngine::drawTiledPixmap ( const QRectF rect,
const QPixmap pixmap,
const QPointF p 
)
overridevirtual

Reimplement this function to draw the pixmap in the given rect, starting at the given p. The pixmap will be drawn repeatedly until the rect is filled.

Reimplemented from QAlphaPaintEngine.

Definition at line 623 of file qprintengine_win.cpp.

Here is the call graph for this function:

◆ end()

bool QWin32PrintEngine::end ( )
overridevirtual

Reimplement this function to finish painting on the current paint device. Return true if painting was finished successfully; otherwise return false.

See also
begin(), isActive()

Reimplemented from QAlphaPaintEngine.

Definition at line 181 of file qprintengine_win.cpp.

Here is the call graph for this function:

◆ getDC()

HDC QWin32PrintEngine::getDC ( ) const

Definition at line 1558 of file qprintengine_win.cpp.

◆ globalDevMode()

HGLOBAL QWin32PrintEngine::globalDevMode ( )

Definition at line 1628 of file qprintengine_win.cpp.

◆ metric()

int QWin32PrintEngine::metric ( QPaintDevice::PaintDeviceMetric  id) const
overridevirtual

Returns the metric for the given id.

Implements QPrintEngine.

Definition at line 347 of file qprintengine_win.cpp.

Here is the call graph for this function:

◆ newPage()

bool QWin32PrintEngine::newPage ( )
overridevirtual

Instructs the print engine to start a new page. Returns true if the printer was able to create the new page; otherwise returns false.

Implements QPrintEngine.

Definition at line 209 of file qprintengine_win.cpp.

Here is the call graph for this function:

◆ printerState()

QPrinter::PrinterState QWin32PrintEngine::printerState ( ) const
overridevirtual

Returns the current state of the printer being used by the print engine.

Implements QPrintEngine.

Definition at line 1553 of file qprintengine_win.cpp.

◆ property()

QVariant QWin32PrintEngine::property ( PrintEnginePropertyKey  key) const
overridevirtual

Returns the print engine's property specified by key.

See also
setProperty()

Implements QPrintEngine.

Definition at line 1362 of file qprintengine_win.cpp.

Here is the caller graph for this function:

◆ releaseDC()

void QWin32PrintEngine::releaseDC ( HDC  ) const

Definition at line 1563 of file qprintengine_win.cpp.

◆ setGlobalDevMode()

void QWin32PrintEngine::setGlobalDevMode ( HGLOBAL  globalDevNames,
HGLOBAL  globalDevMode 
)

Definition at line 1588 of file qprintengine_win.cpp.

Here is the call graph for this function:

◆ setProperty()

void QWin32PrintEngine::setProperty ( PrintEnginePropertyKey  key,
const QVariant value 
)
overridevirtual

Sets the print engine's property specified by key to the given value.

See also
property()

Implements QPrintEngine.

Definition at line 1053 of file qprintengine_win.cpp.

Here is the call graph for this function:

◆ type()

QPaintEngine::Type QWin32PrintEngine::type ( ) const
inlineoverridevirtual

Reimplement this function to return the paint engine \l{Type}.

Implements QPaintEngine.

Definition at line 102 of file qprintengine_win_p.h.

◆ updateClipPath()

void QWin32PrintEngine::updateClipPath ( const QPainterPath clip,
Qt::ClipOperation  op 
)

Definition at line 466 of file qprintengine_win.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateMatrix()

void QWin32PrintEngine::updateMatrix ( const QTransform matrix)

Definition at line 505 of file qprintengine_win.cpp.

Here is the caller graph for this function:

◆ updateState()

void QWin32PrintEngine::updateState ( const QPaintEngineState state)
overridevirtual

Reimplement this function to update the state of a paint engine.

When implemented, this function is responsible for checking the paint engine's current state and update the properties that are changed. Use the QPaintEngineState::state() function to find out which properties that must be updated, then use the corresponding \l {GetFunction}{get function} to retrieve the current values for the given properties.

See also
QPaintEngineState

Reimplemented from QAlphaPaintEngine.

Definition at line 425 of file qprintengine_win.cpp.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ QPageSetupDialog

friend class QPageSetupDialog
friend

Definition at line 114 of file qprintengine_win_p.h.

◆ QPrintDialog

friend class QPrintDialog
friend

Definition at line 113 of file qprintengine_win_p.h.


The documentation for this class was generated from the following files: