Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > ff187cb994c94c614ecc64c5a8528b1b > files > 5180

qt-doc-4.8.5-10.fc18.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qdirectpainter_qws.cpp -->
  <title>Qt 4.8: QDirectPainter Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtgui.html">QtGui</a></li>
<li>QDirectPainter</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<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="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#dynamic-allocation">Dynamic Allocation</a></li>
<li class="level2"><a href="#static-allocation">Static Allocation</a></li>
<li class="level2"><a href="#rendering">Rendering</a></li>
</ul>
</div>
<h1 class="title">QDirectPainter Class Reference</h1>
<!-- $$$QDirectPainter-brief -->
<p>The QDirectPainter class provides direct access to the underlying hardware in Qt for Embedded Linux. <a href="#details">More...</a></p>
<!-- @@@QDirectPainter -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QDirectPainter&gt;</span></pre><p><b>Inherits: </b><a href="qobject.html">QObject</a>.</p>
<ul>
<li><a href="qdirectpainter-members.html">List of all members, including inherited members</a></li>
<li><a href="qdirectpainter-obsolete.html">Obsolete members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qdirectpainter.html#SurfaceFlag-enum">SurfaceFlag</a></b> { NonReserved, Reserved, ReservedSynchronous }</td></tr>
</table>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qdirectpainter.html#QDirectPainter">QDirectPainter</a></b> ( QObject * <i>parent</i> = 0, SurfaceFlag <i>flag</i> = NonReserved )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qdirectpainter.html#dtor.QDirectPainter">~QDirectPainter</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRegion </td><td class="memItemRight bottomAlign"><b><a href="qdirectpainter.html#allocatedRegion">allocatedRegion</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdirectpainter.html#endPainting">endPainting</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdirectpainter.html#endPainting-2">endPainting</a></b> ( const QRegion &amp; <i>region</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdirectpainter.html#flush">flush</a></b> ( const QRegion &amp; <i>region</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRect </td><td class="memItemRight bottomAlign"><b><a href="qdirectpainter.html#geometry">geometry</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdirectpainter.html#lower">lower</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdirectpainter.html#raise">raise</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qdirectpainter.html#regionChanged">regionChanged</a></b> ( const QRegion &amp; <i>newRegion</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRegion </td><td class="memItemRight bottomAlign"><b><a href="qdirectpainter.html#requestedRegion">requestedRegion</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdirectpainter.html#setGeometry">setGeometry</a></b> ( const QRect &amp; <i>rectangle</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdirectpainter.html#setRegion">setRegion</a></b> ( const QRegion &amp; <i>region</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdirectpainter.html#startPainting">startPainting</a></b> ( bool <i>lockDisplay</i> = true )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> WId </td><td class="memItemRight bottomAlign"><b><a href="qdirectpainter.html#winId">winId</a></b> () const</td></tr>
</table>
<ul>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
</ul>
<a name="static-public-members"></a>
<h2>Static Public Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> uchar * </td><td class="memItemRight bottomAlign"><b><a href="qdirectpainter.html#frameBuffer">frameBuffer</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qdirectpainter.html#linestep">linestep</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdirectpainter.html#lock">lock</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qdirectpainter.html#screenDepth">screenDepth</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qdirectpainter.html#screenHeight">screenHeight</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qdirectpainter.html#screenWidth">screenWidth</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdirectpainter.html#unlock">unlock</a></b> ()</td></tr>
</table>
<ul>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$QDirectPainter-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QDirectPainter class provides direct access to the underlying hardware in Qt for Embedded Linux.</p>
<p>Note that this class is only available in <a href="qt-embedded-linux.html">Qt for Embedded Linux</a>.</p>
<p>QDirectPainter allows a client application to reserve a region of the framebuffer and render directly onto the screen. There are two ways of using the QDirectPainter class: You can either reserve a region using the provided static functions, or you can instantiate an object and make use of its more dynamic API.</p>
<a name="dynamic-allocation"></a>
<h3>Dynamic Allocation</h3>
<p>By instantiating a QDirectPainter object using the default <a href="qdirectpainter.html#SurfaceFlag-enum">QDirectPainter::NonReserved</a> surface flag, the client application only gets some control over the reserved region, i.e&#x2e;, it can still render directly onto the screen but the allocated region may change (for example, if a window with a higher focus requests parts of the same region). The currently allocated region can be retrieved using the <a href="qdirectpainter.html#allocatedRegion">allocatedRegion</a>() function, while the <a href="qdirectpainter.html#requestedRegion">requestedRegion</a>() function returns the originally reserved region.</p>
<a name="static-allocation"></a>
<h3>Static Allocation</h3>
<p>Using the static approach, the client application gets complete control over the reserved region, i.e&#x2e;, the affected region will never be modified by the screen driver.</p>
<p>To create a static region, pass the <a href="qdirectpainter.html#SurfaceFlag-enum">QDirectPainter::Reserved</a> surface flag to the constructor. After the reserved region is reported through <a href="qdirectpainter.html#regionChanged">regionChanged</a>(), the allocated region will not change, unless <a href="qdirectpainter.html#setRegion">setRegion</a>() is called.</p>
<p>If <a href="qdirectpainter.html#SurfaceFlag-enum">QDirectPainter::ReservedSynchronous</a> is passed to the constructor, calls to <a href="qdirectpainter.html#setRegion">setRegion</a>() will block until the region is reserved, meaning that <a href="qdirectpainter.html#allocatedRegion">allocatedRegion</a>() will be available immediately. Note that in the current version <a href="qdirectpainter.html#setRegion">setRegion</a>() will cause the application event loop to be entered, potentially causing reentrancy issues.</p>
<a name="rendering"></a>
<h3>Rendering</h3>
<p>To draw on a given region, the application must first get hold of a pointer to the framebuffer. In most cases, this pointer can be retrieved using the <a href="qdirectpainter.html#frameBuffer">QDirectPainter::frameBuffer</a>() function. But note that if the current screen has subscreens, you must query the screen driver instead to identify the correct subscreen. A pointer to the current screen driver can always be retrieved using the static <a href="qscreen.html#instance">QScreen::instance</a>() function. Then use <a href="qscreen.html">QScreen</a>'s <a href="qscreen.html#subScreenIndexAt">subScreenIndexAt()</a> and <a href="qscreen.html#subScreens">subScreens()</a> functions to access the correct subscreen, and the subscreen's <a href="qscreen.html#base">base()</a> function to retrieve a pointer to the framebuffer.</p>
<p>Depending on the hardware, it might be necessary to lock the framebuffer for exclusive use while writing to it. This is possible using the <a href="qdirectpainter.html#lock">lock</a>() and <a href="qdirectpainter.html#unlock">unlock</a>() functions. Note that calling <a href="qdirectpainter.html#lock">lock</a>() will prevent all other applications from working until <a href="qdirectpainter.html#unlock">unlock</a>() is called.</p>
<p>In addition, QDirectPainter provides several functions returning information about the framebuffer: the <a href="qdirectpainter.html#linestep">linestep</a>() function returns the length (in bytes) of each scanline of the framebuffer while the <a href="qdirectpainter.html#screenDepth">screenDepth</a>(), <a href="qdirectpainter.html#screenWidth">screenWidth</a>() and <a href="qdirectpainter.html#screenHeight">screenHeight</a>() function return the screen metrics.</p>
</div>
<p><b>See also </b><a href="qscreen.html">QScreen</a>, <a href="qwsembedwidget.html">QWSEmbedWidget</a>, and <a href="qt-embedded-architecture.html">Qt for Embedded Linux Architecture</a>.</p>
<!-- @@@QDirectPainter -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$SurfaceFlag$$$NonReserved$$$Reserved$$$ReservedSynchronous -->
<h3 class="fn"><a name="SurfaceFlag-enum"></a>enum QDirectPainter::<span class="name">SurfaceFlag</span></h3>
<p>This enum describes the behavior of the region reserved by this <a href="qdirectpainter.html">QDirectPainter</a> object.</p>
<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"><tt>QDirectPainter::NonReserved</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The allocated region may change, e.g&#x2e;, if a window with a higher focus requests parts of the same region. See also <a href="qdirectpainter.html#dynamic-allocation">Dynamic Allocation</a>.</td></tr>
<tr><td class="topAlign"><tt>QDirectPainter::Reserved</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The allocated region will never change. See also <a href="qdirectpainter.html#static-allocation">Static Allocation</a>.</td></tr>
<tr><td class="topAlign"><tt>QDirectPainter::ReservedSynchronous</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">The allocated region will never change and each function that changes the allocated region will be blocking.</td></tr>
</table>
<p><b>See also </b><a href="qdirectpainter.html#allocatedRegion">allocatedRegion</a>().</p>
<!-- @@@SurfaceFlag -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QDirectPainter[overload1]$$$QDirectPainterQObject*SurfaceFlag -->
<h3 class="fn"><a name="QDirectPainter"></a>QDirectPainter::<span class="name">QDirectPainter</span> ( <span class="type"><a href="qobject.html">QObject</a></span> * <i>parent</i> = 0, <span class="type"><a href="qdirectpainter.html#SurfaceFlag-enum">SurfaceFlag</a></span> <i>flag</i> = NonReserved )</h3>
<p>Constructs a <a href="qdirectpainter.html">QDirectPainter</a> object with the given <i>parent</i> and surface <i>flag</i>.</p>
<!-- @@@QDirectPainter -->
<!-- $$$~QDirectPainter[overload1]$$$~QDirectPainter -->
<h3 class="fn"><a name="dtor.QDirectPainter"></a>QDirectPainter::<span class="name">~QDirectPainter</span> ()</h3>
<p>Destroys this <a href="qdirectpainter.html">QDirectPainter</a> object, releasing the reserved region.</p>
<p><b>See also </b><a href="qdirectpainter.html#allocatedRegion">allocatedRegion</a>().</p>
<!-- @@@~QDirectPainter -->
<!-- $$$allocatedRegion[overload1]$$$allocatedRegion -->
<h3 class="fn"><a name="allocatedRegion"></a><span class="type"><a href="qregion.html">QRegion</a></span> QDirectPainter::<span class="name">allocatedRegion</span> () const</h3>
<p>Returns the currently reserved region.</p>
<p>Note that if the <a href="qdirectpainter.html#SurfaceFlag-enum">QDirectPainter::Reserved</a> flag is set, the region returned by this function will always be equivalent to the region returned by the <a href="qdirectpainter.html#requestedRegion">requestedRegion</a>() function. Otherwise they might differ (see <a href="qdirectpainter.html#dynamic-allocation">Dynamic Allocation</a> for details).</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="qdirectpainter.html#requestedRegion">requestedRegion</a>() and <a href="qdirectpainter.html#geometry">geometry</a>().</p>
<!-- @@@allocatedRegion -->
<!-- $$$endPainting[overload1]$$$endPainting -->
<h3 class="fn"><a name="endPainting"></a><span class="type">void</span> QDirectPainter::<span class="name">endPainting</span> ()</h3>
<p>Call this function when you are done updating the screen. It will notify the hardware, if necessary, that your painting operations have ended.</p>
<p>This function was introduced in Qt 4.2.</p>
<!-- @@@endPainting -->
<!-- $$$endPainting$$$endPaintingconstQRegion& -->
<h3 class="fn"><a name="endPainting-2"></a><span class="type">void</span> QDirectPainter::<span class="name">endPainting</span> ( const <span class="type"><a href="qregion.html">QRegion</a></span> &amp; <i>region</i> )</h3>
<p>This is an overloaded function.</p>
<p>This function will automatically call <a href="qdirectpainter.html#flush">flush</a>() to flush the <i>region</i> to the display before notifying the hardware, if necessary, that painting operations have ended.</p>
<p>This function was introduced in Qt 4.3.</p>
<!-- @@@endPainting -->
<!-- $$$flush[overload1]$$$flushconstQRegion& -->
<h3 class="fn"><a name="flush"></a><span class="type">void</span> QDirectPainter::<span class="name">flush</span> ( const <span class="type"><a href="qregion.html">QRegion</a></span> &amp; <i>region</i> )</h3>
<p>Flushes the <i>region</i> onto the screen.</p>
<p>This function was introduced in Qt 4.3.</p>
<!-- @@@flush -->
<!-- $$$frameBuffer[overload1]$$$frameBuffer -->
<h3 class="fn"><a name="frameBuffer"></a><span class="type"><a href="qtglobal.html#uchar-typedef">uchar</a></span> * QDirectPainter::<span class="name">frameBuffer</span> ()<tt> [static]</tt></h3>
<p>Returns a pointer to the beginning of the display memory.</p>
<p>Note that it is the application's responsibility to limit itself to modifying only the reserved region.</p>
<p>Do not use this pointer if the current screen has subscreens, query the screen driver instead: A pointer to the current screen driver can always be retrieved using the static <a href="qscreen.html#instance">QScreen::instance</a>() function. Then use <a href="qscreen.html">QScreen</a>'s <a href="qscreen.html#subScreenIndexAt">subScreenIndexAt()</a> and <a href="qscreen.html#subScreens">subScreens()</a> functions to access the correct subscreen, and the subscreen's <a href="qscreen.html#base">base()</a> function to retrieve a pointer to the framebuffer.</p>
<p><b>See also </b><a href="qdirectpainter.html#requestedRegion">requestedRegion</a>(), <a href="qdirectpainter.html#allocatedRegion">allocatedRegion</a>(), and <a href="qdirectpainter.html#linestep">linestep</a>().</p>
<!-- @@@frameBuffer -->
<!-- $$$geometry[overload1]$$$geometry -->
<h3 class="fn"><a name="geometry"></a><span class="type"><a href="qrect.html">QRect</a></span> QDirectPainter::<span class="name">geometry</span> () const</h3>
<p>Returns the bounding rectangle of the requested region.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="qdirectpainter.html#setGeometry">setGeometry</a>() and <a href="qdirectpainter.html#requestedRegion">requestedRegion</a>().</p>
<!-- @@@geometry -->
<!-- $$$linestep[overload1]$$$linestep -->
<h3 class="fn"><a name="linestep"></a><span class="type">int</span> QDirectPainter::<span class="name">linestep</span> ()<tt> [static]</tt></h3>
<p>Returns the length (in bytes) of each scanline of the framebuffer.</p>
<p><b>See also </b><a href="qdirectpainter.html#frameBuffer">frameBuffer</a>().</p>
<!-- @@@linestep -->
<!-- $$$lock[overload1]$$$lock -->
<h3 class="fn"><a name="lock"></a><span class="type">void</span> QDirectPainter::<span class="name">lock</span> ()<tt> [static]</tt></h3>
<p>Locks access to the framebuffer.</p>
<p>Note that calling this function will prevent all other applications from updating the display until <a href="qdirectpainter.html#unlock">unlock</a>() is called.</p>
<p><b>See also </b><a href="qdirectpainter.html#unlock">unlock</a>().</p>
<!-- @@@lock -->
<!-- $$$lower[overload1]$$$lower -->
<h3 class="fn"><a name="lower"></a><span class="type">void</span> QDirectPainter::<span class="name">lower</span> ()</h3>
<p>Lowers the reserved region to the bottom of the widget stack.</p>
<p>After this call the reserved region will be visually behind (and therefore obscured by) any overlapping widgets.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="qdirectpainter.html#raise">raise</a>() and <a href="qdirectpainter.html#requestedRegion">requestedRegion</a>().</p>
<!-- @@@lower -->
<!-- $$$raise[overload1]$$$raise -->
<h3 class="fn"><a name="raise"></a><span class="type">void</span> QDirectPainter::<span class="name">raise</span> ()</h3>
<p>Raises the reserved region to the top of the widget stack.</p>
<p>After this call the reserved region will be visually in front of any overlapping widgets.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="qdirectpainter.html#lower">lower</a>() and <a href="qdirectpainter.html#requestedRegion">requestedRegion</a>().</p>
<!-- @@@raise -->
<!-- $$$regionChanged[overload1]$$$regionChangedconstQRegion& -->
<h3 class="fn"><a name="regionChanged"></a><span class="type">void</span> QDirectPainter::<span class="name">regionChanged</span> ( const <span class="type"><a href="qregion.html">QRegion</a></span> &amp; <i>newRegion</i> )<tt> [virtual]</tt></h3>
<p>This function is called when the allocated region changes.</p>
<p>This function is not called for region changes that happen while the <a href="qdirectpainter.html#startPainting">startPainting</a>() function is executing.</p>
<p>Note that the given region, <i>newRegion</i>, is not guaranteed to be correct at the time you access the display. To prevent reentrancy problems you should always call <a href="qdirectpainter.html#startPainting">startPainting</a>() before updating the display and then use <a href="qdirectpainter.html#allocatedRegion">allocatedRegion</a>() to retrieve the correct region.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="qdirectpainter.html#allocatedRegion">allocatedRegion</a>(), <a href="qdirectpainter.html#startPainting">startPainting</a>(), and <a href="qdirectpainter.html#dynamic-allocation">Dynamic Allocation</a>.</p>
<!-- @@@regionChanged -->
<!-- $$$requestedRegion[overload1]$$$requestedRegion -->
<h3 class="fn"><a name="requestedRegion"></a><span class="type"><a href="qregion.html">QRegion</a></span> QDirectPainter::<span class="name">requestedRegion</span> () const</h3>
<p>Returns the region requested by this <a href="qdirectpainter.html">QDirectPainter</a>.</p>
<p>Note that if the <a href="qdirectpainter.html#SurfaceFlag-enum">QDirectPainter::Reserved</a> flag is set, the region returned by this function will always be equivalent to the region returned by the <a href="qdirectpainter.html#allocatedRegion">allocatedRegion</a>() function. Otherwise they might differ (see <a href="qdirectpainter.html#dynamic-allocation">Dynamic Allocation</a> for details).</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="qdirectpainter.html#geometry">geometry</a>(), <a href="qdirectpainter.html#setRegion">setRegion</a>(), and <a href="qdirectpainter.html#allocatedRegion">allocatedRegion</a>().</p>
<!-- @@@requestedRegion -->
<!-- $$$screenDepth[overload1]$$$screenDepth -->
<h3 class="fn"><a name="screenDepth"></a><span class="type">int</span> QDirectPainter::<span class="name">screenDepth</span> ()<tt> [static]</tt></h3>
<p>Returns the bit depth of the display.</p>
<p><b>See also </b><a href="qdirectpainter.html#screenHeight">screenHeight</a>() and <a href="qdirectpainter.html#screenWidth">screenWidth</a>().</p>
<!-- @@@screenDepth -->
<!-- $$$screenHeight[overload1]$$$screenHeight -->
<h3 class="fn"><a name="screenHeight"></a><span class="type">int</span> QDirectPainter::<span class="name">screenHeight</span> ()<tt> [static]</tt></h3>
<p>Returns the height of the display in pixels.</p>
<p><b>See also </b><a href="qdirectpainter.html#screenWidth">screenWidth</a>() and <a href="qdirectpainter.html#screenDepth">screenDepth</a>().</p>
<!-- @@@screenHeight -->
<!-- $$$screenWidth[overload1]$$$screenWidth -->
<h3 class="fn"><a name="screenWidth"></a><span class="type">int</span> QDirectPainter::<span class="name">screenWidth</span> ()<tt> [static]</tt></h3>
<p>Returns the width of the display in pixels.</p>
<p><b>See also </b><a href="qdirectpainter.html#screenHeight">screenHeight</a>() and <a href="qdirectpainter.html#screenDepth">screenDepth</a>().</p>
<!-- @@@screenWidth -->
<!-- $$$setGeometry[overload1]$$$setGeometryconstQRect& -->
<h3 class="fn"><a name="setGeometry"></a><span class="type">void</span> QDirectPainter::<span class="name">setGeometry</span> ( const <span class="type"><a href="qrect.html">QRect</a></span> &amp; <i>rectangle</i> )</h3>
<p>Request to reserve the given <i>rectangle</i> of the framebuffer.</p>
<p>Note that the actually allocated region might differ from the requested one, e.g&#x2e;, if the given region overlaps with the region of another <a href="qdirectpainter.html">QDirectPainter</a> object.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="qdirectpainter.html#geometry">geometry</a>(), <a href="qdirectpainter.html#allocatedRegion">allocatedRegion</a>(), and <a href="qdirectpainter.html#setRegion">setRegion</a>().</p>
<!-- @@@setGeometry -->
<!-- $$$setRegion[overload1]$$$setRegionconstQRegion& -->
<h3 class="fn"><a name="setRegion"></a><span class="type">void</span> QDirectPainter::<span class="name">setRegion</span> ( const <span class="type"><a href="qregion.html">QRegion</a></span> &amp; <i>region</i> )</h3>
<p>Requests to reserve the given <i>region</i> of the framebuffer.</p>
<p>Note that the actually allocated region might differ from the requested one, e.g&#x2e;, if the given region overlaps with the region of another <a href="qdirectpainter.html">QDirectPainter</a> object.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="qdirectpainter-obsolete.html#region" class="obsolete">region</a>(), <a href="qdirectpainter.html#requestedRegion">requestedRegion</a>(), <a href="qdirectpainter.html#allocatedRegion">allocatedRegion</a>(), and <a href="qdirectpainter.html#dynamic-allocation">Dynamic Allocation</a>.</p>
<!-- @@@setRegion -->
<!-- $$$startPainting[overload1]$$$startPaintingbool -->
<h3 class="fn"><a name="startPainting"></a><span class="type">void</span> QDirectPainter::<span class="name">startPainting</span> ( <span class="type">bool</span> <i>lockDisplay</i> = true )</h3>
<p>Call this function before you start updating the pixels in the allocated region. The hardware will be notified, if necessary, that you are about to start painting operations.</p>
<p>Set <i>lockDisplay</i> if you want startPainting() and <a href="qdirectpainter.html#endPainting">endPainting</a>() to <a href="qdirectpainter.html#lock">lock</a>() and <a href="qdirectpainter.html#unlock">unlock</a>() the display automatically.</p>
<p>Note that for a <a href="qdirectpainter.html#SurfaceFlag-enum">NonReserved</a> direct painter, you must call <a href="qdirectpainter.html#allocatedRegion">allocatedRegion</a>() after calling this function, since the allocated region is only guaranteed to be correct after this function has returned.</p>
<p>The <a href="qdirectpainter.html#regionChanged">regionChanged</a>() function will not be called between startPainting() and <a href="qdirectpainter.html#endPainting">endPainting</a>().</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="qdirectpainter.html#endPainting">endPainting</a>() and <a href="qdirectpainter.html#flush">flush</a>().</p>
<!-- @@@startPainting -->
<!-- $$$unlock[overload1]$$$unlock -->
<h3 class="fn"><a name="unlock"></a><span class="type">void</span> QDirectPainter::<span class="name">unlock</span> ()<tt> [static]</tt></h3>
<p>Unlocks the lock on the framebuffer (set using the <a href="qdirectpainter.html#lock">lock</a>() function), allowing other applications to access the screen.</p>
<p><b>See also </b><a href="qdirectpainter.html#lock">lock</a>().</p>
<!-- @@@unlock -->
<!-- $$$winId[overload1]$$$winId -->
<h3 class="fn"><a name="winId"></a><span class="type"><a href="qwidget.html#WId-typedef">WId</a></span> QDirectPainter::<span class="name">winId</span> () const</h3>
<p>Returns the window system identifier of the widget.</p>
<p>This function was introduced in Qt 4.2.</p>
<!-- @@@winId -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2013 Digia Plc and/or its
      subsidiaries. Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      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.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Digia, Qt and their respective logos are trademarks of Digia Plc 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>