<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- qpaintdevicewindow.cpp --> <title>QPaintDeviceWindow Class | Qt GUI 5.11</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 ><a href="../qtdoc/index.html">Qt 5.11</a></td><td ><a href="qtgui-index.html">Qt GUI</a></td><td ><a href="qtgui-module.html">C++ Classes</a></td><td >QPaintDeviceWindow</td></tr></table><table class="buildversion"><tr> <td id="buildversion" width="100%" align="right">Qt 5.11.2 Reference Documentation</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-functions">Public Functions</a></li> <li class="level1"><a href="#public-slots">Public Slots</a></li> <li class="level1"><a href="#protected-functions">Protected 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">QPaintDeviceWindow Class</h1> <!-- $$$QPaintDeviceWindow-brief --> <p>Convenience subclass of <a href="qwindow.html">QWindow</a> that is also a <a href="qpaintdevice.html">QPaintDevice</a>. <a href="#details">More...</a></p> <!-- @@@QPaintDeviceWindow --> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include <QPaintDeviceWindow></span> </td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += gui</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign"> Qt 5.4</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="qwindow.html">QWindow</a> and <a href="qpaintdevice.html">QPaintDevice</a></td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="qopenglwindow.html">QOpenGLWindow</a> and <a href="qrasterwindow.html">QRasterWindow</a></p> </td></tr></table></div><ul> <li><a href="qpaintdevicewindow-members.html">List of all members, including inherited members</a></li> </ul> <a name="public-functions"></a> <h2 id="public-functions">Public Functions</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpaintdevicewindow.html#update">update</a></b>(const QRect &<i>rect</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpaintdevicewindow.html#update-1">update</a></b>(const QRegion &<i>region</i>)</td></tr> </table></div> <ul> <li class="fn">82 public functions inherited from <a href="qwindow.html#public-functions">QWindow</a></li> <li class="fn">14 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li> <li class="fn">34 public functions inherited from <a href="../qtcore/qobject.html#public-functions">QObject</a></li> <li class="fn">6 public functions inherited from <a href="qsurface.html#public-functions">QSurface</a></li> </ul> <a name="public-slots"></a> <h2 id="public-slots">Public Slots</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpaintdevicewindow.html#update-2">update</a></b>()</td></tr> </table></div> <ul> <li class="fn">24 public slots inherited from <a href="qwindow.html#public-slots">QWindow</a></li> <li class="fn">1 public slot inherited from <a href="../qtcore/qobject.html#public-slots">QObject</a></li> </ul> <a name="protected-functions"></a> <h2 id="protected-functions">Protected Functions</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qpaintdevicewindow.html#paintEvent">paintEvent</a></b>(QPaintEvent *<i>event</i>)</td></tr> </table></div> <ul> <li class="fn">18 protected functions inherited from <a href="qwindow.html#protected-functions">QWindow</a></li> <li class="fn">1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li> <li class="fn">9 protected functions inherited from <a href="../qtcore/qobject.html#protected-functions">QObject</a></li> </ul> <h3>Additional Inherited Members</h3> <ul> <li class="fn">16 properties inherited from <a href="qwindow.html#properties">QWindow</a></li> <li class="fn">1 property inherited from <a href="../qtcore/qobject.html#properties">QObject</a></li> <li class="fn">18 signals inherited from <a href="qwindow.html#signals">QWindow</a></li> <li class="fn">2 signals inherited from <a href="../qtcore/qobject.html#signals">QObject</a></li> <li class="fn">1 public variable inherited from <a href="../qtcore/qobject.html#public-variables">QObject</a></li> <li class="fn">1 static public member inherited from <a href="qwindow.html#static-public-members">QWindow</a></li> <li class="fn">10 static public members inherited from <a href="../qtcore/qobject.html#static-public-members">QObject</a></li> <li class="fn">2 protected variables inherited from <a href="../qtcore/qobject.html#protected-variables">QObject</a></li> </ul> <a name="details"></a> <!-- $$$QPaintDeviceWindow-description --> <div class="descr"> <h2 id="details">Detailed Description</h2> <p>Convenience subclass of <a href="qwindow.html">QWindow</a> that is also a <a href="qpaintdevice.html">QPaintDevice</a>.</p> <p><a href="qpaintdevicewindow.html">QPaintDeviceWindow</a> is like a regular <a href="qwindow.html">QWindow</a>, with the added functionality of being a paint device too. Whenever the content needs to be updated, the virtual <a href="qpaintdevicewindow.html#paintEvent">paintEvent</a>() function is called. Subclasses, that reimplement this function, can then simply open a <a href="qpainter.html">QPainter</a> on the window.</p> <p><b>Note: </b>This class cannot directly be used in applications. It rather serves as a base for subclasses like <a href="qopenglwindow.html">QOpenGLWindow</a>.</p></div> <p><b>See also </b><a href="qopenglwindow.html">QOpenGLWindow</a>.</p> <!-- @@@QPaintDeviceWindow --> <div class="func"> <h2>Member Function Documentation</h2> <!-- $$$paintEvent[overload1]$$$paintEventQPaintEvent* --> <h3 class="fn" id="paintEvent"><a name="paintEvent"></a><code>[virtual protected] </code><span class="type">void</span> QPaintDeviceWindow::<span class="name">paintEvent</span>(<span class="type"><a href="qpaintevent.html">QPaintEvent</a></span> *<i>event</i>)</h3> <p>Handles paint events passed in the <i>event</i> parameter.</p> <p>The default implementation does nothing. Reimplement this function to perform painting. If necessary, the dirty area is retrievable from the <i>event</i>.</p> <!-- @@@paintEvent --> <!-- $$$update[overload1]$$$updateconstQRect& --> <h3 class="fn" id="update"><a name="update"></a><span class="type">void</span> QPaintDeviceWindow::<span class="name">update</span>(const <span class="type"><a href="../qtcore/qrect.html">QRect</a></span> &<i>rect</i>)</h3> <p>Marks the <i>rect</i> of the window as dirty and schedules a repaint.</p> <p><b>Note: </b>Subsequent calls to this function before the next paint event will get ignored, but <i>rect</i> is added to the region to update.</p><p><b>Note: </b>For non-exposed windows the update is deferred until the window becomes exposed again.</p><!-- @@@update --> <!-- $$$update$$$updateconstQRegion& --> <h3 class="fn" id="update-1"><a name="update-1"></a><span class="type">void</span> QPaintDeviceWindow::<span class="name">update</span>(const <span class="type"><a href="qregion.html">QRegion</a></span> &<i>region</i>)</h3> <p>Marks the <i>region</i> of the window as dirty and schedules a repaint.</p> <p><b>Note: </b>Subsequent calls to this function before the next paint event will get ignored, but <i>region</i> is added to the region to update.</p><p><b>Note: </b>For non-exposed windows the update is deferred until the window becomes exposed again.</p><!-- @@@update --> <!-- $$$update$$$update --> <h3 class="fn" id="update-2"><a name="update-2"></a><code>[slot] </code><span class="type">void</span> QPaintDeviceWindow::<span class="name">update</span>()</h3> <p>Marks the entire window as dirty and schedules a repaint.</p> <p><b>Note: </b>Subsequent calls to this function before the next paint event will get ignored.</p><p><b>Note: </b>For non-exposed windows the update is deferred until the window becomes exposed again.</p><!-- @@@update --> </div> </div> </div> </div> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2018 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>