Sophie

Sophie

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

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/qtjambi/4.3/scripts/../doc/src/qtjambi-juic.qdoc -->
<head>
  <title>Java User Interface Compiler (JUIC)</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1 align="center">Java User Interface Compiler (JUIC)<br /><small></small></h1>
<p>The Java User Interface Compiler (JUIC) command-line tool converts the Java user interface definition file (<tt>.jui</tt>) generated by Qt Designer to Java source files.</p>
<a name="usage"></a>
<h2>Usage</h2>
<pre>    juic [option]... &lt;.jui file&gt;</pre>
<p>Note that Qt Jambi also provides an <a href="qtjambi-eclipse">Eclipse integration</tt></a> that includes JUIC, automatically running the tool whenever the <tt>.jui</tt> files change. In Eclipse, JUIC is integrated as a custom build tool which will be executed prior to the Eclipse built-in incremental builder meaning that all source code is ensured to be up to date after the Java user interface has been edited in Qt Designer.</p>
<p>See the <a href="qtjambi-simpleuiexample.html">Simple UI Example</tt></a> example documentation for details on how to implement Java user interfaces for applications, using <tt>.jui</tt> files.</p>
<a name="options"></a>
<h2>Options</h2>
<p>The following table lists the command-line options recognized by JUIC:</p>
<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><tt>-h</tt>, <tt>-help</tt></td><td>Describes the usage and lists the command line options.</td></tr>
<tr valign="top" class="even"><td><tt>-v</tt>, <tt>-version</tt></td><td>Displays the compiler's version number.</td></tr>
<tr valign="top" class="odd"><td><tt>-d &lt;dir&gt;</tt></td><td>Specifies the output directory.</td></tr>
<tr valign="top" class="even"><td><tt>-p &lt;package&gt;</tt></td><td>Specifies a package for the generated <tt>.class</tt> file (relative to the output directory).</td></tr>
<tr valign="top" class="odd"><td><tt>-cp &lt;path&gt;</tt></td><td>Updates all the <tt>.jui</tt> files in the given path.The path argument is optional; the default path is $CLASSPATH.</td></tr>
<tr valign="top" class="even"><td><tt>-pf &lt;prefix&gt;</tt></td><td>Specifies the the prefix used for the generated classes. JUIC automatically adds 'Ui_' prefix to the generated classes. Use this option to alter the prefix, omit the argument to remove the prefix.</td></tr>
<tr valign="top" class="odd"><td><tt>-i &lt;file1&gt;:&lt;...&gt;:&lt;fileX&gt;</tt></td><td>Used in combination with the 'cp' option, making JUIC only update the specified files.</td></tr>
<tr valign="top" class="even"><td><tt>-e &lt;file1&gt;:&lt;...&gt;:&lt;fileX&gt;</tt></td><td>Used in combination with the 'cp' option, prohibiting JUIC from updating the specified files.</td></tr>
<tr valign="top" class="odd"><td><tt>-a</tt></td><td>Updates the files regardless of modification date.</td></tr>
</table></p>
<a name="compatibility-with-qt-ui-files"></a>
<h2>Compatibility with Qt .ui Files</h2>
<p>Qt has for several years used <tt>.ui</tt> files to represent forms. These are generated with Qt Designer and converted to code using the <tt>uic</tt> tool. The <tt>.ui</tt> files are xml datastructures containing class names, properties and connections. Many of these are C++ specific, such as enum values for properties and signal signatures.</p>
<p>Up until the third technology preview, Qt Jambi also used this file format to represent forms created with Qt Designer. But with the beta release, Qt Jambi introduced a new file format for the Java user interfaces (with the extension <tt>.jui</tt>). This is done to add better support for custom widgets written in Java, widgets with signals and properties of their own. Note that the <tt>.jui</tt> XML data structure is based on Java syntax.</p>
<p>For compatibility reasons, the Qt Jambi generator provides an option to for convert a C++ <tt>.ui</tt> file into a Qt Jambi <tt>.jui</tt> file. This is done by running the generator with the <tt>--convert-to-jui=[uifile]</tt> option like this:</p>
<pre>    ./generator qtmasterheaderfile.h jambimastertypesystem.txt
                 --convert-to-jui=calculatorform.ui</pre>
<p>This will convert the <tt>calculatorform.ui</tt> to <tt>calculatorform.jui</tt> based on the generator's default settings. Note that if the original user interface contains custom widgets, its type system and header file must be specified to the generator. Please see the <a href="qtjambi-generator.html">Qt Jambi Generator</tt></a> documentation for details.</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>