<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- /home/reggie/tmp/qt-3.1-reggie-23625/qt-x11-free-3.1.1/tools/assistant/book/assistant.leaf:333 --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Adding Documentation to Qt Assistant</title> <style type="text/css"><!-- h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; } a:link { color: #004faf; text-decoration: none } a:visited { color: #672967; text-decoration: none } body { background: #ffffff; color: black; } --></style> </head> <body> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr bgcolor="#E5E5E5"> <td valign=center> <a href="index.html"> <font color="#004faf">Home</font></a> | <a href="classes.html"> <font color="#004faf">All Classes</font></a> | <a href="mainclasses.html"> <font color="#004faf">Main Classes</font></a> | <a href="annotated.html"> <font color="#004faf">Annotated</font></a> | <a href="groups.html"> <font color="#004faf">Grouped Classes</font></a> | <a href="functions.html"> <font color="#004faf">Functions</font></a> </td> <td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><p align="right">[<a href="assistant-5.html">Prev: Full Text Searching</a>] [<a href="assistant.html">Home</a>]</p> <h2 align="center">Adding Documentation to Qt Assistant</h2> <p>Adding new documentation to <em>Qt Assistant</em> is straight-forward. You simply specify a new documentation content file for <em>Qt Assistant</em> to use.</p> <p>Click <b>Edit|Settings</b> to invoke the <em>Settings</em> dialog. Click the <b>Documentations</b> tab. Now click <b>Add</b> to invoke a file open dialog. Select the new documentation's content file. (This file must be an XML file in <em>Qt Assistant</em>'s documentation content file format.)</p> <p>Another way to add your own documentation is, to start <em>Qt Assistant</em> with the commandline option '-addContentFile' followed by the documentation content file. Example: assistant -addContentFile /mycompany/myapp/help.xml</p> <p><em>Qt Assistant</em> will parse this file, add it and quit, i.e. no mainwindow will be shown. This way can be used when adding documentation during an installation process.</p> <p>If the new documentation belongs to a category which does not currently appear in the Categories list box, you can add the category using the <em>Settings</em> dialog. It is not normally necessary to do this manually since <em>Qt Assistant</em> detects new categories and adds them automatically.</p> <p>The format of the documentation content file is described in the following section.</p> <h3><a name="1"></a>Documentation Content File format</h3> <p>The file must contain the documentation's table of contents and all important keywords for the index. Furthermore, it should inherit a category specification.</p> <p>An example of a content file with all available tags is shown below:</p> <p><tt>demodoc.xml</tt></p> <pre> <!DOCTYPE DCF> <DCF ref="demo.html" category="qt/development" title="Development Demo Handbook"> <section ref="./chap1/chap1.html" title="Chapter1"> <section ref="./chap1/section1.html" title="Section1"> <keyword ref="./chap1/section1.html#foo">foo</keyword> <keyword ref="./chap1/section1.html#bla">bla</keyword> <section ref="./chap1/section1.html#subsection1" title="Subsection 1"/> <section ref="./chap1/section1.html#subsection2" title="Subsection 2"/> <section ref="./chap1/section1.html#subsection3" title="Subsection 3"/> </section> <section ref="./chap1/section2" title="Section2"> <section ref="./chap1/section2.html#subsection1" title="Subsection 1"/> <section ref="./chap1/section2.html#subsection2" title="Subsection 2"/> <section ref="./chap1/section2.html#subsection3" title="Subsection 3"/> </section> </section> <section ref="./chap2/chap2.html" title="Chapter2"> <keyword ref="./chap2/chap2.html#foo">foo</keyword> <section ref="./chap2/section1.html" title="Section1"/> </section> </DCF> </pre> <p>Sections may be nested as deeply as necessary. All references should be related.</p> <p>Note that any <tt>keyword</tt> tags for a given section must appear <em>before</em> any sections nested within the given section.</p> <p>The paths in the <tt>refs</tt> attribute are always written Unix-style (forward slashes) and are relative to the location of the documentation content file itself.</p> <!-- eof --> <p><address><hr><div align=center> <table width=100% cellspacing=0 border=0><tr> <td>Copyright © 2002 <a href="http://www.trolltech.com">Trolltech</a><td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a> <td align=right><div align=right>Qt version 3.1.1</div> </table></div></address></body> </html>