Qt 4.8
|
The QPrintEngine class defines an interface for how QPrinter interacts with a given printing subsystem. More...
#include <qprintengine.h>
Public Types | |
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_SuppressSystemPrintStatus, PPK_Duplex, PPK_PaperSources, PPK_CustomPaperSize, PPK_PageMargins, PPK_CopyCount, PPK_SupportsMultipleCopies, PPK_PaperSize = PPK_PageSize, PPK_CustomBase = 0xff00 } |
This enum is used to communicate properties between the print engine and QPrinter. More... | |
Public Functions | |
virtual bool | abort ()=0 |
Instructs the print engine to abort the printing process. More... | |
virtual HDC | getPrinterDC () const |
virtual int | metric (QPaintDevice::PaintDeviceMetric) const =0 |
Returns the metric for the given id. More... | |
virtual bool | newPage ()=0 |
Instructs the print engine to start a new page. More... | |
virtual QPrinter::PrinterState | printerState () const =0 |
Returns the current state of the printer being used by the print engine. More... | |
virtual QVariant | property (PrintEnginePropertyKey key) const =0 |
Returns the print engine's property specified by key. More... | |
virtual void | releasePrinterDC (HDC) const |
virtual void | setProperty (PrintEnginePropertyKey key, const QVariant &value)=0 |
Sets the print engine's property specified by key to the given value. More... | |
virtual | ~QPrintEngine () |
Destroys the print engine. More... | |
The QPrintEngine class defines an interface for how QPrinter interacts with a given printing subsystem.
The common case when creating your own print engine is to derive from both QPaintEngine and QPrintEngine. Various properties of a print engine are given with property() and set with setProperty().
Definition at line 56 of file qprintengine.h.
This enum is used to communicate properties between the print engine and QPrinter.
A property may or may not be supported by a given print engine.
Definition at line 60 of file qprintengine.h.
|
inlinevirtual |
|
pure virtual |
Instructs the print engine to abort the printing process.
Returns true if successful; otherwise returns false.
Implemented in QPdfEngine, QPreviewPaintEngine, QWin32PrintEngine, QPSPrintEngine, QMacPrintEngine, and QtopiaPrintEngine.
|
inlinevirtual |
Reimplemented in QWin32PrintEngine.
Definition at line 107 of file qprintengine.h.
|
pure virtual |
Returns the metric for the given id.
Implemented in QPdfBaseEngine, QPreviewPaintEngine, QtopiaPrintEngine, QWin32PrintEngine, and QMacPrintEngine.
|
pure virtual |
Instructs the print engine to start a new page.
Returns true if the printer was able to create the new page; otherwise returns false.
Implemented in QPdfBaseEngine, QPdfEngine, QPreviewPaintEngine, QWin32PrintEngine, QPSPrintEngine, QMacPrintEngine, and QtopiaPrintEngine.
|
pure virtual |
Returns the current state of the printer being used by the print engine.
Implemented in QPdfEngine, QPreviewPaintEngine, QWin32PrintEngine, QPSPrintEngine, QtopiaPrintEngine, and QMacPrintEngine.
|
pure virtual |
Returns the print engine's property specified by key.
Implemented in QPdfBaseEngine, QtopiaPrintEngine, QPreviewPaintEngine, QWin32PrintEngine, and QMacPrintEngine.
Referenced by QPrinter::setOutputFormat().
|
inlinevirtual |
Reimplemented in QWin32PrintEngine.
Definition at line 108 of file qprintengine.h.
|
pure virtual |
Sets the print engine's property specified by key to the given value.
Implemented in QPdfBaseEngine, QtopiaPrintEngine, QPreviewPaintEngine, QWin32PrintEngine, and QMacPrintEngine.
Referenced by QUnixPrintWidgetPrivate::setCupsProperties(), and QPageSetupWidget::setupPrinter().