File: qprintengine.html

package info (click to toggle)
python-qt4 4.12.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 40,300 kB
  • ctags: 6,185
  • sloc: python: 125,988; cpp: 13,291; xml: 292; makefile: 246; php: 27; sh: 2
file content (230 lines) | stat: -rw-r--r-- 12,603 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
<?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="index.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>
<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 class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QPrintEngine.PPK_CollateCopies</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">A boolean value indicating whether the
printout should be collated or not.</td>
</tr>
<tr>
<td class="topAlign"><tt>QPrintEngine.PPK_ColorMode</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">Refers to <a href="qprinter.html#ColorMode-enum">QPrinter.ColorMode</a>, either
color or monochrome.</td>
</tr>
<tr>
<td class="topAlign"><tt>QPrintEngine.PPK_Creator</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">A string describing the document's
creator.</td>
</tr>
<tr>
<td class="topAlign"><tt>QPrintEngine.PPK_Duplex</tt></td>
<td class="topAlign"><tt>21</tt></td>
<td class="topAlign">A boolean value indicating whether both sides
of the printer paper should be used for the printout.</td>
</tr>
<tr>
<td class="topAlign"><tt>QPrintEngine.PPK_DocumentName</tt></td>
<td class="topAlign"><tt>3</tt></td>
<td class="topAlign">A string describing the document name in the
spooler.</td>
</tr>
<tr>
<td class="topAlign"><tt>QPrintEngine.PPK_FontEmbedding</tt></td>
<td class="topAlign"><tt>19</tt></td>
<td class="topAlign">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 class="topAlign"><tt>QPrintEngine.PPK_FullPage</tt></td>
<td class="topAlign"><tt>4</tt></td>
<td class="topAlign">A boolean describing if the printer should be
full page or not.</td>
</tr>
<tr>
<td class="topAlign"><tt>QPrintEngine.PPK_NumberOfCopies</tt></td>
<td class="topAlign"><tt>5</tt></td>
<td class="topAlign">Obsolete. An integer specifying the number of
copies. Use PPK_CopyCount instead.</td>
</tr>
<tr>
<td class="topAlign"><tt>QPrintEngine.PPK_Orientation</tt></td>
<td class="topAlign"><tt>6</tt></td>
<td class="topAlign">Specifies a <a href="qprinter.html#Orientation-enum">QPrinter.Orientation</a>
value.</td>
</tr>
<tr>
<td class="topAlign"><tt>QPrintEngine.PPK_OutputFileName</tt></td>
<td class="topAlign"><tt>7</tt></td>
<td class="topAlign">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 class="topAlign"><tt>QPrintEngine.PPK_PageOrder</tt></td>
<td class="topAlign"><tt>8</tt></td>
<td class="topAlign">Specifies a <a href="qprinter.html#PageOrder-enum">QPrinter.PageOrder</a> value.</td>
</tr>
<tr>
<td class="topAlign"><tt>QPrintEngine.PPK_PageRect</tt></td>
<td class="topAlign"><tt>9</tt></td>
<td class="topAlign">A <a href="qrect.html">QRect</a> specifying
the page rectangle</td>
</tr>
<tr>
<td class="topAlign"><tt>QPrintEngine.PPK_PageSize</tt></td>
<td class="topAlign"><tt>10</tt></td>
<td class="topAlign">Obsolete. Use PPK_PaperSize instead.</td>
</tr>
<tr>
<td class="topAlign"><tt>QPrintEngine.PPK_PaperRect</tt></td>
<td class="topAlign"><tt>11</tt></td>
<td class="topAlign">A <a href="qrect.html">QRect</a> specifying
the paper rectangle.</td>
</tr>
<tr>
<td class="topAlign"><tt>QPrintEngine.PPK_PaperSource</tt></td>
<td class="topAlign"><tt>12</tt></td>
<td class="topAlign">Specifies a <a href="qprinter.html#PaperSource-enum">QPrinter.PaperSource</a>
value.</td>
</tr>
<tr>
<td class="topAlign"><tt>QPrintEngine.PPK_PaperSources</tt></td>
<td class="topAlign"><tt>22</tt></td>
<td class="topAlign">Specifies more than one <a href="qprinter.html#PaperSource-enum">QPrinter.PaperSource</a>
value.</td>
</tr>
<tr>
<td class="topAlign"><tt>QPrintEngine.PPK_PaperSize</tt></td>
<td class="topAlign"><tt>PPK_PageSize</tt></td>
<td class="topAlign">Specifies a <a href="qprinter.html#PaperSize-enum">QPrinter.PaperSize</a> value.</td>
</tr>
<tr>
<td class="topAlign"><tt>QPrintEngine.PPK_PrinterName</tt></td>
<td class="topAlign"><tt>13</tt></td>
<td class="topAlign">A string specifying the name of the
printer.</td>
</tr>
<tr>
<td class="topAlign"><tt>QPrintEngine.PPK_PrinterProgram</tt></td>
<td class="topAlign"><tt>14</tt></td>
<td class="topAlign">A string specifying the name of the printer
program used for printing,</td>
</tr>
<tr>
<td class="topAlign"><tt>QPrintEngine.PPK_Resolution</tt></td>
<td class="topAlign"><tt>15</tt></td>
<td class="topAlign">An integer describing the dots per inch for
this printer.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QPrintEngine.PPK_SelectionOption</tt></td>
<td class="topAlign"><tt>16</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign">
<tt>QPrintEngine.PPK_SupportedResolutions</tt></td>
<td class="topAlign"><tt>17</tt></td>
<td class="topAlign">A list of integer <a href="qtwebkit-bridge.html#qvariants">QVariants</a> describing the set
of supported resolutions that the printer has.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QPrintEngine.PPK_SuppressSystemPrintStatus</tt></td>
<td class="topAlign"><tt>20</tt></td>
<td class="topAlign">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 class="topAlign">
<tt>QPrintEngine.PPK_WindowsPageSize</tt></td>
<td class="topAlign"><tt>18</tt></td>
<td class="topAlign">An integer specifying a DM_PAPER entry on
Windows.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QPrintEngine.PPK_CustomPaperSize</tt></td>
<td class="topAlign"><tt>23</tt></td>
<td class="topAlign">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 class="topAlign"><tt>QPrintEngine.PPK_PageMargins</tt></td>
<td class="topAlign"><tt>24</tt></td>
<td class="topAlign">A <a href="qlist.html">QList</a>&lt;<a href="qvariant.html">QVariant</a>&gt; containing the left, top, right
and bottom margin values.</td>
</tr>
<tr>
<td class="topAlign"><tt>QPrintEngine.PPK_CopyCount</tt></td>
<td class="topAlign"><tt>25</tt></td>
<td class="topAlign">An integer specifying the number of copies to
print.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QPrintEngine.PPK_SupportsMultipleCopies</tt></td>
<td class="topAlign"><tt>26</tt></td>
<td class="topAlign">A boolean value indicating whether or not the
printer supports printing multiple copies in one job.</td>
</tr>
<tr>
<td class="topAlign"><tt>QPrintEngine.PPK_CustomBase</tt></td>
<td class="topAlign"><tt>0xff00</tt></td>
<td class="topAlign">Basis for extension.</td>
</tr>
</table>
<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" />QVariant 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><b>See also</b> <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>, QVariant&#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><b>See also</b> <a href="qprintengine.html#property">property</a>().</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.12.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.qt.io">The Qt Company</a> 2015</td><td align="right" width="25%">Qt&#160;4.8.7</td></tr></table></div></address></body></html>