Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-updates > by-pkgid > d5e62c01ae8d1e579463c6a871dd44bf > files > 2477

qtbase5-doc-5.12.6-2.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qprinter.cpp -->
  <title>QPrintEngine Class | Qt Print Support 5.12.6</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.12</td><td ><a href="qtprintsupport-index.html">Qt Print Support</a></td><td ><a href="qtprintsupport-module.html">C++ Classes</a></td><td >QPrintEngine</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qtprintsupport-index.html">Qt 5.12.6 Reference Documentation</a></td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QPrintEngine Class</h1>
<!-- $$$QPrintEngine-brief -->
<p>The <a href="qprintengine.html">QPrintEngine</a> class defines an interface for how <a href="qprinter.html">QPrinter</a> interacts with a given printing subsystem. <a href="#details">More...</a></p>
<!-- @@@QPrintEngine -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QPrintEngine&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += printsupport</td></tr></table></div><ul>
<li><a href="qprintengine-members.html">List of all members, including inherited members</a></li>
</ul>
<p><b>Note:</b> All functions in this class are reentrant.</p>
<a name="public-types"></a>
<h2 id="public-types">Public Types</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qprintengine.html#PrintEnginePropertyKey-enum">PrintEnginePropertyKey</a></b> { PPK_CollateCopies, PPK_ColorMode, PPK_Creator, PPK_Duplex, ..., PPK_CustomBase }</td></tr>
</table></div>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qprintengine.html#dtor.QPrintEngine">~QPrintEngine</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qprintengine.html#abort">abort</a></b>() = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="qprintengine.html#metric">metric</a></b>(QPaintDevice::PaintDeviceMetric <i>id</i>) const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qprintengine.html#newPage">newPage</a></b>() = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QPrinter::PrinterState </td><td class="memItemRight bottomAlign"><b><a href="qprintengine.html#printerState">printerState</a></b>() const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QVariant </td><td class="memItemRight bottomAlign"><b><a href="qprintengine.html#property">property</a></b>(QPrintEngine::PrintEnginePropertyKey <i>key</i>) const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qprintengine.html#setProperty">setProperty</a></b>(QPrintEngine::PrintEnginePropertyKey <i>key</i>, const QVariant &amp;<i>value</i>) = 0</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QPrintEngine-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qprintengine.html">QPrintEngine</a> 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="../qtgui/qpaintengine.html">QPaintEngine</a> and <a href="qprintengine.html">QPrintEngine</a>. 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>
</div>
<p><b>See also </b><a href="../qtgui/qpaintengine.html">QPaintEngine</a>.</p>
<!-- @@@QPrintEngine -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$PrintEnginePropertyKey$$$PPK_CollateCopies$$$PPK_ColorMode$$$PPK_Creator$$$PPK_DocumentName$$$PPK_FullPage$$$PPK_NumberOfCopies$$$PPK_Orientation$$$PPK_OutputFileName$$$PPK_PageOrder$$$PPK_PageRect$$$PPK_PageSize$$$PPK_PaperRect$$$PPK_PaperSource$$$PPK_PrinterName$$$PPK_PrinterProgram$$$PPK_Resolution$$$PPK_SelectionOption$$$PPK_SupportedResolutions$$$PPK_WindowsPageSize$$$PPK_FontEmbedding$$$PPK_Duplex$$$PPK_PaperSources$$$PPK_CustomPaperSize$$$PPK_PageMargins$$$PPK_CopyCount$$$PPK_SupportsMultipleCopies$$$PPK_PaperName$$$PPK_QPageSize$$$PPK_QPageMargins$$$PPK_QPageLayout$$$PPK_PaperSize$$$PPK_CustomBase -->
<h3 class="fn" id="PrintEnginePropertyKey-enum"><a name="PrintEnginePropertyKey-enum"></a>enum QPrintEngine::<span class="name">PrintEnginePropertyKey</span></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>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QPrintEngine::PPK_CollateCopies</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">A boolean value indicating whether the printout should be collated or not.</td></tr>
<tr><td class="topAlign"><code>QPrintEngine::PPK_ColorMode</code></td><td class="topAlign tblval"><code>1</code></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"><code>QPrintEngine::PPK_Creator</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">A string describing the document's creator.</td></tr>
<tr><td class="topAlign"><code>QPrintEngine::PPK_Duplex</code></td><td class="topAlign tblval"><code>20</code></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"><code>QPrintEngine::PPK_DocumentName</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">A string describing the document name in the spooler.</td></tr>
<tr><td class="topAlign"><code>QPrintEngine::PPK_FontEmbedding</code></td><td class="topAlign tblval"><code>19</code></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"><code>QPrintEngine::PPK_FullPage</code></td><td class="topAlign tblval"><code>4</code></td><td class="topAlign">A boolean describing if the printer should be full page or not.</td></tr>
<tr><td class="topAlign"><code>QPrintEngine::PPK_NumberOfCopies</code></td><td class="topAlign tblval"><code>5</code></td><td class="topAlign">Obsolete. An integer specifying the number of copies. Use PPK_CopyCount instead.</td></tr>
<tr><td class="topAlign"><code>QPrintEngine::PPK_Orientation</code></td><td class="topAlign tblval"><code>6</code></td><td class="topAlign">Specifies a <a href="qprinter.html#Orientation-enum">QPrinter::Orientation</a> value.</td></tr>
<tr><td class="topAlign"><code>QPrintEngine::PPK_OutputFileName</code></td><td class="topAlign tblval"><code>7</code></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"><code>QPrintEngine::PPK_PageOrder</code></td><td class="topAlign tblval"><code>8</code></td><td class="topAlign">Specifies a <a href="qprinter.html#PageOrder-enum">QPrinter::PageOrder</a> value.</td></tr>
<tr><td class="topAlign"><code>QPrintEngine::PPK_PageRect</code></td><td class="topAlign tblval"><code>9</code></td><td class="topAlign">A <a href="../qtcore/qrect.html">QRect</a> specifying the page rectangle</td></tr>
<tr><td class="topAlign"><code>QPrintEngine::PPK_PageSize</code></td><td class="topAlign tblval"><code>10</code></td><td class="topAlign">Obsolete. Use PPK_PaperSize instead.</td></tr>
<tr><td class="topAlign"><code>QPrintEngine::PPK_PaperRect</code></td><td class="topAlign tblval"><code>11</code></td><td class="topAlign">A <a href="../qtcore/qrect.html">QRect</a> specifying the paper rectangle.</td></tr>
<tr><td class="topAlign"><code>QPrintEngine::PPK_PaperSource</code></td><td class="topAlign tblval"><code>12</code></td><td class="topAlign">Specifies a <a href="qprinter.html#PaperSource-enum">QPrinter::PaperSource</a> value.</td></tr>
<tr><td class="topAlign"><code>QPrintEngine::PPK_PaperSources</code></td><td class="topAlign tblval"><code>21</code></td><td class="topAlign">Specifies more than one <a href="qprinter.html#PaperSource-enum">QPrinter::PaperSource</a> value.</td></tr>
<tr><td class="topAlign"><code>QPrintEngine::PPK_PaperName</code></td><td class="topAlign tblval"><code>26</code></td><td class="topAlign">A string specifying the name of the paper.</td></tr>
<tr><td class="topAlign"><code>QPrintEngine::PPK_PaperSize</code></td><td class="topAlign tblval"><code>PPK_PageSize</code></td><td class="topAlign">Specifies a <a href="qprinter.html#PaperSize-typedef">QPrinter::PaperSize</a> value.</td></tr>
<tr><td class="topAlign"><code>QPrintEngine::PPK_PrinterName</code></td><td class="topAlign tblval"><code>13</code></td><td class="topAlign">A string specifying the name of the printer.</td></tr>
<tr><td class="topAlign"><code>QPrintEngine::PPK_PrinterProgram</code></td><td class="topAlign tblval"><code>14</code></td><td class="topAlign">A string specifying the name of the printer program used for printing,</td></tr>
<tr><td class="topAlign"><code>QPrintEngine::PPK_Resolution</code></td><td class="topAlign tblval"><code>15</code></td><td class="topAlign">An integer describing the dots per inch for this printer.</td></tr>
<tr><td class="topAlign"><code>QPrintEngine::PPK_SelectionOption</code></td><td class="topAlign tblval"><code>16</code></td><td class="topAlign">&nbsp;</td></tr>
<tr><td class="topAlign"><code>QPrintEngine::PPK_SupportedResolutions</code></td><td class="topAlign tblval"><code>17</code></td><td class="topAlign">A list of integer QVariants describing the set of supported resolutions that the printer has.</td></tr>
<tr><td class="topAlign"><code>QPrintEngine::PPK_WindowsPageSize</code></td><td class="topAlign tblval"><code>18</code></td><td class="topAlign">An integer specifying a DM_PAPER entry on Windows.</td></tr>
<tr><td class="topAlign"><code>QPrintEngine::PPK_CustomPaperSize</code></td><td class="topAlign tblval"><code>22</code></td><td class="topAlign">A <a href="../qtcore/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"><code>QPrintEngine::PPK_PageMargins</code></td><td class="topAlign tblval"><code>23</code></td><td class="topAlign">A <a href="../qtcore/qlist.html">QList</a>&lt;<a href="../qtcore/qvariant.html">QVariant</a>&gt; containing the left, top, right and bottom margin values in the <a href="qprinter.html#Unit-enum">QPrinter::Point</a> unit.</td></tr>
<tr><td class="topAlign"><code>QPrintEngine::PPK_CopyCount</code></td><td class="topAlign tblval"><code>24</code></td><td class="topAlign">An integer specifying the number of copies to print.</td></tr>
<tr><td class="topAlign"><code>QPrintEngine::PPK_SupportsMultipleCopies</code></td><td class="topAlign tblval"><code>25</code></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"><code>QPrintEngine::PPK_QPageSize</code></td><td class="topAlign tblval"><code>27</code></td><td class="topAlign">Set the page size using a <a href="../qtgui/qpagesize.html">QPageSize</a> object.</td></tr>
<tr><td class="topAlign"><code>QPrintEngine::PPK_QPageMargins</code></td><td class="topAlign tblval"><code>28</code></td><td class="topAlign">Set the page margins using a <a href="../qtcore/qpair.html">QPair</a> of <a href="../qtcore/qmarginsf.html">QMarginsF</a> and <a href="../qtgui/qpagelayout.html#Unit-enum">QPageLayout::Unit</a>.</td></tr>
<tr><td class="topAlign"><code>QPrintEngine::PPK_QPageLayout</code></td><td class="topAlign tblval"><code>29</code></td><td class="topAlign">Set the page layout using a <a href="../qtgui/qpagelayout.html">QPageLayout</a> object.</td></tr>
<tr><td class="topAlign"><code>QPrintEngine::PPK_CustomBase</code></td><td class="topAlign tblval"><code>0xff00</code></td><td class="topAlign">Basis for extension.</td></tr>
</table></div>
<!-- @@@PrintEnginePropertyKey -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$~QPrintEngine[overload1]$$$~QPrintEngine -->
<h3 class="fn" id="dtor.QPrintEngine"><a name="dtor.QPrintEngine"></a><code>[virtual] </code>QPrintEngine::<span class="name">~QPrintEngine</span>()</h3>
<p>Destroys the print engine.</p>
<!-- @@@~QPrintEngine -->
<!-- $$$abort[overload1]$$$abort -->
<h3 class="fn" id="abort"><a name="abort"></a><code>[pure virtual] </code><span class="type">bool</span> QPrintEngine::<span class="name">abort</span>()</h3>
<p>Instructs the print engine to abort the printing process. Returns true if successful; otherwise returns <code>false</code>.</p>
<!-- @@@abort -->
<!-- $$$metric[overload1]$$$metricQPaintDevice::PaintDeviceMetric -->
<h3 class="fn" id="metric"><a name="metric"></a><code>[pure virtual] </code><span class="type">int</span> QPrintEngine::<span class="name">metric</span>(<span class="type"><a href="../qtgui/qpaintdevice.html#PaintDeviceMetric-enum">QPaintDevice::PaintDeviceMetric</a></span> <i>id</i>) const</h3>
<p>Returns the metric for the given <i>id</i>.</p>
<!-- @@@metric -->
<!-- $$$newPage[overload1]$$$newPage -->
<h3 class="fn" id="newPage"><a name="newPage"></a><code>[pure virtual] </code><span class="type">bool</span> QPrintEngine::<span class="name">newPage</span>()</h3>
<p>Instructs the print engine to start a new page. Returns <code>true</code> if the printer was able to create the new page; otherwise returns <code>false</code>.</p>
<!-- @@@newPage -->
<!-- $$$printerState[overload1]$$$printerState -->
<h3 class="fn" id="printerState"><a name="printerState"></a><code>[pure virtual] </code><span class="type"><a href="qprinter.html#PrinterState-enum">QPrinter::PrinterState</a></span> QPrintEngine::<span class="name">printerState</span>() const</h3>
<p>Returns the current state of the printer being used by the print engine.</p>
<!-- @@@printerState -->
<!-- $$$property[overload1]$$$propertyQPrintEngine::PrintEnginePropertyKey -->
<h3 class="fn" id="property"><a name="property"></a><code>[pure virtual] </code><span class="type"><a href="../qtcore/qvariant.html">QVariant</a></span> QPrintEngine::<span class="name">property</span>(<span class="type"><a href="qprintengine.html#PrintEnginePropertyKey-enum">QPrintEngine::PrintEnginePropertyKey</a></span> <i>key</i>) const</h3>
<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>
<!-- @@@property -->
<!-- $$$setProperty[overload1]$$$setPropertyQPrintEngine::PrintEnginePropertyKeyconstQVariant& -->
<h3 class="fn" id="setProperty"><a name="setProperty"></a><code>[pure virtual] </code><span class="type">void</span> QPrintEngine::<span class="name">setProperty</span>(<span class="type"><a href="qprintengine.html#PrintEnginePropertyKey-enum">QPrintEngine::PrintEnginePropertyKey</a></span> <i>key</i>, const <span class="type"><a href="../qtcore/qvariant.html">QVariant</a></span> &amp;<i>value</i>)</h3>
<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>
<!-- @@@setProperty -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2019 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>