#include <qprintengine.h>
Inheritance diagram for QPrintEngine:

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 36 of file qprintengine.h.
Public Types | |
| enum | PrintEnginePropertyKey |
Public Member Functions | |
| virtual | ~QPrintEngine () |
| virtual void | setProperty (PrintEnginePropertyKey key, const QVariant &value)=0 |
| virtual QVariant | property (PrintEnginePropertyKey key) const=0 |
| virtual bool | newPage ()=0 |
| virtual bool | abort ()=0 |
| virtual int | metric (QPaintDevice::PaintDeviceMetric) const=0 |
| virtual QPrinter::PrinterState | printerState () const=0 |
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.
PPK_CollateCopies A boolean value indicating whether the printout should be collated or not.
PPK_ColorMode Refers to QPrinter::ColorMode, either color or monochrome.
PPK_Creator A string describing the document's creator.
PPK_Duplex A boolean value indicating whether both sides of the printer paper should be used for the printout.
PPK_DocumentName A string describing the document name in the spooler.
PPK_FontEmbedding A boolean value indicating whether data for the document's fonts should be embedded in the data sent to the printer.
PPK_FullPage A boolean describing if the printer should be full page or not.
PPK_NumberOfCopies An integer specifying the number of copies
PPK_Orientation Specifies a QPrinter::Orientation value.
PPK_OutputFileName The output file name as a string. An empty file name indicates that the printer should not print to a file.
PPK_PageOrder Specifies a QPrinter::PageOrder value.
PPK_PageRect A QRect specifying the page rectangle
PPK_PageSize Specifies a QPrinter::PageSize value.
PPK_PaperRect A QRect specifying the paper rectangle.
PPK_PaperSource Specifies a QPrinter::PaperSource value.
PPK_PrinterName A string specifying the name of the printer.
PPK_PrinterProgram A string specifying the name of the printer program used for printing,
PPK_Resolution An integer describing the dots per inch for this printer.
PPK_SelectionOption
PPK_SupportedResolutions A list of integer QVariants describing the set of supported resolutions that the printer has.
PPK_SuppressSystemPrintStatus Suppress the built-in dialog for showing printing progress. As of 4.1 this only has effect on Mac OS X where, by default, a status dialog is shown.
PPK_WindowsPageSize An integer specifying a DM_PAPER entry on Windows.
PPK_CustomBase Basis for extension.
Definition at line 40 of file qprintengine.h.
00040 { 00041 PPK_CollateCopies, 00042 PPK_ColorMode, 00043 PPK_Creator, 00044 PPK_DocumentName, 00045 PPK_FullPage, 00046 PPK_NumberOfCopies, 00047 PPK_Orientation, 00048 PPK_OutputFileName, 00049 PPK_PageOrder, 00050 PPK_PageRect, 00051 PPK_PageSize, 00052 PPK_PaperRect, 00053 PPK_PaperSource, 00054 PPK_PrinterName, 00055 PPK_PrinterProgram, 00056 PPK_Resolution, 00057 PPK_SelectionOption, 00058 PPK_SupportedResolutions, 00059 00060 PPK_WindowsPageSize, 00061 PPK_FontEmbedding, 00062 PPK_SuppressSystemPrintStatus, 00063 00064 PPK_Duplex, 00065 00066 PPK_CustomBase = 0xff00 00067 };
| QPrintEngine::~QPrintEngine | ( | ) | [inline, virtual] |
| void QPrintEngine::setProperty | ( | PrintEnginePropertyKey | key, | |
| const QVariant & | value | |||
| ) | [pure virtual] |
Sets the print engine's property specified by key to the given value.
Referenced by QPrintDialogPrivate::setupPrinter().
| void QPrintEngine::property | ( | PrintEnginePropertyKey | key | ) | const [pure virtual] |
Returns the print engine's property specified by key.
Referenced by QPrinter::setOutputFormat().
| bool QPrintEngine::newPage | ( | ) | [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.
| bool QPrintEngine::abort | ( | ) | [pure virtual] |
Instructs the print engine to abort the printing process. Returns true if successful; otherwise returns false.
| int QPrintEngine::metric | ( | QPaintDevice::PaintDeviceMetric | id | ) | const [pure virtual] |
Returns the metric for the given id.
| QPrinter::PrinterState QPrintEngine::printerState | ( | ) | const [pure virtual] |
Returns the current state of the printer being used by the print engine.
1.5.1