Sophie

Sophie

distrib > CentOS > 5 > x86_64 > by-pkgid > ac91357d6caede925de099a02fced14e > files > 3979

qt4-doc-4.2.1-1.el5_7.1.x86_64.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- /tmp/qt-4.2.1-harald-1161357942206/qt-x11-opensource-src-4.2.1/src/gui/embedded/qdirectpainter_qws.cpp -->
<head>
  <title>Qt 4.2: QDirectPainter Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://www.trolltech.com/products/qt"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
<td align="right" valign="top" width="230"><a href="http://www.trolltech.com"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></a></td></tr></table><h1 align="center">QDirectPainter Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1>
<p>The QDirectPainter class provides direct access to the video hardware. <a href="#details">More...</a></p>
<pre> #include &lt;QDirectPainter&gt;</pre><p><b>This class is under development and is subject to change.</b></p>
<p>Inherits <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>
<h3>Public Types</h3>
<ul>
<li><div class="fn"/>enum <b><a href="qdirectpainter.html#SurfaceFlag-enum">SurfaceFlag</a></b> { NonReserved, Reserved }</li>
</ul>
<a name="public-functions"></a>
<h3>Public Functions</h3>
<ul>
<li><div class="fn"/><b><a href="qdirectpainter.html#QDirectPainter">QDirectPainter</a></b> ( QObject * <i>parent</i> = 0, SurfaceFlag <i>flag</i> = NonReserved )</li>
<li><div class="fn"/><b><a href="qdirectpainter.html#dtor.QDirectPainter">~QDirectPainter</a></b> ()</li>
<li><div class="fn"/>QRegion <b><a href="qdirectpainter.html#allocatedRegion">allocatedRegion</a></b> () const</li>
<li><div class="fn"/>void <b><a href="qdirectpainter.html#endPainting">endPainting</a></b> ()</li>
<li><div class="fn"/>QRect <b><a href="qdirectpainter.html#geometry">geometry</a></b> () const</li>
<li><div class="fn"/>void <b><a href="qdirectpainter.html#lower">lower</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qdirectpainter.html#raise">raise</a></b> ()</li>
<li><div class="fn"/>virtual void <b><a href="qdirectpainter.html#regionChanged">regionChanged</a></b> ( const QRegion &amp; <i>region</i> )</li>
<li><div class="fn"/>QRegion <b><a href="qdirectpainter.html#requestedRegion">requestedRegion</a></b> () const</li>
<li><div class="fn"/>void <b><a href="qdirectpainter.html#setGeometry">setGeometry</a></b> ( const QRect &amp; <i>rect</i> )</li>
<li><div class="fn"/>void <b><a href="qdirectpainter.html#setRegion">setRegion</a></b> ( const QRegion &amp; <i>region</i> )</li>
<li><div class="fn"/>void <b><a href="qdirectpainter.html#startPainting">startPainting</a></b> ( bool <i>lockDisplay</i> = false )</li>
<li><div class="fn"/>WId <b><a href="qdirectpainter.html#winId">winId</a></b> () const</li>
</ul>
<ul>
<li><div class="fn"/>29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
</ul>
<a name="static-public-members"></a>
<h3>Static Public Members</h3>
<ul>
<li><div class="fn"/>uchar * <b><a href="qdirectpainter.html#frameBuffer">frameBuffer</a></b> ()</li>
<li><div class="fn"/>int <b><a href="qdirectpainter.html#linestep">linestep</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qdirectpainter.html#lock">lock</a></b> ()</li>
<li><div class="fn"/>QRegion <b><a href="qdirectpainter.html#reserveRegion">reserveRegion</a></b> ( const QRegion &amp; <i>region</i> )</li>
<li><div class="fn"/>QRegion <b><a href="qdirectpainter.html#reservedRegion">reservedRegion</a></b> ()</li>
<li><div class="fn"/>int <b><a href="qdirectpainter.html#screenDepth">screenDepth</a></b> ()</li>
<li><div class="fn"/>int <b><a href="qdirectpainter.html#screenHeight">screenHeight</a></b> ()</li>
<li><div class="fn"/>int <b><a href="qdirectpainter.html#screenWidth">screenWidth</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qdirectpainter.html#unlock">unlock</a></b> ()</li>
</ul>
<ul>
<li><div class="fn"/>5 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li><div class="fn"/>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
<li><div class="fn"/>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
<li><div class="fn"/>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
<li><div class="fn"/>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QDirectPainter class provides direct access to the video hardware.</p>
<p>When the hardware is known and well defined, as is often the case with software for embedded devices, it may be useful to manipulate the underlying video hardware directly. Note that this functionality is only available in <a href="qtopiacore.html">Qtopia Core</a>.</p>
<p>Access to the video hardware is provided by the <a href="qdirectpainter.html#frameBuffer">frameBuffer</a>() function which returns a pointer to the beginning of the display memory. In order to access the video hardware in a way that is co-operative with other applications, a region of the screen must be reserved for the application, QDirectPainter provides the necessary functionality: The <a href="qdirectpainter.html#reserveRegion">reserveRegion</a>() function attempts to reserve the given region and returns the region actually reserved. The reserved region can also be retrieved using the <a href="qdirectpainter.html#reservedRegion">reservedRegion</a>() function.</p>
<p>Depending on the hardware, it might be necessary to lock the video hardware 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 as well as the screen: 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>
<p>See also <a href="qscreen.html">QScreen</a> and <a href="qdecoration.html">QDecoration</a>.</p>
<hr />
<h2>Member Type Documentation</h2>
<h3 class="fn"><a name="SurfaceFlag-enum"></a>enum QDirectPainter::SurfaceFlag</h3>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="QDirectPainter"></a>QDirectPainter::QDirectPainter ( <a href="qobject.html">QObject</a> * <i>parent</i> = 0, <a href="qdirectpainter.html#SurfaceFlag-enum">SurfaceFlag</a> <i>flag</i> = NonReserved )</h3>
<p>Constructs a <a href="qdirectpainter.html">QDirectPainter</a> with parent <i>parent</i> and flag <i>flags</i>.</p>
<h3 class="fn"><a name="dtor.QDirectPainter"></a>QDirectPainter::~QDirectPainter ()</h3>
<p>Destroys the object.</p>
<p>The reserved region will be released.</p>
<h3 class="fn"><a name="allocatedRegion"></a><a href="qregion.html">QRegion</a> QDirectPainter::allocatedRegion () const</h3>
<p>Returns the region allocated to this <a href="qdirectpainter.html">QDirectPainter</a>.</p>
<p>This function was introduced in Qt 4.2.</p>
<h3 class="fn"><a name="endPainting"></a>void QDirectPainter::endPainting ()</h3>
<p>This function was introduced in Qt 4.2.</p>
<h3 class="fn"><a name="frameBuffer"></a><a href="qtglobal.html#uchar-typedef">uchar</a> * QDirectPainter::frameBuffer ()&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Returns a pointer to the beginning of the display memory.</p>
<p>Note that it is the applications responsibility to limit itself to modifying only the reserved region.</p>
<p>See also <a href="qdirectpainter.html#reservedRegion">reservedRegion</a>() and <a href="qdirectpainter.html#linestep">linestep</a>().</p>
<h3 class="fn"><a name="geometry"></a><a href="qrect.html">QRect</a> QDirectPainter::geometry () const</h3>
<p>Returns the bounding rect of the requested region.</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qdirectpainter.html#setGeometry">setGeometry</a>() and <a href="qdirectpainter.html#requestedRegion">requestedRegion</a>().</p>
<h3 class="fn"><a name="linestep"></a>int QDirectPainter::linestep ()&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Returns the length (in bytes) of each scanline of the framebuffer.</p>
<p>See also <a href="qdirectpainter.html#frameBuffer">frameBuffer</a>().</p>
<h3 class="fn"><a name="lock"></a>void QDirectPainter::lock ()&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Locks access to the video hardware.</p>
<p>Note that calling this function will prevent all other applications from working until <a href="qdirectpainter.html#unlock">unlock</a>() is called.</p>
<p>See also <a href="qdirectpainter.html#unlock">unlock</a>().</p>
<h3 class="fn"><a name="lower"></a>void QDirectPainter::lower ()</h3>
<p>This function was introduced in Qt 4.2.</p>
<h3 class="fn"><a name="raise"></a>void QDirectPainter::raise ()</h3>
<p>This function was introduced in Qt 4.2.</p>
<h3 class="fn"><a name="regionChanged"></a>void QDirectPainter::regionChanged ( const <a href="qregion.html">QRegion</a> &amp; <i>region</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>This function is called whenever the allocated region changes.</p>
<p>This function was introduced in Qt 4.2.</p>
<h3 class="fn"><a name="requestedRegion"></a><a href="qregion.html">QRegion</a> QDirectPainter::requestedRegion () const</h3>
<p>Returns the region requested by this <a href="qdirectpainter.html">QDirectPainter</a>.</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qdirectpainter.html#setRegion">setRegion</a>() and <a href="qdirectpainter.html#allocatedRegion">allocatedRegion</a>().</p>
<h3 class="fn"><a name="reserveRegion"></a><a href="qregion.html">QRegion</a> QDirectPainter::reserveRegion ( const <a href="qregion.html">QRegion</a> &amp; <i>region</i> )&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Attempts to reserve the given <i>region</i>, and returns the region that is actually reserved.</p>
<p>This function also releases the previously reserved region if any. If not released explicitly, the region will be released on application exit.</p>
<p>See also <a href="qdirectpainter.html#reservedRegion">reservedRegion</a>().</p>
<h3 class="fn"><a name="reservedRegion"></a><a href="qregion.html">QRegion</a> QDirectPainter::reservedRegion ()&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Returns the reserved region.</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qdirectpainter.html#reserveRegion">reserveRegion</a>() and <a href="qdirectpainter.html#frameBuffer">frameBuffer</a>().</p>
<h3 class="fn"><a name="screenDepth"></a>int QDirectPainter::screenDepth ()&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Returns the bit depth of the display.</p>
<p>See also <a href="qdirectpainter.html#screenHeight">screenHeight</a>() and <a href="qdirectpainter.html#screenWidth">screenWidth</a>().</p>
<h3 class="fn"><a name="screenHeight"></a>int QDirectPainter::screenHeight ()&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Returns the height of the display in pixels.</p>
<p>See also <a href="qdirectpainter.html#screenWidth">screenWidth</a>() and <a href="qdirectpainter.html#screenDepth">screenDepth</a>().</p>
<h3 class="fn"><a name="screenWidth"></a>int QDirectPainter::screenWidth ()&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Returns the width of the display in pixels.</p>
<p>See also <a href="qdirectpainter.html#screenHeight">screenHeight</a>() and <a href="qdirectpainter.html#screenDepth">screenDepth</a>().</p>
<h3 class="fn"><a name="setGeometry"></a>void QDirectPainter::setGeometry ( const <a href="qrect.html">QRect</a> &amp; <i>rect</i> )</h3>
<p>Request to reserve the rectangle <i>rect</i> of the screen.</p>
<p>The requested rectangle will be the maximum available rectangle for this object. The actually allocated region may be less, for instance if the rectangle overlaps with another <a href="qdirectpainter.html">QDirectPainter</a>.</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qdirectpainter.html#geometry">geometry</a>(), <a href="qdirectpainter.html#allocatedRegion">allocatedRegion</a>(), and <a href="qdirectpainter.html#setRegion">setRegion</a>().</p>
<h3 class="fn"><a name="setRegion"></a>void QDirectPainter::setRegion ( const <a href="qregion.html">QRegion</a> &amp; <i>region</i> )</h3>
<p>Request to reserve the region <i>region</i> of the screen.</p>
<p>The requested region will be the maximum available region for this object. The actually allocated region may be less, for instance if the region overlaps with another <a href="qdirectpainter.html">QDirectPainter</a>.</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qdirectpainter-obsolete.html#region">region</a>().</p>
<h3 class="fn"><a name="startPainting"></a>void QDirectPainter::startPainting ( bool <i>lockDisplay</i> = false )</h3>
<p>This function was introduced in Qt 4.2.</p>
<h3 class="fn"><a name="unlock"></a>void QDirectPainter::unlock ()&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Unlocks the lock on the video hardware (set by the <a href="qdirectpainter.html#lock">lock</a>() function), allowing other applications to access the screen.</p>
<p>See also <a href="qdirectpainter.html#lock">lock</a>().</p>
<h3 class="fn"><a name="winId"></a>WId QDirectPainter::winId () const</h3>
<p>Returns the window system identifier of the widget.</p>
<p>This function was introduced in Qt 4.2.</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%">Copyright &copy; 2006 <a href="trolltech.html">Trolltech</a></td>
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="30%" align="right"><div align="right">Qt 4.2.1</div></td>
</tr></table></div></address></body>
</html>