Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > 8e6051afcdb111a0317a58fb64c2abf5 > files > 5093

qt4-doc-4.6.3-0.2mdv2010.2.i586.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">
<!-- emb-displaymanagement.qdoc -->
<head>
  <title>Qt 4.6: Qt for Embedded Linux Display Management</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://qt.nokia.com/"><img src="images/qt-logo.png" align="left" 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="functions.html"><font color="#004faf">All&nbsp;Functions</font></a>&nbsp;&middot; <a href="overviews.html"><font color="#004faf">Overviews</font></a></td></tr></table><h1 class="title">Qt for Embedded Linux Display Management<br /><span class="subtitle"></span>
</h1>
<p>When rendering, the default behavior for each Qt for Embedded Linux client is to render its widgets into memory, while the server is responsible for putting the contents of the memory onto the screen. The server uses the screen driver to copy the content of the memory to the display.</p>
<p>The screen driver is loaded by the server application when it starts running, using Qt's <a href="plugins-howto.html">plugin system</a>.</p>
<p>Contents:</p>
<ul><li><a href="#available-drivers">Available Drivers</a></li>
<li><a href="#specifying-a-driver">Specifying a Driver</a></li>
<li><a href="#subdrivers-and-multiple-drivers">Subdrivers and Multiple Drivers</a></li>
</ul>
<a name="available-drivers"></a>
<h2>Available Drivers</h2>
<p><a href="qt-embedded-linux.html">Qt for Embedded Linux</a> provides drivers for the Linux framebuffer, the virtual framebuffer, transformed screens, VNC servers and multi screens. Run the <tt>configure</tt> script to list the available drivers:</p>
<pre> ./configure -help</pre>
<p>In the default Qt configuration, only an unaccelerated Linux framebuffer driver (<tt>/dev/fb0</tt>) is enabled. The various drivers can be enabled and disabled using the <tt>configure</tt> script. For example:</p>
<pre> ./configure -qt-gfx-transformed</pre>
<p>Custom screen drivers can be implemented by subclassing the <a href="qscreen.html">QScreen</a> class and creating a screen driver plugin (derived from the <a href="qscreendriverplugin.html">QScreenDriverPlugin</a> class). The default implementation of the <a href="qscreendriverfactory.html">QScreenDriverFactory</a> class will automatically detect the plugin, loading the driver into the server application at run-time.</p>
<a name="specifying-a-driver"></a>
<h2>Specifying a Driver</h2>
<p>To specify which driver to use, set the <a href="qt-embedded-envvars.html#qws-display">QWS_DISPLAY</a> environment variable. For example (if the current shell is bash, ksh, zsh or sh):</p>
<pre> export QWS_DISPLAY=&quot;&lt;driver&gt;[:&lt;driver specific options&gt;]...
          [:&lt;display num&gt;]&quot;</pre>
<p>The valid values for the <tt>&lt;driver&gt;</tt> argument are <tt>LinuxFb</tt>, <tt>QVFb</tt>, <tt>VNC</tt>, <tt>Transformed</tt>, <tt>Multi</tt> and <a href="qscreendriverplugin.html#keys">keys</a> identifying custom drivers, and the <tt>&lt;display num&gt;</tt> argument is used to separate screens that are using the same screen driver and to enable multiple displays (see the <a href="qt-embedded-running.html">Running Qt for Embedded Linux Applications</a> documentation for more details). The driver specific options are described in the table below.</p>
<p><table class="generic" align="center" cellpadding="2" cellspacing="1" border="0">
<thead><tr valign="top" class="qt-style"><th>Driver Specific Option</th><th>Available For</th><th>Description</th></tr></thead>
<tr valign="top" class="odd"><td><tt>tty=&lt;device&gt;</tt></td><td>LinuxFb</td><td>Passes the device file to the console the application is running on.</td></tr>
<tr valign="top" class="even"><td><tt>nographicsmodeswitch</tt></td><td>LinuxFb</td><td>Ensures that the application is not in graphics mode.</td></tr>
<tr valign="top" class="odd"><td><tt>littleendian</tt></td><td>LinuxFb</td><td>Tells the driver it must handle a little-endian frame buffer in a big-endian system.</td></tr>
<tr valign="top" class="even"><td><tt>mmWidth=&lt;value&gt;</tt> <a name="mmwidth"></a></td><td>LinuxFb, QVFb</td><td>The screen's physical width (used to calculate DPI).</td></tr>
<tr valign="top" class="odd"><td><tt>mmHeight=&lt;value&gt;</tt> <a name="mmheight"></a></td><td>LinuxFb, QVFb</td><td>The screen's physical height (used to calculate DPI).</td></tr>
<tr valign="top" class="even"><td><tt>&lt;device&gt;</tt></td><td>LinuxFb</td><td></td></tr>
<tr valign="top" class="odd"><td><tt>&lt;subdriver&gt;</tt></td><td>VNC, Transformed, Multi</td><td>Specifies a subdriver.</td></tr>
<tr valign="top" class="even"><td><tt>&lt;RotX&gt;</tt></td><td>Transformed</td><td>Specifies the rotation of the screen. The valid values of <tt>X</tt> are 90, 180 and 270.</td></tr>
<tr valign="top" class="odd"><td><tt>offset=&lt;x,y&gt;</tt></td><td>Multi</td><td>Specifies the coordinates of a subscreen's top-left corner (by default 0,0).</td></tr>
</table></p>
<p>The <a href="qt-embedded-envvars.html#qws-display">QWS_DISPLAY</a> environment variable can also be set using the <tt>-display</tt> option when running an application. For example:</p>
<pre> myApplication -display &quot;&lt;driver&gt;[:&lt;driver specific options&gt;]...
          [:&lt;display num&gt;]&quot;</pre>
<a name="subdrivers-and-multiple-drivers"></a>
<h2>Subdrivers and Multiple Drivers</h2>
<p>The VNC, Transformed and Multi screen drivers depend on subdrivers. The general syntax for specifying a driver is as follows:</p>
<pre> export QWS_DISPLAY=&quot;&lt;driver&gt;[:&lt;subdriver&gt;][:&lt;subdriver options&gt;]...
         [ :&lt;display num&gt;]&quot;</pre>
<p>In the case of subdrivers, it is important to add a space between each subdriver and before the display number to separate the various drivers and displays. Note that <tt>Multi</tt> screen drivers can have several subdrivers. For example:</p>
<pre> export QWS_DISPLAY=&quot;Multi: QVFb:0 QVFb:offset=640,0:1 :2&quot;</pre>
<p>Note also that the VNC screen driver defaults to a virtual screen driver if no subdriver is specified. In this case the VNC driver accepts a few additional (optional) arguments specifying the size and depth of the default virtual screen:</p>
<ul>
<li><tt>size=&lt;width x height&gt;</tt></li>
<li><tt>depth=&lt;value&gt;</tt></li>
<li><tt>mmHeight=&lt;physical height in millimeters&gt;</tt></li>
<li><tt>mmWidth=&lt;physical width in millimeters&gt;</tt></li>
</ul>
<p>Example running the VNC screen driver with a virtual screen of size 720x480 with 32 bits per pixel:</p>
<pre> export QWS_DISPLAY=&quot;VNC:size=720x480:depth=32&quot;</pre>
<p>Example running the VNC screen driver on top of the Linux framebuffer driver:</p>
<pre> export QWS_DISPLAY=&quot;VNC:LinuxFb&quot;</pre>
<p>In this last example, Qt is using two screen drivers simultaneously, displaying output on both the device's screen and across a network on VNC client displays.</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="40%" align="left">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies)</td>
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="40%" align="right"><div align="right">Qt 4.6.3</div></td>
</tr></table></div></address></body>
</html>