~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to doc/html/assistant-manual.html

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-08-24 04:09:09 UTC
  • Revision ID: james.westby@ubuntu.com-20050824040909-xmxe9jfr4a0w5671
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="iso-8859-1"?>
 
2
<!DOCTYPE html
 
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
 
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 
5
<!-- /tmp/qt-4.0.0-espenr-1119621036935/qt-x11-opensource-desktop-4.0.0/doc/src/assistant-manual.qdoc -->
 
6
<head>
 
7
    <title>Qt 4.0: Qt Assistant Manual</title>
 
8
    <style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
 
9
a:link { color: #004faf; text-decoration: none }
 
10
a:visited { color: #672967; text-decoration: none }
 
11
td.postheader { font-family: sans-serif }
 
12
tr.address { font-family: sans-serif }
 
13
body { background: #ffffff; color: black; }</style>
 
14
</head>
 
15
<body>
 
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
 
17
<tr>
 
18
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
 
19
<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="annotated.html"><font color="#004faf">Annotated</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
 
20
<td align="right" valign="top" width="230"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></td></tr></table><h1 align="center">Qt Assistant Manual</h1>
 
21
<a name="qt-assistant"></a><a name="introduction"></a>
 
22
<h2>Introduction</h2>
 
23
<p>This document introduces <i>Qt Assistant</i>, a tool for presenting on-line documentation. It also introduces the Qt Reference Documentation which is accessible using <i>Qt Assistant</i>, or with a web browser. The document is divided into the following sections:</p>
 
24
<ul><li><a href="#introduction">Introduction</a></li>
 
25
<li><a href="#introduction-to-the-qt-reference-documentation">Introduction to the Qt Reference Documentation</a></li>
 
26
<li><a href="#the-one-minute-guide-to-using-qt-assistant">The One-Minute Guide to Using Qt Assistant</a></li>
 
27
<li><a href="#qt-assistant-in-more-detail">Qt Assistant in More Detail</a></li>
 
28
<ul><li><a href="#the-sidebar">The Sidebar</a></li>
 
29
<li><a href="#the-documentation-window">The Documentation Window</a></li>
 
30
<li><a href="#the-toolbar">The Toolbar</a></li>
 
31
<li><a href="#the-menus">The Menus</a></li>
 
32
<ul><li><a href="#the-file-menu">The File Menu</a></li>
 
33
<li><a href="#the-edit-menu">The Edit Menu</a></li>
 
34
<li><a href="#the-view-menu">The View Menu</a></li>
 
35
<li><a href="#the-go-menu">The Go Menu</a></li>
 
36
<li><a href="#the-bookmarks-menu">The Bookmarks Menu</a></li>
 
37
</ul>
 
38
<li><a href="#the-dialogs">The Dialogs</a></li>
 
39
<ul><li><a href="#the-print-dialog">The Print Dialog</a></li>
 
40
<li><a href="#the-find-text-dialog">The Find Text Dialog</a></li>
 
41
<li><a href="#the-settings-dialog">The Settings Dialog</a></li>
 
42
</ul>
 
43
</ul>
 
44
<li><a href="#full-text-searching">Full Text Searching</a></li>
 
45
<li><a href="#customizing-qt-assistant">Customizing Qt Assistant</a></li>
 
46
<ul><li><a href="#modifying-the-default-documentation-set">Modifying the Default Documentation Set</a></li>
 
47
<ul><li><a href="#documentation-content-file-format">Documentation Content File Format</a></li>
 
48
</ul>
 
49
<li><a href="#profiles">Profiles</a></li>
 
50
<ul><li><a href="#using-profiles">Using Profiles</a></li>
 
51
</ul>
 
52
</ul>
 
53
</ul>
 
54
<a name="introduction-to-the-qt-reference-documentation"></a>
 
55
<h2>Introduction to the Qt Reference Documentation</h2>
 
56
<p>The documentation for the Qt library is written in-line in the <tt>.cpp</tt> files by the developers themselves. The documentation team revises the documentation to ensure that it is accurate and usable, and to provide quality control. The documentation team also writes the larger texts, such as the class descriptions that introduce a class along with the concepts the class uses, as well as introducing the functions and properties that the class provides.</p>
 
57
<p>The documentation focuses on the API rather than the internals, since we make great efforts to keep our API consistent and compatible with each new version, but we may change the internals considerably to improve performance and enhance functionality.</p>
 
58
<p>The Qt Reference Documentation consists of almost 1,500 HTML pages (over 2,500 printed pages). The overwhelming majority of pages document Qt classes. Since developers differ in the way they think and work we provide a variety of approaches to navigating the documentation set:</p>
 
59
<ul>
 
60
<li>The <a href="classes.html">Qt's Classes</a> page lists every class in Qt's public API, and consists of several hundred classes.</li>
 
61
<li>The <a href="mainclasses.html">Qt's Main Classes</a> page lists the classes you're most likely to use most often, and provides a much shorter and more managable list than the All Classes list.</li>
 
62
<li>The <a href="groups.html">Grouped Classes</a> page presents a list of groups, each of which leads to a list of related classes, for example, the <a href="advanced.html">Advanced Widgets</a> list.</li>
 
63
<li>The <a href="hierarchy.html">Class Inheritance Hierarchy</a> page presents a list of classes in terms of the hierarchy of Qt classes.</li>
 
64
<li>The <a href="functions.html">Member Function Index</a> page lists all the functions provided by Qt classes, each one with links to the class(es) in which it appears.</li>
 
65
</ul>
 
66
<p>No matter where you find yourself in the Qt documentation, you will find extensive cross-referencing. Even snippets of example code contain clickable links, so that for example, if you come across a class declaration in a code example, the class name will be a clickable link to the class's documentation.</p>
 
67
<p>In addition to the class documentation some of Qt's modules have extensive descriptions, and there are many overview documents which describe various aspects of the Qt library; all these are linked from the reference documentation home page. There are also two tutorials and numerous example programs in the examples subdirectory of the Qt distribution.</p>
 
68
<a name="the-one-minute-guide-to-using-qt-assistant"></a>
 
69
<h2>The One-Minute Guide to Using Qt Assistant</h2>
 
70
<p>Under Windows, <i>Qt Assistant</i> is available as a menu option on the Qt menu. On Unix, run <tt>assistant</tt> from an xterm.</p>
 
71
<p>When you start up <i>Qt Assistant</i>, you will be presented with a standard main-window style application, with a menu bar and toolbar. Below these, on the left hand side is a navigation window called the <i>Sidebar</i>, and on the right, taking up most of the space, is the documentation window. By default, the Qt Reference Documentation's home page is shown in the documentation window.</p>
 
72
<p><i>Qt Assistant</i> works in a similar way to a web browser. If you click underlined text (which signifies a cross-reference), the documentation window will present the relevant page. You can bookmark pages of particular interest and you can click the <b>Previous</b> and <b>Next</b> toolbar buttons to navigate within the pages you've visited.</p>
 
73
<p>Although <i>Qt Assistant</i> can be used just like a web browser to navigate through the Qt documentation set, <i>Qt Assistant</i> offers a powerful means of navigation that web browsers don't provide. <i>Qt Assistant</i> uses an intelligent algorithm to index all the pages in the documentation sets that it presents so that you can search for particular words and phrases.</p>
 
74
<p>To perform an index search, click the <b>Index</b> tab on the Sidebar (or click <b>Ctrl+I</b>). In the 'Look For' line edit enter a word, e.g. 'homedirpath'. As you type, words are found and highlighted in a list beneath the line edit. If the highlighted text matches what you're looking for, double click it, (or press <b>Enter</b>) and the documentation window will display the relevant page. You rarely have to type in the whole word before <i>Qt Assistant</i> finds a match. Note that for some words there may be more than one possible page that is relevant.</p>
 
75
<p><i>Qt Assistant</i> also provides full text searching for finding specific words in the documentation. Documents with the highest occurrences of the word that you are looking for appear first, and every occurrence of the word within the documentation is highlighted.</p>
 
76
<p><i>Qt Assistant</i> can be customized by creating profiles, a collection of documentation. Profiles can be created for your own use, or for an application you will distribute. With profiles, you can select which documentation you want the end user of your application to be able to view.</p>
 
77
<a name="qt-assistant-in-more-detail"></a>
 
78
<h2>Qt Assistant in More Detail</h2>
 
79
<center><img src="images/assistant-assistant.png" /></center><p>Qt Assistant</p>
 
80
<a name="the-sidebar"></a>
 
81
<h3>The Sidebar</h3>
 
82
<center><img src="images/assistant-sidebar.png" /></center><p>The sidebar provides four ways of navigating documentation:</p>
 
83
<ol type="1">
 
84
<li>The <b>Contents</b> tab presents a tree view of the documentation sets that are available. If you click an item, its documentation will appear in the documentation window. If you double click an item or click a '+' sign to the left of an item, the item's sub-items will appear. Click a sub-item to make its page appear in the documentation window. Click a '-' sign to the left of an item to hide its sub-items.</li>
 
85
<li>The <b>Index</b> tab is used to look up key words or phrases. See <a href="#the-one-minute-guide-to-using-qt-assistant">The One-Minute Guide to Using Qt Assistant</a> for how to use this tab.</li>
 
86
<li>The <b>Bookmarks</b> tab lists any bookmarks you've made. Double click a bookmark to make its page appear in the documentation window. The <b>Bookmarks</b> tab has a <b>New Bookmark</b> button and a <b>Delete Bookmark</b> button at the bottom. Click <b>New Bookmark</b> to bookmark the page that is showing in the documentation window. Click a bookmark in the list, then click <b>Delete Bookmark</b> to delete the highlighted bookmark.</li>
 
87
<li>The <b>Search</b> tab provides full text search of <i>all</i> the documents. See <a href="#full-text-searching">Full Text Searching</a> for more information about this feature.</li>
 
88
</ol>
 
89
<p>If you want the documentation window to use as much space as possible, you can easily hide or show the Sidebar. If the Sidebar is showing, press <b>Ctrl+T</b>, <b>Ctrl+I</b>, <b>Ctrl+B</b>, or <b>Ctrl+S</b> to hide it. If the Sidebar is hidden, press <b>Ctrl+T</b> to show it on the Contents tab, or press <b>Ctrl+I</b> to show it on the Index tab (with the focus in the 'Look For' line edit box), or press <b>Ctrl+B</b> to show it on the Bookmarks tab, or press <b>Ctrl+S</b> to show it on the (full text) <b>Search</b> tab.</p>
 
90
<p>The Sidebar is a dock window, so you can drag it to the top, left, right or bottom of <i>Qt Assistant</i>'s window, or you can drag it outside <i>Qt Assistant</i> to float it.</p>
 
91
<a name="the-documentation-window"></a>
 
92
<h3>The Documentation Window</h3>
 
93
<center><img src="images/assistant-docwindow.png" /></center><p>The documentation window offers a feature for viewing documentation by enabling you to create tabs for each documentation page that you view. Click the <b>Add Tab</b> button and a new tab will appear with the page name as the tab's caption. This makes it convenient to switch between pages when you are working with different documentation. You can delete a tab by clicking the <b>Close Tab</b> button located on the right side of the documentation window.</p>
 
94
<a name="the-toolbar"></a>
 
95
<h3>The Toolbar</h3>
 
96
<center><img src="images/assistant-toolbar1.png" /></center><p>The toolbar provides fast access to the most common actions.</p>
 
97
<ul>
 
98
<li><b>Previous</b> takes you to the previous page. The menu option is <b>Go|Previous</b> and the keyboard shortcut is <b>Alt+Left Arrow</b>.</li>
 
99
<li><b>Next</b> takes you to the next page. The menu option is <b>Go</b>|Next and the keyboard shortcut is <b>Alt+Right Arrow</b>.</li>
 
100
<li><b>Home</b> takes you to the home page (normally the home page of the Qt Reference Documentation). The menu option is <b>Go</b>|Home and the keyboard shortcut is <b>Ctrl+Home</b>.</li>
 
101
<li><b>Copy</b> copies any selected text to the clipboard. The menu option is <b>Edit</b>|Copy and the keyboard shortcut is <b>Ctrl+C</b>.</li>
 
102
<li><b>Find in Text</b> invokes the <b>Find Text</b> dialog. The menu option is <b>Edit|Find in Text</b> and the keyboard shortcut is <b>Ctrl+F</b>.</li>
 
103
<li><b>Print</b> invokes the <b>Print</b> dialog. The menu option is <b>File|Print</b> and the keyboard shortcut is <b>Ctrl+P</b>.</li>
 
104
<li><b>Zoom in</b> increases the font size. The menu option is <b>View|Zoom in</b> and the keyboard shortcut is <b>Ctrl++</b>.</li>
 
105
<li><b>Zoom out</b> decreases the font size. The menu option is <b>View|Zoom out</b> and the keyboard shortcut is <b>Ctrl+-</b>.</li>
 
106
<li><b>What's This?</b> provides a description of a <i>Qt Assistant</i> feature. The menu option is <b>Help|What's This?</b> and the keyboard shortcut is <b>Shift+F1</b>.</li>
 
107
</ul>
 
108
<p>The remaining toolbar buttons are bookmarks and will vary depending on your configuration.</p>
 
109
<a name="the-menus"></a>
 
110
<h3>The Menus</h3>
 
111
<a name="the-file-menu"></a>
 
112
<h4>The File Menu</h4>
 
113
<ul>
 
114
<li><b>File|Print</b> invokes the <b>Print</b> dialog.</li>
 
115
<li><b>File|Exit</b> terminates <i>Qt Assistant</i>.</li>
 
116
</ul>
 
117
<a name="the-edit-menu"></a>
 
118
<h4>The Edit Menu</h4>
 
119
<ul>
 
120
<li><b>Edit|Copy</b> copies any selected text to the clipboard.</li>
 
121
<li><b>Edit|Find in Text</b> invokes the <b>Find Text</b> dialog.</li>
 
122
<li><b>Edit|Settings</b> invokes the <b>Settings</b> dialog.</li>
 
123
</ul>
 
124
<a name="the-view-menu"></a>
 
125
<h4>The View Menu</h4>
 
126
<ul>
 
127
<li><b>View|Zoom in</b> increases the font size.</li>
 
128
<li><b>View|Zoom out</b> decreases the font size.</li>
 
129
<li><b>View|Views|Sidebar</b> toggles the display of the Sidebar.</li>
 
130
<li><b>View|Views|Toolbar</b> toggles the display of the Toolbar.</li>
 
131
<li><b>View|Views|Line up</b> lines up the toolbar buttons in the Toolbar.</li>
 
132
</ul>
 
133
<a name="the-go-menu"></a>
 
134
<h4>The Go Menu</h4>
 
135
<ul>
 
136
<li><b>Go|Previous</b> displays the previous page.</li>
 
137
<li><b>Go|Next</b> displays the next page.</li>
 
138
<li><b>Go|home</b> goes to the home page.</li>
 
139
</ul>
 
140
<p>This menu also has additional items; these are pre-defined bookmarks that vary depending on your configuration.</p>
 
141
<a name="the-bookmarks-menu"></a>
 
142
<h4>The Bookmarks Menu</h4>
 
143
<ul>
 
144
<li><b>Bookmarks|Add</b> adds the current page to the list of bookmarks.</li>
 
145
</ul>
 
146
<p>This menu may have additional items, i.e. any bookmarks that you have already made. If you want to delete a bookmark go to the Bookmarks tab on the Sidebar.</p>
 
147
<a name="the-dialogs"></a>
 
148
<h3>The Dialogs</h3>
 
149
<a name="the-print-dialog"></a>
 
150
<h4>The Print Dialog</h4>
 
151
<p>This dialog is platform-specific. It gives access to various printer options and can be used to print the current page.</p>
 
152
<a name="the-find-text-dialog"></a>
 
153
<h4>The Find Text Dialog</h4>
 
154
<p>This dialog is used to find text in the current page. Enter the text you want to find in the Find line edit. If you check the 'Whole words only' checkbox, the search will only consider whole words, i.e. if you search for 'spin' with this checkbox checked it will not match 'spinbox', but will match 'spin'. If you check the 'Case sensitive' check box then, for example, 'spin' will match 'spin' but not 'Spin'. You can search Forward or Backward from your current position in the page by clicking one of the Direction radio buttons. Click the <b>Find</b> button to search (or search again), and click the <b>Close</b> button to finish.</p>
 
155
<a name="the-settings-dialog"></a>
 
156
<h4>The Settings Dialog</h4>
 
157
<p>The Settings dialog is used to set your preferences for <i>Qt Assistant</i>. The dialog has four tabs: General Settings, Web Settings, PDF Settings, and Profiles. <i>Qt Assistant</i> will remember your settings between sessions, including window sizes and positions, and which pages you have open. Each of the tabs is discussed as follows:</p>
 
158
<ul>
 
159
<li>General Settings<center><img src="images/assistant-general.png" /></center><p>To change the base font used throughout <i>Qt Assistant</i>, select a font type from the Font combobox. To choose a new fixed-width font, for example, to show code snippets, choose a font type from the 'Fixed font' combobox. To change the color of hypertext links, click the 'Link color' color button. Uncheck the 'Underline links' checkbox if you don't want underlined links.</p>
 
160
</li>
 
161
<li>Web Settings<center><img src="images/assistant-web.png" /></center><p>Some pages contain links to external web pages. In order to display these links, you must specify a web browser. Type the name of your browser's executable in the Web Browser Application line edit. Alternatively, click the <b>(ellipsis)</b> button to invoke the <b>Set Web Browser</b> dialog and navigate until you find the web browser you want to use. Click <b>Save</b> to accept the selection.</p>
 
162
<p>To change <i>Qt Assistant</i>'s default home page, enter the file name in the Home Page line edit. Alternatively, click the <b>(ellipsis)</b> button to invoke the <b>Set Homepage</b> dialog. Navigate until you find the home page file you want to use and then click <b>Save</b> to accept the selection.</p>
 
163
</li>
 
164
<li>PDF Settings<center><img src="images/assistant-pdf1.png" /></center><p>Some pages contain links to PDF documents. In order to display these links, you must specify a PDF viewer. Type in the name of your PDF viewer's executable in the line edit. Alternatively, click the <b>(ellipsis)</b> button to invoke the <b>Set PDF Browser</b> dialog and navigate until you find the PDF viewer you want to use. Click <b>Save</b> to accept the selection.</p>
 
165
</li>
 
166
</ul>
 
167
<a name="full-text-searching"></a>
 
168
<h2>Full Text Searching</h2>
 
169
<center><img src="images/assistant-search.png" /></center><p><i>Qt Assistant</i> provides a powerful full text search engine. To search for certain words or text, click the 'Search' tab in the sidebar. Then enter the text you want to look for and press <b>Enter</b> or click <b>Search</b>. The search is not case sensitive, so Foo, fOo and FOO are all treated as the same. The following are examples of common search patterns:</p>
 
170
<ul>
 
171
<li><tt>deep</tt> -- lists all the documents that contain the word 'deep'</li>
 
172
<li><tt>deep*</tt> -- lists all the documents that contain a word beginning with 'deep'</li>
 
173
<li><tt>deep copy</tt> -- lists all documents that contain both 'deep' <i>and</i> 'copy'</li>
 
174
<li><tt>&quot;deep copy&quot;</tt> -- list all documents that contain the phrase 'deep copy'</li>
 
175
</ul>
 
176
<p>The wildcard (*) character cannot be used within quotes.</p>
 
177
<p>The list of documents found is ordered according to the number of occurrences of the search text they contain, therefore those with the highest number of occurrences appearing first. Simply click any document in the list to display it in the document window.</p>
 
178
<p>If the documentation has changed, i.e. if documents have been added or removed, <i>Qt Assistant</i> will reindex.</p>
 
179
<a name="customizing-qt-assistant"></a>
 
180
<h2>Customizing Qt Assistant</h2>
 
181
<p><i>Qt Assistant</i> can be customized by adding and removing documentation from its documentation set. In addition, <i>Qt Assistant</i> introduces the profiles option, which enables its properties to change, for example, the default startup page, and application icon.</p>
 
182
<a name="modifying-the-default-documentation-set"></a>
 
183
<h3>Modifying the Default Documentation Set</h3>
 
184
<p>When it is started without any options, <i>Qt Assistant</i> displays a default set of documentation. When Qt is installed, the default documentation set in <i>Qt Assistant</i> contains the Qt reference documentation as well as the tools that come with Qt, such as <i>Qt Designer</i> and qmake.</p>
 
185
<p>Documentation can be added or removed from <i>Qt Assistant</i> by adding and removing the content files. The format of the content files are specified below. To add a content file, type the following command line option: <tt>-addContentFile docfile</tt>. To remove a content file from the default set, type the following command line option: <tt>-removeContentFile docfile</tt>. For example:</p>
 
186
<pre>&nbsp;   1: &gt; assistant -addContentFile file.dcf
 
187
    2: &gt; assistant
 
188
    3: &gt; assistant -removeContentFile file.dcf</pre>
 
189
<p>In line one, we add the content file <tt>file.dcf</tt>. In line two, we start <i>Qt Assistant</i>. The default set will now be extended with the doc file <tt>file.dcf</tt>. In line three we remove the file <tt>file.dcf</tt> from the default documentation set so that subsequent use of <i>Qt Assistant</i> will not contain this file.</p>
 
190
<a name="documentation-content-file-format"></a>
 
191
<h4>Documentation Content File Format</h4>
 
192
<p>The Documentation Content File must contain the documentation's table of contents and all important keywords for the index. In addition, it may inherit an icon for the documentation which is displayed in the <i>Qt Assistant</i> toolbar. You can also specify an extra directory path for additional images used in the documentation.</p>
 
193
<p>An example of a content file that uses all the available tags and attributes is shown below:</p>
 
194
<pre>&nbsp;   &lt;assistantconfig version=&quot;3.2.0&quot;&gt;
 
195
        &lt;DCF ref=&quot;demo.html&quot; icon=&quot;handbook.png&quot; imagedir=&quot;../img/&quot;
 
196
             title=&quot;Development Demo Handbook&quot;&gt;
 
197
            &lt;section ref=&quot;./chap1/chap1.html&quot; title=&quot;Chapter1&quot;&gt;
 
198
                &lt;section ref=&quot;./chap1/section1.html&quot; title=&quot;Section1&quot;&gt;
 
199
                    &lt;keyword ref=&quot;./chap1/section1.html#foo&quot;&gt;foo&lt;/keyword&gt;
 
200
                    &lt;keyword ref=&quot;./chap1/section1.html#bla&quot;&gt;bla&lt;/keyword&gt;
 
201
                    &lt;section ref=&quot;./chap1/section1.html#subsection1&quot; title=&quot;Subsection 1&quot;/&gt;
 
202
                    &lt;section ref=&quot;./chap1/section1.html#subsection2&quot; title=&quot;Subsection 2&quot;/&gt;
 
203
                    &lt;section ref=&quot;./chap1/section1.html#subsection3&quot; title=&quot;Subsection 3&quot;/&gt;
 
204
                &lt;/section&gt;
 
205
                &lt;section ref=&quot;./chap1/section2&quot; title=&quot;Section2&quot;&gt;
 
206
                    &lt;section ref=&quot;./chap1/section2.html#subsection1&quot; title=&quot;Subsection 1&quot;/&gt;
 
207
                    &lt;section ref=&quot;./chap1/section2.html#subsection2&quot; title=&quot;Subsection 2&quot;/&gt;
 
208
                    &lt;section ref=&quot;./chap1/section2.html#subsection3&quot; title=&quot;Subsection 3&quot;/&gt;
 
209
                &lt;/section&gt;
 
210
            &lt;/section&gt;
 
211
            &lt;section ref=&quot;./chap2/chap2.html&quot; title=&quot;Chapter2&quot;&gt;
 
212
                &lt;keyword ref=&quot;./chap2/chap2.html#foo&quot;&gt;foo&lt;/keyword&gt;
 
213
                &lt;section ref=&quot;./chap2/section1.html&quot; title=&quot;Section1&quot;/&gt;
 
214
            &lt;/section&gt;
 
215
        &lt;/DCF&gt;
 
216
    &lt;/assistantconfig&gt;</pre>
 
217
<p>Sections may be nested as deeply as necessary. All references should be related.</p>
 
218
<p>Note that any <tt>keyword</tt> tags for a given section must appear <i>before</i> any sections nested within the given section.</p>
 
219
<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>
 
220
<p>Since the introduction of the new root tag <tt>assistantconfig</tt> in the fileformat from Qt version 3.2.0, it is possible to specify multiple DCF tags in one file. Note that the old document contents file format, used up to Qt 3.2 is still valid.</p>
 
221
<a name="profiles"></a>
 
222
<h3>Profiles</h3>
 
223
<p>Profiles enable <i>Qt Assistant</i> to act as a specialized help tool for displaying documentation for applications. With profiles, the documentation writer can change properties such as <i>Qt Assistant</i>'s title, application icons, and 'about' dialogs. In addition, profiles can be used to run specialized documentation sets that are separate from the Qt docs. <i>Qt Assistant</i> can be customized by changing the following properties:</p>
 
224
<ul>
 
225
<li>Name - This property is used to name the profile. If multiple profiles are used for the same installation of <i>Qt Assistant</i>, this parameter is crucial to keep their profile specific settings apart. The property name is <tt>name</tt></li>
 
226
<li>Title - This property is used to specify a window title for <i>Qt Assistant</i>. The property name is <tt>title</tt></li>
 
227
<li>Application Icon - This property describes an icon that will be used as <i>Qt Assistant</i> application icon. The location of the icon is relative to the location of the profile. The property name is <tt>applicationicon</tt></li>
 
228
<li>Start Page - This property specifies which page <i>Qt Assistant</i> should initially display when the profile is used. Usually, this is the HTML file which contains the documentation's table of contents. This property also describes the default location to go to when pressing the home button in <i>Qt Assistant</i>'s main user interface. The start page is specified relative to the location of the profile. The property name is <tt>startpage</tt></li>
 
229
<li>About Menu Text - This property describes the text that appears in the <b>Help</b> menu, e.g. About Application. The property name is <tt>aboutmenutext</tt></li>
 
230
<li>About URL - This property can be used to point to an HTML file that describes the contents in the About dialog that is opened for the <b>Help</b> menu, e.g. About Application. The url is specified relative to the location of the profile. The property name is <tt>abouturl</tt></li>
 
231
<li><i>Qt Assistant</i> Documentation - This property describes the location of the <i>Qt Assistant</i> documentation. This is required since <i>Qt Assistant</i> provides self help, such as the full text search help and the <i>Qt Assistant</i> Manual option in the <b>Help</b> menu. The location is a directory relative to the location of the profile. The property name is <tt>assistantdocs</tt>.</li>
 
232
</ul>
 
233
<p>To define a profile, one needs to specify a <i>Qt Assistant</i> Document Profile, usually abbreviated <tt>.adp</tt>. The profile is an extension of the Documentation Content File described above. We add a <tt>profile</tt> tag containing <tt>property</tt> tags to the format.</p>
 
234
<p>An example of a document profile file is shown below:</p>
 
235
<p><tt>helpdemo.adp</tt></p>
 
236
<pre>&nbsp;   &lt;assistantconfig version=&quot;3.2.0&quot;&gt;
 
237
 
 
238
        &lt;profile&gt;
 
239
            &lt;property name=&quot;name&quot;&gt;HelpExample&lt;/property&gt;
 
240
            &lt;property name=&quot;title&quot;&gt;Help Example&lt;/property&gt;
 
241
            &lt;property name=&quot;applicationicon&quot;&gt;logo.png&lt;/property&gt;
 
242
            &lt;property name=&quot;startpage&quot;&gt;index.html&lt;/property&gt;
 
243
            &lt;property name=&quot;aboutmenutext&quot;&gt;About Help&lt;/property&gt;
 
244
            &lt;property name=&quot;abouturl&quot;&gt;../about.txt&lt;/property&gt;
 
245
            &lt;property name=&quot;assistantdocs&quot;&gt;../../../doc/html&lt;/property&gt;
 
246
        &lt;/profile&gt;
 
247
 
 
248
        &lt;DCF ref=&quot;index.html&quot; icon=&quot;handbook.png&quot; title=&quot;Help example&quot;&gt;
 
249
            &lt;section ref=&quot;./manual.html&quot; title=&quot;How to use this Example&quot;&gt;
 
250
                &lt;keyword ref=&quot;./manual.html#installdocs&quot;&gt;Install Docs&lt;/keyword&gt;
 
251
                &lt;keyword ref=&quot;./manual.html#onlydoc&quot;&gt;Example Profile&lt;/keyword&gt;
 
252
                &lt;keyword ref=&quot;./manual.html#hide&quot;&gt;Hide Sidebar&lt;/keyword&gt;
 
253
                &lt;keyword ref=&quot;./manual.html#openqabutton&quot;&gt;Open&lt;/keyword&gt;
 
254
                &lt;keyword ref=&quot;./manual.html#closeqabutton&quot;&gt;Close&lt;/keyword&gt;
 
255
                &lt;keyword ref=&quot;./manual.html#display&quot;&gt;Display&lt;/keyword&gt;
 
256
            &lt;/section&gt;
 
257
       &lt;/DCF&gt;
 
258
 
 
259
    &lt;/assistantconfig&gt;</pre>
 
260
<a name="using-profiles"></a>
 
261
<h4>Using Profiles</h4>
 
262
<p>To use a profile, run <i>Qt Assistant</i> with the option <tt>-profile filename</tt>. This will load the profile specified in the file and will customize <i>Qt Assistant</i> accordingly. For example, to run <i>Qt Assistant</i> with the example file above, <tt>helpdemo.adp</tt>, we would run the command as follows:</p>
 
263
<pre>&nbsp;   &gt; assistant -profile helpdemo.adp</pre>
 
264
<p>See the HelpDemo example in the Qt distribution for a demonstration on how to use <i>Qt Assistant</i> with profiles for your own applications.</p>
 
265
<p /><address><hr /><div align="center">
 
266
<table width="100%" cellspacing="0" border="0"><tr class="address">
 
267
<td width="30%">Copyright &copy; 2005 <a href="trolltech.html">Trolltech</a></td>
 
268
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
269
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
 
270
</tr></table></div></address></body>
 
271
</html>