1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QPrintEngine Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">  </td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QPrintEngine Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QPrintEngine class defines an interface for how <a href="qprinter.html">QPrinter</a> interacts with a given printing subsystem. <a href="#details">More...</a></p>
<h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qprintengine.html#PrintEnginePropertyKey-enum">PrintEnginePropertyKey</a></b> { PPK_CollateCopies, PPK_ColorMode, PPK_Creator, PPK_DocumentName, ..., PPK_CustomBase }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qprintengine.html#QPrintEngine">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qprintengine.html#QPrintEngine-2">__init__</a></b> (<i>self</i>, QPrintEngine)</li><li><div class="fn" />bool <b><a href="qprintengine.html#abort">abort</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qprintengine.html#metric">metric</a></b> (<i>self</i>, QPaintDevice.PaintDeviceMetric)</li><li><div class="fn" />bool <b><a href="qprintengine.html#newPage">newPage</a></b> (<i>self</i>)</li><li><div class="fn" />QPrinter.PrinterState <b><a href="qprintengine.html#printerState">printerState</a></b> (<i>self</i>)</li><li><div class="fn" />QVariant <b><a href="qprintengine.html#property">property</a></b> (<i>self</i>, PrintEnginePropertyKey)</li><li><div class="fn" /><b><a href="qprintengine.html#setProperty">setProperty</a></b> (<i>self</i>, PrintEnginePropertyKey, QVariant)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QPrintEngine class defines an interface for how <a href="qprinter.html">QPrinter</a> interacts with a given printing subsystem.</p>
<p>The common case when creating your own print engine is to derive from both <a href="qpaintengine.html">QPaintEngine</a> and QPrintEngine. Various properties of a print engine are given with <a href="qprintengine.html#property">property</a>() and set with <a href="qprintengine.html#setProperty">setProperty</a>().</p>
<p>See also <a href="qpaintengine.html">QPaintEngine</a>.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="PrintEnginePropertyKey-enum" />QPrintEngine.PrintEnginePropertyKey</h3><p>This enum is used to communicate properties between the print engine and <a href="qprinter.html">QPrinter</a>. A property may or may not be supported by a given print engine.</p>
<p><table border="1" cellpadding="2" cellspacing="1" class="valuelist" width="100%">
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
<tr><td valign="top"><tt>QPrintEngine.PPK_CollateCopies</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">A boolean value indicating whether the printout should be collated or not.</td></tr>
<tr><td valign="top"><tt>QPrintEngine.PPK_ColorMode</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">Refers to <a href="qprinter.html#ColorMode-enum">QPrinter.ColorMode</a>, either color or monochrome.</td></tr>
<tr><td valign="top"><tt>QPrintEngine.PPK_Creator</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">A string describing the document's creator.</td></tr>
<tr><td valign="top"><tt>QPrintEngine.PPK_Duplex</tt></td><td align="center" valign="top"><tt>21</tt></td><td valign="top">A boolean value indicating whether both sides of the printer paper should be used for the printout.</td></tr>
<tr><td valign="top"><tt>QPrintEngine.PPK_DocumentName</tt></td><td align="center" valign="top"><tt>3</tt></td><td valign="top">A string describing the document name in the spooler.</td></tr>
<tr><td valign="top"><tt>QPrintEngine.PPK_FontEmbedding</tt></td><td align="center" valign="top"><tt>19</tt></td><td valign="top">A boolean value indicating whether data for the document's fonts should be embedded in the data sent to the printer.</td></tr>
<tr><td valign="top"><tt>QPrintEngine.PPK_FullPage</tt></td><td align="center" valign="top"><tt>4</tt></td><td valign="top">A boolean describing if the printer should be full page or not.</td></tr>
<tr><td valign="top"><tt>QPrintEngine.PPK_NumberOfCopies</tt></td><td align="center" valign="top"><tt>5</tt></td><td valign="top">An integer specifying the number of copies</td></tr>
<tr><td valign="top"><tt>QPrintEngine.PPK_Orientation</tt></td><td align="center" valign="top"><tt>6</tt></td><td valign="top">Specifies a <a href="qprinter.html#Orientation-enum">QPrinter.Orientation</a> value.</td></tr>
<tr><td valign="top"><tt>QPrintEngine.PPK_OutputFileName</tt></td><td align="center" valign="top"><tt>7</tt></td><td valign="top">The output file name as a string. An empty file name indicates that the printer should not print to a file.</td></tr>
<tr><td valign="top"><tt>QPrintEngine.PPK_PageOrder</tt></td><td align="center" valign="top"><tt>8</tt></td><td valign="top">Specifies a <a href="qprinter.html#PageOrder-enum">QPrinter.PageOrder</a> value.</td></tr>
<tr><td valign="top"><tt>QPrintEngine.PPK_PageRect</tt></td><td align="center" valign="top"><tt>9</tt></td><td valign="top">A <a href="qrect.html">QRect</a> specifying the page rectangle</td></tr>
<tr><td valign="top"><tt>QPrintEngine.PPK_PageSize</tt></td><td align="center" valign="top"><tt>10</tt></td><td valign="top">Obsolete. Use PPK_PaperSize instead.</td></tr>
<tr><td valign="top"><tt>QPrintEngine.PPK_PaperRect</tt></td><td align="center" valign="top"><tt>11</tt></td><td valign="top">A <a href="qrect.html">QRect</a> specifying the paper rectangle.</td></tr>
<tr><td valign="top"><tt>QPrintEngine.PPK_PaperSource</tt></td><td align="center" valign="top"><tt>12</tt></td><td valign="top">Specifies a <a href="qprinter.html#PaperSource-enum">QPrinter.PaperSource</a> value.</td></tr>
<tr><td valign="top"><tt>QPrintEngine.PPK_PaperSources</tt></td><td align="center" valign="top"><tt>22</tt></td><td valign="top">Specifies more than one <a href="qprinter.html#PaperSource-enum">QPrinter.PaperSource</a> value.</td></tr>
<tr><td valign="top"><tt>QPrintEngine.PPK_PaperSize</tt></td><td align="center" valign="top"><tt>PPK_PageSize</tt></td><td valign="top">Specifies a <a href="qprinter.html#PaperSize-enum">QPrinter.PaperSize</a> value.</td></tr>
<tr><td valign="top"><tt>QPrintEngine.PPK_PrinterName</tt></td><td align="center" valign="top"><tt>13</tt></td><td valign="top">A string specifying the name of the printer.</td></tr>
<tr><td valign="top"><tt>QPrintEngine.PPK_PrinterProgram</tt></td><td align="center" valign="top"><tt>14</tt></td><td valign="top">A string specifying the name of the printer program used for printing,</td></tr>
<tr><td valign="top"><tt>QPrintEngine.PPK_Resolution</tt></td><td align="center" valign="top"><tt>15</tt></td><td valign="top">An integer describing the dots per inch for this printer.</td></tr>
<tr><td valign="top"><tt>QPrintEngine.PPK_SelectionOption</tt></td><td align="center" valign="top"><tt>16</tt></td><td valign="top"> </td></tr>
<tr><td valign="top"><tt>QPrintEngine.PPK_SupportedResolutions</tt></td><td align="center" valign="top"><tt>17</tt></td><td valign="top">A list of integer QVariants describing the set of supported resolutions that the printer has.</td></tr>
<tr><td valign="top"><tt>QPrintEngine.PPK_SuppressSystemPrintStatus</tt></td><td align="center" valign="top"><tt>20</tt></td><td valign="top">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.</td></tr>
<tr><td valign="top"><tt>QPrintEngine.PPK_WindowsPageSize</tt></td><td align="center" valign="top"><tt>18</tt></td><td valign="top">An integer specifying a DM_PAPER entry on Windows.</td></tr>
<tr><td valign="top"><tt>QPrintEngine.PPK_CustomPaperSize</tt></td><td align="center" valign="top"><tt>23</tt></td><td valign="top">A <a href="qsizef.html">QSizeF</a> specifying a custom paper size in the <a href="qprinter.html#Unit-enum">QPrinter.Point</a> unit.</td></tr>
<tr><td valign="top"><tt>QPrintEngine.PPK_PageMargins</tt></td><td align="center" valign="top"><tt>24</tt></td><td valign="top">A <a href="qlist.html">QList</a><<a href="qvariant.html">QVariant</a>> containing the left, top, right and bottom margin values.</td></tr>
<tr><td valign="top"><tt>QPrintEngine.PPK_CustomBase</tt></td><td align="center" valign="top"><tt>0xff00</tt></td><td valign="top">Basis for extension.</td></tr>
</table></p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QPrintEngine" />QPrintEngine.__init__ (<i>self</i>)</h3><h3 class="fn"><a name="QPrintEngine-2" />QPrintEngine.__init__ (<i>self</i>, <a href="qprintengine.html">QPrintEngine</a>)</h3><h3 class="fn"><a name="abort" />bool QPrintEngine.abort (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Instructs the print engine to abort the printing process. Returns true if successful; otherwise returns false.</p>
<a name="//apple_ref/cpp/instm/QPrintEngine/metric" />
<h3 class="fn"><a name="metric" />int QPrintEngine.metric (<i>self</i>, <a href="qpaintdevice.html#PaintDeviceMetric-enum">QPaintDevice.PaintDeviceMetric</a>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns the metric for the given <i>id</i>.</p>
<a name="//apple_ref/cpp/instm/QPrintEngine/newPage" />
<h3 class="fn"><a name="newPage" />bool QPrintEngine.newPage (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Instructs the print engine to start a new page. Returns true if the printer was able to create the new page; otherwise returns false.</p>
<a name="//apple_ref/cpp/instm/QPrintEngine/printerState" />
<h3 class="fn"><a name="printerState" /><a href="qprinter.html#PrinterState-enum">QPrinter.PrinterState</a> QPrintEngine.printerState (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns the current state of the printer being used by the print engine.</p>
<a name="//apple_ref/cpp/instm/QPrintEngine/property" />
<h3 class="fn"><a name="property" />QVariant QPrintEngine.property (<i>self</i>, <a href="qprintengine.html#PrintEnginePropertyKey-enum">PrintEnginePropertyKey</a>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns the print engine's property specified by <i>key</i>.</p>
<p>See also <a href="qprintengine.html#setProperty">setProperty</a>().</p>
<a name="//apple_ref/cpp/instm/QPrintEngine/setProperty" />
<h3 class="fn"><a name="setProperty" />QPrintEngine.setProperty (<i>self</i>, <a href="qprintengine.html#PrintEnginePropertyKey-enum">PrintEnginePropertyKey</a>, QVariant)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Sets the print engine's property specified by <i>key</i> to the given <i>value</i>.</p>
<p>See also <a href="qprintengine.html#property">property</a>().</p>
<p /><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.7.3 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt 4.6.2</td></tr></table></div></address></body></html>
|