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
|
<?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>QAbstractPrintDialog 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="index.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">QAbstractPrintDialog Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QAbstractPrintDialog class provides a base implementation
for print dialogs used to configure printers. <a href="#details">More...</a></p>
<p>Inherits <a href="qdialog.html">QDialog</a>.</p><p>Inherited by <a href="qprintdialog.html">QPrintDialog</a>.</p><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qabstractprintdialog.html#PrintDialogOption-enum">PrintDialogOption</a></b> { None, PrintToFile, PrintSelection, PrintPageRange, ..., PrintCurrentPage }</li><li><div class="fn" />class <b><a href="qabstractprintdialog-printdialogoptions.html">PrintDialogOptions</a></b></li><li><div class="fn" />enum <b><a href="qabstractprintdialog.html#PrintRange-enum">PrintRange</a></b> { AllPages, Selection, PageRange, CurrentPage }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qabstractprintdialog.html#QAbstractPrintDialog">__init__</a></b> (<i>self</i>, QPrinter <i>printer</i>, QWidget <i>parent</i> = None)</li><li><div class="fn" /><b><a href="qabstractprintdialog.html#addEnabledOption">addEnabledOption</a></b> (<i>self</i>, PrintDialogOption <i>option</i>)</li><li><div class="fn" />PrintDialogOptions <b><a href="qabstractprintdialog.html#enabledOptions">enabledOptions</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qabstractprintdialog.html#exec">exec_</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qabstractprintdialog.html#fromPage">fromPage</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qabstractprintdialog.html#isOptionEnabled">isOptionEnabled</a></b> (<i>self</i>, PrintDialogOption <i>option</i>)</li><li><div class="fn" />int <b><a href="qabstractprintdialog.html#maxPage">maxPage</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qabstractprintdialog.html#minPage">minPage</a></b> (<i>self</i>)</li><li><div class="fn" />QPrinter <b><a href="qabstractprintdialog.html#printer">printer</a></b> (<i>self</i>)</li><li><div class="fn" />PrintRange <b><a href="qabstractprintdialog.html#printRange">printRange</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractprintdialog.html#setEnabledOptions">setEnabledOptions</a></b> (<i>self</i>, PrintDialogOptions <i>options</i>)</li><li><div class="fn" /><b><a href="qabstractprintdialog.html#setFromTo">setFromTo</a></b> (<i>self</i>, int <i>fromPage</i>, int <i>toPage</i>)</li><li><div class="fn" /><b><a href="qabstractprintdialog.html#setMinMax">setMinMax</a></b> (<i>self</i>, int <i>min</i>, int <i>max</i>)</li><li><div class="fn" /><b><a href="qabstractprintdialog.html#setOptionTabs">setOptionTabs</a></b> (<i>self</i>, list-of-QWidget <i>tabs</i>)</li><li><div class="fn" /><b><a href="qabstractprintdialog.html#setPrintRange">setPrintRange</a></b> (<i>self</i>, PrintRange <i>range</i>)</li><li><div class="fn" />int <b><a href="qabstractprintdialog.html#toPage">toPage</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QAbstractPrintDialog class provides a base implementation
for print dialogs used to configure printers.</p>
<p>This class implements getter and setter functions that are used
to customize settings shown in print dialogs, but it is not used
directly. Use <a href="qprintdialog.html">QPrintDialog</a> to
display a print dialog in your application.</p>
<p>In Symbian, there is no support for printing. Hence, this dialog
should not be used in Symbian.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="PrintDialogOption-enum" />QAbstractPrintDialog.PrintDialogOption</h3><p>Used to specify which parts of the print dialog should be
visible.</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>QAbstractPrintDialog.None</tt></td>
<td class="topAlign"><tt>0x0000</tt></td>
<td class="topAlign">None of the options are enabled.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QAbstractPrintDialog.PrintToFile</tt></td>
<td class="topAlign"><tt>0x0001</tt></td>
<td class="topAlign">The print to file option is enabled.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QAbstractPrintDialog.PrintSelection</tt></td>
<td class="topAlign"><tt>0x0002</tt></td>
<td class="topAlign">The print selection option is enabled.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QAbstractPrintDialog.PrintPageRange</tt></td>
<td class="topAlign"><tt>0x0004</tt></td>
<td class="topAlign">The page range selection option is
enabled.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QAbstractPrintDialog.PrintShowPageSize</tt></td>
<td class="topAlign"><tt>0x0008</tt></td>
<td class="topAlign">Show the page size + margins page only if this
is enabled.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QAbstractPrintDialog.PrintCollateCopies</tt></td>
<td class="topAlign"><tt>0x0010</tt></td>
<td class="topAlign">The collate copies option is enabled</td>
</tr>
<tr>
<td class="topAlign">
<tt>QAbstractPrintDialog.PrintCurrentPage</tt></td>
<td class="topAlign"><tt>0x0040</tt></td>
<td class="topAlign">The print current page option is enabled (This
value was introduced in 4.7.)</td>
</tr>
</table>
<p>This value is obsolete and does nothing since Qt 4.5:</p>
<table class="valuelist">
<tr class="even" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign">
<tt>QAbstractPrintDialog.DontUseSheet</tt></td>
<td class="topAlign"><tt>0x0020</tt></td>
<td class="topAlign">In previous versions of Qt, <a href="qabstractprintdialog.html#exec">exec_</a>() the print dialog would
create a sheet by default the dialog was given a parent. This is no
longer supported in Qt 4.5. If you want to use sheets, use <a href="qprintdialog.html#open">QPrintDialog.open</a>() instead.</td>
</tr>
</table>
<p>The PrintDialogOptions type is a typedef for <a href="qflags.html">QFlags</a><PrintDialogOption>. It stores an OR
combination of PrintDialogOption values.</p>
<h3 class="fn"><a name="PrintRange-enum" />QAbstractPrintDialog.PrintRange</h3><p>Used to specify the print range selection option.</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>QAbstractPrintDialog.AllPages</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">All pages should be printed.</td>
</tr>
<tr>
<td class="topAlign"><tt>QAbstractPrintDialog.Selection</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">Only the selection should be printed.</td>
</tr>
<tr>
<td class="topAlign"><tt>QAbstractPrintDialog.PageRange</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">The specified page range should be
printed.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QAbstractPrintDialog.CurrentPage</tt></td>
<td class="topAlign"><tt>3</tt></td>
<td class="topAlign">Only the currently visible page should be
printed. (This value was introduced in 4.7.)</td>
</tr>
</table>
<p><b>See also</b> <a href="qprinter.html#PrintRange-enum">QPrinter.PrintRange</a>.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QAbstractPrintDialog" />QAbstractPrintDialog.__init__ (<i>self</i>, <a href="qprinter.html">QPrinter</a> <i>printer</i>, <a href="qwidget.html">QWidget</a> <i>parent</i> = None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs an abstract print dialog for <i>printer</i> with
<i>parent</i> as parent widget.</p>
<h3 class="fn"><a name="addEnabledOption" />QAbstractPrintDialog.addEnabledOption (<i>self</i>, <a href="qabstractprintdialog.html#PrintDialogOption-enum">PrintDialogOption</a> <i>option</i>)</h3><h3 class="fn"><a name="enabledOptions" /><a href="qabstractprintdialog-printdialogoptions.html">PrintDialogOptions</a> QAbstractPrintDialog.enabledOptions (<i>self</i>)</h3><h3 class="fn"><a name="exec" />int QAbstractPrintDialog.exec_ (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>This virtual function is called to pop up the dialog. It must be
reimplemented in subclasses.</p>
<h3 class="fn"><a name="fromPage" />int QAbstractPrintDialog.fromPage (<i>self</i>)</h3><p>Returns the first page to be printed By default, this value is
set to 0.</p>
<h3 class="fn"><a name="isOptionEnabled" />bool QAbstractPrintDialog.isOptionEnabled (<i>self</i>, <a href="qabstractprintdialog.html#PrintDialogOption-enum">PrintDialogOption</a> <i>option</i>)</h3><h3 class="fn"><a name="maxPage" />int QAbstractPrintDialog.maxPage (<i>self</i>)</h3><p>Returns the maximum page in the page range. As of Qt 4.4, this
function returns INT_MAX by default. Previous versions returned 1
by default.</p>
<h3 class="fn"><a name="minPage" />int QAbstractPrintDialog.minPage (<i>self</i>)</h3><p>Returns the minimum page in the page range. By default, this
value is set to 1.</p>
<h3 class="fn"><a name="printer" /><a href="qprinter.html">QPrinter</a> QAbstractPrintDialog.printer (<i>self</i>)</h3><p>Returns the printer that this printer dialog operates on.</p>
<h3 class="fn"><a name="printRange" /><a href="qabstractprintdialog.html#PrintRange-enum">PrintRange</a> QAbstractPrintDialog.printRange (<i>self</i>)</h3><p>Returns the print range.</p>
<p><b>See also</b> <a href="qabstractprintdialog.html#setPrintRange">setPrintRange</a>().</p>
<h3 class="fn"><a name="setEnabledOptions" />QAbstractPrintDialog.setEnabledOptions (<i>self</i>, <a href="qabstractprintdialog-printdialogoptions.html">PrintDialogOptions</a> <i>options</i>)</h3><h3 class="fn"><a name="setFromTo" />QAbstractPrintDialog.setFromTo (<i>self</i>, int <i>fromPage</i>, int <i>toPage</i>)</h3><p>Sets the range in the print dialog to be from <i>from</i> to
<i>to</i>.</p>
<h3 class="fn"><a name="setMinMax" />QAbstractPrintDialog.setMinMax (<i>self</i>, int <i>min</i>, int <i>max</i>)</h3><p>Sets the page range in this dialog to be from <i>min</i> to
<i>max</i>. This also enables the <a href="qabstractprintdialog.html#PrintDialogOption-enum">PrintPageRange</a>
option.</p>
<h3 class="fn"><a name="setOptionTabs" />QAbstractPrintDialog.setOptionTabs (<i>self</i>, list-of-QWidget <i>tabs</i>)</h3><p>Set a list of widgets as <i>tabs</i> to be shown on the print
dialog, if supported.</p>
<p>Currently this option is only supported on X11.</p>
<p>Setting the option tabs will transfer their ownership to the
print dialog.</p>
<p>This function was introduced in Qt 4.4.</p>
<h3 class="fn"><a name="setPrintRange" />QAbstractPrintDialog.setPrintRange (<i>self</i>, <a href="qabstractprintdialog.html#PrintRange-enum">PrintRange</a> <i>range</i>)</h3><p>Sets the print range option in to be <i>range</i>.</p>
<p><b>See also</b> <a href="qabstractprintdialog.html#printRange">printRange</a>().</p>
<h3 class="fn"><a name="toPage" />int QAbstractPrintDialog.toPage (<i>self</i>)</h3><p>Returns the last page to be printed. By default, this value is
set to 0.</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.9.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> 2012</td><td align="right" width="25%">Qt 4.8.2</td></tr></table></div></address></body></html>
|