Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > a6711891ce757817bba854bf3f25205a > files > 2424

qtjambi-doc-4.3.3-3mdv2008.1.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">
<!-- /home/gvatteka/dev/qt-4.3/doc/src/emb-running.qdoc -->
<head>
  <title>Running Qtopia Core Applications</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1 align="center">Running Qtopia Core Applications<br /><small></small></h1>
<p>A Qtopia Core</tt> application requires a server application to be running, or to be the server application itself. Any Qtopia Core</tt> application can be the server application by constructing the <a href="gui/QApplication.html"><tt>QApplication</tt></a> object with the QApplication::GuiServer type, or by running the application with the <tt>-qws</tt> command line option.</p>
<p>Applications can run using both single and multiple displays, and various command line options are available.</p>
<p>Note that this document assumes that you either are using the <a href="qtopiacore-qvfb.html">Qtopia Core's Virtual Framebuffer</tt></a> or that you are running Qtopia Core</tt> using the <a href="qtopiacore-vnc.html">VNC</tt></a> protocol, <i>or</i> that you have the Linux framebuffer configured correctly and that no server process is running. (To test that the Linux framebuffer is set up correctly, use the program provided by the <a href="qtopiacore-testingframebuffer.html">Testing the Linux Framebuffer</tt></a> document.)</p>
<ul><li><a href="#using-a-single-display">Using a Single Display</a></li>
<li><a href="#using-multiple-displays">Using Multiple Displays</a></li>
<li><a href="#command-line-options">Command Line Options</a></li>
</ul>
<a name="using-a-single-display"></a>
<h2>Using a Single Display</h2>
<p>To run the application using a single display, change to a Linux console and select an application to run, e.g&#x2e; <a href="qtjambi-textedit.html">demos/textedit</tt></a>. Run the application with the <tt>-qws</tt> option:</p>
<pre>    cd path/to/Qtopia/Core/demos/textedit
    ./textedit -qws</pre>
<p><table width="100%" align="center" cellpadding="2" cellspacing="1" border="0">
<tr valign="top" class="odd"><td>Provided that the environment variables are adjusted properly during the <a href="qtopiacore-install.html">installation process</tt></a>, you should see the <a href="qtjambi-textedit.html">Text Edit</tt></a> demo appear.<p>It might be that the hardware drivers must be specified explicitly to make everything work properly. For more information, please consult the following documentation:</p>
<ul>
<li><a href="qtopiacore-pointer.html">Pointer Handling</tt></a></li>
<li><a href="qtopiacore-charinput.html">Character Input</tt></a></li>
<li><a href="qtopiacore-displaymanagement.html">Display Management</tt></a></li>
</ul>
</td><td><img src="images/qtopiacore-runningapplication.png" /></td></tr>
</table></p>
<p>Additional applications can be run as clients, i.e&#x2e;, by running these applications <i>without</i> the <tt>-qws</tt> option they will connect to the existing server as clients. You can exit the server application at any time using <b>Ctrl+Alt+Backspace</b>.</p>
<a name="using-multiple-displays"></a>
<h2>Using Multiple Displays</h2>
<p>Qtopia Core also allows multiple displays to be used simultaneously. There are two ways of achieving this: Either run multiple Qtopia Core server processes, or use Qtopia Core</tt>'s ready-made <tt>Multi</tt> screen driver.</p>
<p>When running multiple server processes, the screen driver (and display number) must be specified for each process using the <tt>-display</tt> command line option or by setting the <a href="qtopiacore-envvars.html#qws-display"><tt>QWS_DISPLAY</tt></a> environment variable. For example:</p>
<pre>    ./myfirstserverapplication -qws -display &quot;transformed:rot90:1&quot;
    ./mysecondserverapplication -qws -display &quot;QVFb:2&quot;</pre>
<p>See the <a href="qtopiacore-displaymanagement.html">display management</tt></a> documentation for more details on how to specify a screen driver. Note that you must also specify the display (i.e&#x2e;, server process) when starting client applications:</p>
<pre>    ./myclientapplication -display &quot;QVFb:2&quot;</pre>
<p>There is no way of moving a client from one display to another when running multiple server processes. Using the <tt>Multi</tt> screen driver, on the other hand, applications can easiliy be moved between the various screens.</p>
<p>The <tt>Multi</tt> screen driver can be specified just like any other screen driver by using the <tt>-display</tt> command line option or by setting the <a href="qtopiacore-envvars.html#qws-display"><tt>QWS_DISPLAY</tt></a> environment variable. For example:</p>
<pre>    ./myserverapplication -qws -display &quot;Multi: QVFb:0
            QVFb:1:offset=0,0 VNC:offset=640,0 :2&quot;</pre>
<p>See the <a href="qtopiacore-displaymanagement.html">display management</tt></a> documentation for details regarding arguments.</p>
<a name="command-line-options"></a>
<h2>Command Line Options</h2>
<p><table width="100%" align="center" cellpadding="2" cellspacing="1" border="0">
<thead><tr valign="top" class="qt-style"><th>Option</th><th>Description</th></tr></thead>
<tr valign="top" class="odd"><td><b>-fn</b> &lt;font&gt;</td><td>Defines the application font. For example:<pre>    ./myapplication -fn helvetica</pre>
<p>The font should be specified using an X logical font description.</p>
</td></tr>
<tr valign="top" class="even"><td><b>-bg</b> &lt;color&gt;</td><td>Sets the default application background color. For example:<pre>    ./myapplication -bg blue</pre>
<p>The color-name must be one of the names recognized by the <a href="gui/QColor.html"><tt>QColor</tt></a> constructor.</p>
</td></tr>
<tr valign="top" class="odd"><td><b>-btn</b> &lt;color&gt;</td><td>Sets the default button color. For example:<pre>    ./myapplication -btn green</pre>
<p>The color-name must be one of the names recognized by the <a href="gui/QColor.html"><tt>QColor</tt></a> constructor.</p>
</td></tr>
<tr valign="top" class="even"><td><b>-fg</b> &lt;color&gt;</td><td>Sets the default application foreground color. For example:<pre>    ./myapplication -fg 'dark blue'</pre>
<p>The color-name must be one of the names recognized by the <a href="gui/QColor.html"><tt>QColor</tt></a> constructor.</p>
</td></tr>
<tr valign="top" class="odd"><td><b>-name</b> &lt;objectname&gt;</td><td>Sets the application name, i.e&#x2e; the application object's object name. For example:<pre>    ./myapplication -name texteditapplication</pre>
</td></tr>
<tr valign="top" class="even"><td><b>-title</b> &lt;title&gt;</td><td>Sets the application's title. For example:<pre>    ./myapplication -title 'Text Edit'</pre>
</td></tr>
<tr valign="top" class="odd"><td><b>-geometry</b> &lt;width&gt;x&lt;height&gt;x&lt;Xoffset&gt;x&lt;YOffset&gt;</td><td>Sets the client geometry of the first window that is shown. For example:<pre>    ./myapplication -geometry 300x200x50x50</pre>
</td></tr>
<tr valign="top" class="even"><td><b>-keyboard</b></td><td>Enables the keyboard.<p>See also: <a href="qtopiacore-charinput.html">Qtopia Core Character Input</tt></a>.</p>
</td></tr>
<tr valign="top" class="odd"><td><b>-nokeyboard</b></td><td>Disables the keyboard.</td></tr>
<tr valign="top" class="even"><td><b>-mouse</b></td><td>Enables the mouse cursor.<p>See also: <a href="qtopiacore-pointer.html">Qtopia Core Pointer Handling</tt></a>.</p>
</td></tr>
<tr valign="top" class="odd"><td><b>-nomouse</b></td><td>Disables the mouse cursor.</td></tr>
<tr valign="top" class="even"><td><b>-qws</b></td><td>Runs the application as a server application, i.e&#x2e; constructs a <a href="gui/QApplication.html"><tt>QApplication</tt></a> object of the QApplication::GuiServer type.</td></tr>
<tr valign="top" class="odd"><td><b>-display</b></td><td>Specifies the screen driver.<p>See also: <a href="qtopiacore-displaymanagement.html">Qtopia Core Display Management</tt></a>.</p>
</td></tr>
<tr valign="top" class="even"><td><b>-decoration</b> &lt;style&gt;</td><td>Sets the application decoration. For example:<pre>    ./myapplication -decoration windows</pre>
<p>The supported styles are <tt>windows</tt>, <tt>default</tt> and <tt>styled</tt>.</p>
<p>See also QDecoration.</p>
</td></tr>
</table></p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%">Copyright &copy; 2007 <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 Jambi </div></td>
</tr></table></div></address></body>
</html>