File: qprintengine.html

package info (click to toggle)
python-qt4 4.0.1-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 18,632 kB
  • ctags: 2,639
  • sloc: python: 29,409; sh: 5,646; cpp: 3,168; xml: 149; makefile: 109
file content (136 lines) | stat: -rw-r--r-- 10,733 bytes parent folder | download
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<?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">&#160;&#160;</td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <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&#160;<i>key</i>)</li><li><div class="fn" /><b><a href="qprintengine.html#setProperty">setProperty</a></b> (<i>self</i>, PrintEnginePropertyKey&#160;<i>key</i>, QVariant&#160;<i>value</i>)</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>
<table border="1" cellpadding="2" cellspacing="1" 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 bool value describing wether 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"> </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_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">Specifies a <a href="qprinter.html#PageSize-enum">QPrinter.PageSize</a> value.</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_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_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_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_CustomBase</tt></td>
<td align="center" valign="top"><tt>0xff00</tt></td>
<td valign="top">Basis for extension.</td>
</tr>
</table>
<br />
<br />
<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>
<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>
<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>
<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>
<h3 class="fn"><a name="property" /><a href="qvariant.html">QVariant</a> QPrintEngine.property (<i>self</i>, <a href="qprintengine.html#PrintEnginePropertyKey-enum">PrintEnginePropertyKey</a>&#160;<i>key</i>)</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>
<h3 class="fn"><a name="setProperty" />QPrintEngine.setProperty (<i>self</i>, <a href="qprintengine.html#PrintEnginePropertyKey-enum">PrintEnginePropertyKey</a>&#160;<i>key</i>, <a href="qvariant.html">QVariant</a>&#160;<i>value</i>)</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>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td width="25%">PyQt&#160;4.0.1 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.trolltech.com">Trolltech&#160;AS</a> 2006</td><td align="right" width="25%">Qt&#160;4.1.4</td></tr></table></div></address></body></html>