1 | \chapter Introduction
|
---|
2 |
|
---|
3 | This document introduces \QA, a tool for presenting on-line
|
---|
4 | documentation. It also introduces the Qt Reference Documentation which
|
---|
5 | is accessible using \QA, or with a web browser. The document is
|
---|
6 | divided into the following sections:
|
---|
7 |
|
---|
8 | \list
|
---|
9 | \i Introduction to the Qt Reference Documentation
|
---|
10 | \i The 1 Minute Guide to using Qt Assistant
|
---|
11 | \i Qt Assistant in More Detail
|
---|
12 | \i Full Text Searching
|
---|
13 | \i Customizing Qt Assistant
|
---|
14 | \endlist
|
---|
15 |
|
---|
16 | \chapter Introduction to the Qt Reference Documentation
|
---|
17 |
|
---|
18 | The documentation for the Qt library is written in-line in the \File
|
---|
19 | .cpp files by the developers themselves. The documentation team
|
---|
20 | revises the documentation to ensure that it is accurate and usable,
|
---|
21 | and to provide quality control. The documentation team also writes the
|
---|
22 | larger texts, such as the class descriptions that introduce a class
|
---|
23 | along with the concepts the class uses, as well as introducing the
|
---|
24 | functions and properties that the class provides.
|
---|
25 |
|
---|
26 | The documentation focuses on the API rather than the internals, since
|
---|
27 | we make great efforts to keep our API consistent and compatible with
|
---|
28 | each new version, but we may change the internals considerably to improve
|
---|
29 | performance and enhance functionality.
|
---|
30 |
|
---|
31 | The Qt Reference Documentation consists of almost 1,500 HTML pages
|
---|
32 | (over 2,500 printed pages). The overwhelming majority of pages
|
---|
33 | document Qt classes. Since developers differ in the way they
|
---|
34 | think and work we provide a variety of approaches to navigating the
|
---|
35 | documentation set:
|
---|
36 |
|
---|
37 | \list
|
---|
38 |
|
---|
39 | \i The \link classes.html All Classes\endlink page lists every class
|
---|
40 | in Qt's public API, and consists of several hundred classes.
|
---|
41 |
|
---|
42 | \i The \link mainclasses.html Main Classes\endlink page lists the
|
---|
43 | classes you're most likely to use most often, and provides a much
|
---|
44 | shorter and more managable list than the All Classes list.
|
---|
45 |
|
---|
46 | \i The \link groups.html Grouped Classes\endlink page presents a list
|
---|
47 | of groups, each of which leads to a list of related classes, for
|
---|
48 | example, the \link advanced.html Advanced Widgets\endlink list.
|
---|
49 |
|
---|
50 | \i The \link hierarchy.html Inheritance Hierarchy\endlink page
|
---|
51 | presents a list of classes in terms of the hierarchy of Qt classes.
|
---|
52 |
|
---|
53 | \i The \link functions.html All Functions\endlink page lists all the
|
---|
54 | functions provided by Qt classes, each one with links to the class(es)
|
---|
55 | in which it appears.
|
---|
56 |
|
---|
57 | \endlist
|
---|
58 |
|
---|
59 | No matter where you find yourself in the Qt documentation, you will
|
---|
60 | find extensive cross-referencing. Even snippets of example code
|
---|
61 | contain clickable links, so that for example, if you come across a
|
---|
62 | class declaration in a code example, the class name will be a
|
---|
63 | clickable link to the class's documentation.
|
---|
64 |
|
---|
65 | In addition to the class documentation some of Qt's modules have
|
---|
66 | extensive descriptions, and there are many overview documents which
|
---|
67 | describe various aspects of the Qt library; all these are linked from
|
---|
68 | the reference documentation home page. There are also two tutorials
|
---|
69 | and numerous example programs in the examples subdirectory of the Qt
|
---|
70 | distribution.
|
---|
71 |
|
---|
72 | \chapter The 1 Minute Guide to Using Qt Assistant
|
---|
73 |
|
---|
74 | Under Windows, \QA is available as a menu option on the Qt menu. On
|
---|
75 | Unix, run \c{assistant} from an xterm.
|
---|
76 |
|
---|
77 | When you start up \QA, you will be presented with a standard
|
---|
78 | main-window style application, with a menu bar and toolbar. Below
|
---|
79 | these, on the left hand side is a navigation window called the \e
|
---|
80 | Sidebar, and on the right, taking up most of the space, is the
|
---|
81 | documentation window. By default, the Qt Reference Documentation's home
|
---|
82 | page is shown in the documentation window.
|
---|
83 |
|
---|
84 | \QA works in a similar way to a web browser. If you click underlined
|
---|
85 | text (which signifies a cross-reference), the documentation window will
|
---|
86 | present the relevant page. You can bookmark pages of particular
|
---|
87 | interest and you can click the \Toolbutton Previous and \Toolbutton
|
---|
88 | Next toolbar buttons to navigate within the pages you've visited.
|
---|
89 |
|
---|
90 | Although \QA can be used just like a web browser to navigate through
|
---|
91 | the Qt documentation set, \QA offers a powerful means of navigation
|
---|
92 | that web browsers don't provide. \QA uses an intelligent algorithm to
|
---|
93 | index all the pages in the documentation sets that it presents so that
|
---|
94 | you can search for particular words and phrases.
|
---|
95 |
|
---|
96 | To perform an index search, click the \Toolbutton Index tab on the Sidebar
|
---|
97 | (or click \Key Ctrl+I). In the 'Look For' line edit enter a word, e.g.
|
---|
98 | 'homedirpath'. As you type, words are found and highlighted in a list
|
---|
99 | beneath the line edit. If the highlighted text matches what you're
|
---|
100 | looking for, double click it, (or press \Key Enter) and the
|
---|
101 | documentation window will display the relevant page. You rarely have
|
---|
102 | to type in the whole word before \QA finds a match. Note that for some
|
---|
103 | words there may be more than one possible page that is relevant.
|
---|
104 |
|
---|
105 | \QA also provides full text searching for finding specific words in
|
---|
106 | the documentation. Documents with the highest occurrences of the word
|
---|
107 | that you are looking for appear first, and every occurrence of the
|
---|
108 | word within the documentation is highlighted.
|
---|
109 |
|
---|
110 | \omit
|
---|
111 | For example, enter 'setenabled' in the 'Look For' line edit.
|
---|
112 | As you type, words are found and highlighted in the list beneath the
|
---|
113 | line edit, as before. Once the highlighted text matches what you're
|
---|
114 | looking for, double click it, (or press \Key Enter). In the case of
|
---|
115 | setEnabled, it is a function name which occurs in several classes, so
|
---|
116 | a dialog pops up listing the possible choices. Click the choice you're
|
---|
117 | interested in (or move to it using the \Key Up and \Key Down arrow
|
---|
118 | keys and press \Key Enter). The relevant page will display in the
|
---|
119 | documentation window.
|
---|
120 | \endomit
|
---|
121 |
|
---|
122 | \QA can be customized by creating profiles, a collection of
|
---|
123 | documentation. Profiles can be created for your own use, or for an
|
---|
124 | application you will distribute. With profiles, you can select which
|
---|
125 | documentation you want the end user of your application to be able to
|
---|
126 | view.
|
---|
127 |
|
---|
128 | \chapter Qt Assistant in More Detail
|
---|
129 |
|
---|
130 | \img assistant.png
|
---|
131 | \caption Qt Assistant
|
---|
132 |
|
---|
133 | \section1 The Sidebar
|
---|
134 |
|
---|
135 | \img sidebar.png
|
---|
136 |
|
---|
137 | The sidebar provides four ways of navigating documentation:
|
---|
138 | \list 1
|
---|
139 | \i The \Toolbutton Contents tab presents a tree view of the
|
---|
140 | documentation sets that are available. If you click an item, its
|
---|
141 | documentation will appear in the documentation window. If you double
|
---|
142 | click an item or click a '+' sign to the left of an item, the item's
|
---|
143 | sub-items will appear. Click a sub-item to make its page appear in the
|
---|
144 | documentation window. Click a '-' sign to the left of an item to hide
|
---|
145 | its sub-items.
|
---|
146 | \i The \Toolbutton Index tab is used to look up key words or phrases.
|
---|
147 | See \l{The 1 Minute Guide to using Qt Assistant} for how to use this
|
---|
148 | tab.
|
---|
149 | \i The \Toolbutton Bookmarks tab lists any bookmarks you've made.
|
---|
150 | Double click a bookmark to make its page appear in the documentation
|
---|
151 | window. The \Toolbutton Bookmarks tab has a \Button{New Bookmark}
|
---|
152 | button and a \Button{Delete Bookmark} button at the bottom. Click
|
---|
153 | \Button{New Bookmark} to bookmark the page that is showing in the
|
---|
154 | documentation window. Click a bookmark in the list, then click
|
---|
155 | \Button{Delete Bookmark} to delete the highlighted bookmark.
|
---|
156 | \i The \Toolbutton Search tab provides full text search of \e all
|
---|
157 | the documents. See \l{Full Text Searching} for more information about
|
---|
158 | this feature.
|
---|
159 | \endlist
|
---|
160 |
|
---|
161 | If you want the documentation window to use as much space as possible,
|
---|
162 | you can easily hide or show the Sidebar. If the Sidebar is showing,
|
---|
163 | press \Key Ctrl+T, \Key Ctrl+I, \Key Ctrl+B or \Key Ctrl+S to hide it.
|
---|
164 | If the Sidebar is hidden, press \Key Ctrl+T to show it on the Contents
|
---|
165 | tab, or press \Key Ctrl+I to show it on the Index tab (with the focus
|
---|
166 | in the 'Look For' line edit box), or press \Key Ctrl+B to show it on
|
---|
167 | the Bookmarks tab, or press \Key Ctrl+S to show it on the (full text)
|
---|
168 | Search tab.
|
---|
169 |
|
---|
170 | The Sidebar is a dock window, so you can drag it to the top, left,
|
---|
171 | right or bottom of \QA's window, or you can drag it outside \QA to
|
---|
172 | float it.
|
---|
173 |
|
---|
174 | \section1 The Documentation Window
|
---|
175 |
|
---|
176 | \img docwindow.png
|
---|
177 |
|
---|
178 | The documentation window offers a feature for viewing documentation by
|
---|
179 | enabling you to create tabs for each documentation page that you view.
|
---|
180 | Click the \Button {Add Tab} button and a new tab will appear with the
|
---|
181 | page name as the tab's caption. This makes it convenient to switch
|
---|
182 | between pages when you are working with different documentation. You
|
---|
183 | can delete a tab by clicking the \Button {Close Tab} button located
|
---|
184 | on the right side of the documentation window.
|
---|
185 |
|
---|
186 | \section1 The Toolbar
|
---|
187 |
|
---|
188 | \img toolbar1.png
|
---|
189 |
|
---|
190 | The toolbar provides fast access to the most common actions.
|
---|
191 | \list
|
---|
192 | \i \Toolbutton Previous takes you to the previous page. The menu
|
---|
193 | option is \Menu Go|Previous and the keyboard shortcut is \Key{Alt+Left
|
---|
194 | Arrow}.
|
---|
195 | \i \Toolbutton Next takes you to the next page. The menu
|
---|
196 | option is \Menu Go|Next and the keyboard shortcut is \Key{Alt+Right
|
---|
197 | Arrow}.
|
---|
198 | \i \Toolbutton Home takes you to the home page (normally the home page
|
---|
199 | of the Qt Reference Documentation). The menu
|
---|
200 | option is \Menu Go|Home and the keyboard shortcut is \Key{Ctrl+Home}.
|
---|
201 | \i \Toolbutton Copy copies any selected text to the clipboard. The menu
|
---|
202 | option is \Menu Edit|Copy and the keyboard shortcut is \Key{Ctrl+C}.
|
---|
203 | \i \Toolbutton{Find in Text} invokes the \Dialog{Find Text} dialog. The menu
|
---|
204 | option is \Menu{Edit|Find in Text} and the keyboard shortcut is \Key{Ctrl+F}.
|
---|
205 | \i \Toolbutton{Print} invokes the \Dialog{Print} dialog. The menu
|
---|
206 | option is \Menu{File|Print} and the keyboard shortcut is \Key{Ctrl+P}.
|
---|
207 | \i \Toolbutton{Zoom in} increases the font size. The menu
|
---|
208 | option is \Menu{View|Zoom in} and the keyboard shortcut is \Key{Ctrl++}.
|
---|
209 | \i \Toolbutton{Zoom out} decreases the font size. The menu
|
---|
210 | option is \Menu{View|Zoom out} and the keyboard shortcut is \Key{Ctrl+-}.
|
---|
211 | \i \Toolbutton{What's This?} provides a description of a \QA feature.
|
---|
212 | The menu option is \Menu{Help|What's This?} and the keyboard shortcut
|
---|
213 | is \Key{Shift+F1}.
|
---|
214 | \endlist
|
---|
215 |
|
---|
216 | The remaining toolbar buttons are bookmarks and will vary depending on
|
---|
217 | your configuration.
|
---|
218 |
|
---|
219 | \section1 The Menus
|
---|
220 |
|
---|
221 | \section2 The File Menu
|
---|
222 |
|
---|
223 | \list
|
---|
224 | \i \Menu{File|Print} invokes the \Dialog{Print} dialog.
|
---|
225 | \i \Menu{File|Exit} terminates \QA.
|
---|
226 | \endlist
|
---|
227 |
|
---|
228 | \section2 The Edit Menu
|
---|
229 |
|
---|
230 | \list
|
---|
231 | \i \Menu{Edit|Copy} copies any selected text to the clipboard.
|
---|
232 | \i \Menu{Edit|Find in Text} invokes the \Dialog{Find Text} dialog.
|
---|
233 | \i \Menu{Edit|Settings} invokes the \Dialog{Settings} dialog.
|
---|
234 | \endlist
|
---|
235 |
|
---|
236 | \section2 The View Menu
|
---|
237 |
|
---|
238 | \list
|
---|
239 | \i \Menu{View|Zoom in} increases the font size.
|
---|
240 | \i \Menu{View|Zoom out} decreases the font size.
|
---|
241 | \i \Menu{View|Views|Sidebar} toggles the display of the Sidebar.
|
---|
242 | \i \Menu{View|Views|Toolbar} toggles the display of the Toolbar.
|
---|
243 | \i \Menu{View|Views|Line up} lines up the toolbar buttons in the
|
---|
244 | Toolbar.
|
---|
245 | \endlist
|
---|
246 |
|
---|
247 | \section2 The Go Menu
|
---|
248 |
|
---|
249 | \list
|
---|
250 | \i \Menu{Go|Previous} displays the previous page.
|
---|
251 | \i \Menu{Go|Next} displays the next page.
|
---|
252 | \i \Menu{Go|home} goes to the home page.
|
---|
253 | \endlist
|
---|
254 | This menu also has additional items; these are pre-defined bookmarks
|
---|
255 | that vary depending on your configuration.
|
---|
256 |
|
---|
257 | \section2 The Bookmarks Menu
|
---|
258 |
|
---|
259 | \list
|
---|
260 | \i \Menu{Bookmarks|Add} adds the current page to the list of bookmarks.
|
---|
261 | \endlist
|
---|
262 | This menu may have additional items, i.e. any bookmarks that you have
|
---|
263 | already made. If you want to delete a bookmark go to the Bookmarks tab
|
---|
264 | on the Sidebar.
|
---|
265 |
|
---|
266 | \section1 The Dialogs
|
---|
267 |
|
---|
268 | \section2 The Print Dialog
|
---|
269 |
|
---|
270 | This dialog is platform-specific. It gives access to various printer
|
---|
271 | options and can be used to print the current page.
|
---|
272 |
|
---|
273 | \section2 The Find Text Dialog
|
---|
274 |
|
---|
275 | This dialog is used to find text in the current page. Enter the text
|
---|
276 | you want to find in the Find line edit. If you check the 'Whole words
|
---|
277 | only' checkbox, the search will only consider whole words, i.e. if you
|
---|
278 | search for 'spin' with this checkbox checked it will not match
|
---|
279 | 'spinbox', but will match 'spin'. If you check the 'Case sensitive'
|
---|
280 | check box then, for example, 'spin' will match 'spin' but not 'Spin'.
|
---|
281 | You can search Forward or Backward from your current position in the
|
---|
282 | page by clicking one of the Direction radio buttons. Click the \Button
|
---|
283 | Find button to search (or search again), and click the \Button Close
|
---|
284 | button to finish.
|
---|
285 |
|
---|
286 | \section2 The Settings Dialog
|
---|
287 |
|
---|
288 | The Settings dialog is used to set your preferences for \QA. The
|
---|
289 | dialog has four tabs: General Settings, Web Settings, PDF Settings,
|
---|
290 | and Profiles. \QA will remember your settings between sessions,
|
---|
291 | including window sizes and positions, and which pages you have open.
|
---|
292 | Each of the tabs is discussed as follows:
|
---|
293 |
|
---|
294 | \list
|
---|
295 | \i General Settings
|
---|
296 |
|
---|
297 | \img general.png
|
---|
298 |
|
---|
299 | To change the base font used throughout \QA, select a
|
---|
300 | font type from the Font combobox. To choose a new fixed-width
|
---|
301 | font, for example, to show code snippets, choose a font type from
|
---|
302 | the 'Fixed font' combobox. To change the color of hypertext
|
---|
303 | links, click the 'Link color' color button. Uncheck the
|
---|
304 | 'Underline links' checkbox if you don't want underlined links.
|
---|
305 |
|
---|
306 | \i Web Settings
|
---|
307 |
|
---|
308 | \img web.png
|
---|
309 |
|
---|
310 | Some pages contain links to external web pages. In order to display
|
---|
311 | these links, you must specify a web browser. Type the name of your
|
---|
312 | browser's executable in the Web Browser Application line edit.
|
---|
313 | Alternatively, click the \Button {(ellipsis)} button to invoke the
|
---|
314 | \Widget {Set Web Browser} dialog and navigate until you find the web
|
---|
315 | browser you want to use. Click \Button {Save} to accept the selection.
|
---|
316 |
|
---|
317 | To change \QA's default home page, enter the file name in the Home
|
---|
318 | Page line edit. Alternatively, click the \Button {(ellipsis)} button
|
---|
319 | to invoke the \Widget {Set Homepage} dialog. Navigate until you find
|
---|
320 | the home page file you want to use and then click \Button {Save} to
|
---|
321 | accept the selection.
|
---|
322 |
|
---|
323 | \i PDF Settings
|
---|
324 |
|
---|
325 | \img pdf1.png
|
---|
326 |
|
---|
327 | Some pages contain links to PDF documents. In order to display these
|
---|
328 | links, you must specify a PDF viewer. Type in the name of your PDF viewer's
|
---|
329 | executable in the line edit. Alternatively, click the \Button {(ellipsis)}
|
---|
330 | button to invoke the \Widget {Set PDF Browser} dialog and navigate
|
---|
331 | until you find the PDF viewer you want to use. Click \Button Save to
|
---|
332 | accept the selection.
|
---|
333 |
|
---|
334 | \chapter Full Text Searching
|
---|
335 |
|
---|
336 | \img search.png
|
---|
337 |
|
---|
338 | \QA provides a powerful full text search engine. To search
|
---|
339 | for certain words or text, click the 'Search' tab in the sidebar. Then
|
---|
340 | enter the text you want to look for and press \Key Enter or click
|
---|
341 | \Button Search. The search is not case sensitive, so Foo, fOo and
|
---|
342 | FOO are all treated as the same. The following are examples of common search
|
---|
343 | patterns:
|
---|
344 |
|
---|
345 | \list
|
---|
346 | \i \c deep -- lists all the documents that contain the word 'deep'
|
---|
347 |
|
---|
348 | \i \c{deep*} -- lists all the documents that contain a word beginning
|
---|
349 | with 'deep'
|
---|
350 |
|
---|
351 | \i \c{deep copy} -- lists all documents that contain both 'deep' \e
|
---|
352 | and 'copy'
|
---|
353 |
|
---|
354 | \i \c{"deep copy"} -- list all documents that contain the phrase 'deep copy'
|
---|
355 | \endlist
|
---|
356 |
|
---|
357 | The wildcard (*) character cannot be used within quotes.
|
---|
358 |
|
---|
359 | The list of documents found is ordered according to the number of
|
---|
360 | occurrences of the search text they contain, therefore those with the
|
---|
361 | highest number of occurrences appearing first. Simply click any
|
---|
362 | document in the list to display it in the document window.
|
---|
363 |
|
---|
364 | If the documentation has changed, i.e. if documents have been added or
|
---|
365 | removed, \QA will reindex.
|
---|
366 |
|
---|
367 | \chapter Customizing Qt Assistant
|
---|
368 |
|
---|
369 | \QA can be customized by adding and removing documentation from its
|
---|
370 | documentation set. In addition, \QA introduces the profiles option,
|
---|
371 | which enables its properties to change, for example, the default
|
---|
372 | startup page, and application icon.
|
---|
373 |
|
---|
374 | \section1 Modifying the Default Documentation Set
|
---|
375 |
|
---|
376 | When it is started without any options, \QA displays a default set of
|
---|
377 | documentation. When Qt is installed, the default documentation set in
|
---|
378 | \QA contains the Qt reference documentation as well as the tools that
|
---|
379 | come with Qt, such as \QD and qmake.
|
---|
380 |
|
---|
381 | Documentation can be added or removed from \QA by
|
---|
382 | adding and removing the content files. The format of the content files are
|
---|
383 | specified below. To add a content file, type the following command line
|
---|
384 | option: \c{-addContentFile docfile}. To remove a content file from the
|
---|
385 | default set, type the following command line option:
|
---|
386 | \c{-removeContentFile docfile}. For example:
|
---|
387 |
|
---|
388 | \code
|
---|
389 | 1: > assistant -addContentFile file.dcf
|
---|
390 | 2: > assistant
|
---|
391 | 3: > assistant -removeContentFile file.dcf
|
---|
392 | \endcode
|
---|
393 |
|
---|
394 | In line one, we add the content file \c file.dcf. In line two, we start
|
---|
395 | \QA. The default set will now be extended with the doc file
|
---|
396 | \c file.dcf. In line three we remove the file \c file.dcf from the default
|
---|
397 | documentation set so that subsequent use of \QA will not contain this
|
---|
398 | file.
|
---|
399 |
|
---|
400 | \section2 Documentation Content File Format
|
---|
401 |
|
---|
402 | The Documentation Content File must contain the documentation's table
|
---|
403 | of contents and all important keywords for the index. In addition, it
|
---|
404 | may inherit an icon for the documentation which is displayed in the
|
---|
405 | \QA toolbar. You can also specify an extra directory path for
|
---|
406 | additional images used in the documentation.
|
---|
407 |
|
---|
408 | An example of a content file that uses all the available tags and
|
---|
409 | attributes is shown below:
|
---|
410 | \code
|
---|
411 | <assistantconfig version="3.2.0">
|
---|
412 | <DCF ref="demo.html" icon="handbook.png" imagedir="../img/"
|
---|
413 | title="Development Demo Handbook">
|
---|
414 | <section ref="./chap1/chap1.html" title="Chapter1">
|
---|
415 | <section ref="./chap1/section1.html" title="Section1">
|
---|
416 | <keyword ref="./chap1/section1.html#foo">foo</keyword>
|
---|
417 | <keyword ref="./chap1/section1.html#bla">bla</keyword>
|
---|
418 | <section ref="./chap1/section1.html#subsection1" title="Subsection 1"/>
|
---|
419 | <section ref="./chap1/section1.html#subsection2" title="Subsection 2"/>
|
---|
420 | <section ref="./chap1/section1.html#subsection3" title="Subsection 3"/>
|
---|
421 | </section>
|
---|
422 | <section ref="./chap1/section2" title="Section2">
|
---|
423 | <section ref="./chap1/section2.html#subsection1" title="Subsection 1"/>
|
---|
424 | <section ref="./chap1/section2.html#subsection2" title="Subsection 2"/>
|
---|
425 | <section ref="./chap1/section2.html#subsection3" title="Subsection 3"/>
|
---|
426 | </section>
|
---|
427 | </section>
|
---|
428 | <section ref="./chap2/chap2.html" title="Chapter2">
|
---|
429 | <keyword ref="./chap2/chap2.html#foo">foo</keyword>
|
---|
430 | <section ref="./chap2/section1.html" title="Section1"/>
|
---|
431 | </section>
|
---|
432 | </DCF>
|
---|
433 | </assistantconfig>
|
---|
434 | \endcode
|
---|
435 |
|
---|
436 | Sections may be nested as deeply as necessary. All references should
|
---|
437 | be related.
|
---|
438 |
|
---|
439 | Note that any \c keyword tags for a given section must appear \e
|
---|
440 | before any sections nested within the given section.
|
---|
441 |
|
---|
442 | The paths in the \c refs attribute are always written Unix-style
|
---|
443 | (forward slashes) and are relative to the location of the
|
---|
444 | documentation content file itself.
|
---|
445 |
|
---|
446 | Since the introduction of the new root tag \c assistantconfig in the
|
---|
447 | fileformat from Qt version 3.2.0, it is possible to specify multiple DCF tags in
|
---|
448 | one file. Note that the old document contents file format, used up to
|
---|
449 | Qt 3.2 is still valid.
|
---|
450 |
|
---|
451 | \section1 Profiles
|
---|
452 |
|
---|
453 | Profiles enable \QA to act as a specialized help tool for displaying
|
---|
454 | documentation for applications. With profiles, the documentation
|
---|
455 | writer can change properties such as \QA's title, application icons, and
|
---|
456 | 'about' dialogs. In addition, profiles can be used to run specialized
|
---|
457 | documentation sets that are separate from the Qt docs. \QA can be
|
---|
458 | customized by changing the following properties:
|
---|
459 |
|
---|
460 | \list
|
---|
461 |
|
---|
462 | \i Name- This property is used to name the profile. If multiple
|
---|
463 | profiles are used for the same installation of \QA, this
|
---|
464 | parameter is crucial to keep their profile specific settings
|
---|
465 | apart. The property name is \c name
|
---|
466 |
|
---|
467 | \i Title- This property is used to specify a caption for \QA. The
|
---|
468 | property name is \c title
|
---|
469 |
|
---|
470 | \i Application Icon- This property describes an icon that will be used
|
---|
471 | as \QA application icon. The location of the icon is relative to the
|
---|
472 | location of the profile. The property name is \c applicationicon
|
---|
473 |
|
---|
474 | \i Start Page- This property specifies which page \QA should initially
|
---|
475 | display when the profile is used. Usually, this is the HTML file which
|
---|
476 | contains the documentation's table of contents. This property also
|
---|
477 | describes the default location to go to when pressing the home button
|
---|
478 | in \QA's main user interface. The start page is specified relative to
|
---|
479 | the location of the profile. The property name is \c startpage
|
---|
480 |
|
---|
481 | \i About Menu Text- This property describes the text that appears in
|
---|
482 | the \Menu Help menu, e.g. About Application. The property name is \c
|
---|
483 | aboutmenutext
|
---|
484 |
|
---|
485 | \i About URL- This property can be used to point to an HTML file that
|
---|
486 | describes the contents in the About dialog that is opened for the
|
---|
487 | \Menu Help menu, e.g. About Application. The url is specified relative
|
---|
488 | to the location of the profile. The property name is \c abouturl
|
---|
489 |
|
---|
490 | \i \QA Documentation- This property describes the location of
|
---|
491 | the \QA documentation. This is required since \QA provides
|
---|
492 | self help, such as the full text search help and the \QA
|
---|
493 | Manual option in the \Menu Help menu. The location is a directory
|
---|
494 | relative to the location of the profile. The property name is \c
|
---|
495 | assistantdocs.
|
---|
496 |
|
---|
497 | \endlist
|
---|
498 |
|
---|
499 | To define a profile, one needs to specify a \QA Document
|
---|
500 | Profile, usually abbreviated \c{.adp}. The profile is an extension of
|
---|
501 | the Documentation Content File described above. We add a \c profile
|
---|
502 | tag containing \c property tags to the format.
|
---|
503 |
|
---|
504 | An example of a document profile file is shown below:
|
---|
505 |
|
---|
506 | \c helpdemo.adp
|
---|
507 |
|
---|
508 | \code
|
---|
509 | <assistantconfig version="3.2.0">
|
---|
510 |
|
---|
511 | <profile>
|
---|
512 | <property name="name">HelpExample</property>
|
---|
513 | <property name="title">Help Example</property>
|
---|
514 | <property name="applicationicon">logo.png</property>
|
---|
515 | <property name="startpage">index.html</property>
|
---|
516 | <property name="aboutmenutext">About Help</property>
|
---|
517 | <property name="abouturl">../about.txt</property>
|
---|
518 | <property name="assistantdocs">../../../doc/html</property>
|
---|
519 | </profile>
|
---|
520 |
|
---|
521 | <DCF ref="index.html" icon="handbook.png" title="Help example">
|
---|
522 | <section ref="./manual.html" title="How to use this Example">
|
---|
523 | <keyword ref="./manual.html#installdocs">Install Docs</keyword>
|
---|
524 | <keyword ref="./manual.html#onlydoc">Example Profile</keyword>
|
---|
525 | <keyword ref="./manual.html#hide">Hide Sidebar</keyword>
|
---|
526 | <keyword ref="./manual.html#openqabutton">Open</keyword>
|
---|
527 | <keyword ref="./manual.html#closeqabutton">Close</keyword>
|
---|
528 | <keyword ref="./manual.html#display">Display</keyword>
|
---|
529 | </section>
|
---|
530 | </DCF>
|
---|
531 |
|
---|
532 | </assistantconfig>
|
---|
533 | \endcode
|
---|
534 |
|
---|
535 | These files are XML files. Characters such as \c{<}, \c{>}, and \c{&}
|
---|
536 | must be written as entities (e.g., \c{<}, \c{>}, \c{&}).
|
---|
537 |
|
---|
538 | \section2 Using Profiles
|
---|
539 |
|
---|
540 | To use a profile, run \QA with the option \c {-profile filename}.
|
---|
541 | This will load the profile specified in the file and will customize
|
---|
542 | \QA accordingly. For example, to run \QA with the example
|
---|
543 | file above, \c helpdemo.adp, we would run the command as follows:
|
---|
544 |
|
---|
545 | \code
|
---|
546 | > assistant -profile helpdemo.adp
|
---|
547 | \endcode
|
---|
548 |
|
---|
549 | See the HelpDemo example in the Qt distribution for a demonstration
|
---|
550 | on how to use \QA with profiles for your own applications.
|
---|
551 |
|
---|
552 | When distributing \QA with your application, you will also need to
|
---|
553 | copy the icon files from the \c QTDIR/tools/assistant/images
|
---|
554 | directory so that \QA finds its icons.
|
---|
555 |
|
---|
556 | \omit
|
---|
557 | For small documentation sets, the sidebar may not be necessary. You
|
---|
558 | can hide the sidebar on startup with the following:
|
---|
559 | \code
|
---|
560 | assistant -hideSidebar
|
---|
561 | \endcode
|
---|
562 | \endomit
|
---|
563 |
|
---|