source: trunk/doc/src/snippets/code/doc_src_assistant-manual.qdoc@ 244

Last change on this file since 244 was 2, checked in by Dmitry A. Kuminov, 16 years ago

Initially imported qt-all-opensource-src-4.5.1 from Trolltech.

File size: 2.8 KB
Line 
1//! [0]
2assistant -collectionFile file
3//! [0]
4
5
6//! [1]
7<?xml version="1.0" encoding="utf-8" ?>
8<QHelpCollectionProject version="1.0">
9 <assistant>
10 <title>My Application Help</title>
11 <startPage>qthelp://com.mycompany.1_0_0/doc/index.html</startPage>
12 <currentFilter>myfilter</currentFilter>
13 <applicationIcon>application.png</applicationIcon>
14 <enableFilterFunctionality>false</enableFilterFunctionality>
15 <enableDocumentationManager>false</enableDocumentationManager>
16 <enableAddressBar visible="true">true</enableAddressBar>
17 <cacheDirectory>mycompany/myapplication</cacheDirectory>
18 <aboutMenuText>
19 <text>About My Application</text>
20 <text language="de">Über meine Applikation...</text>
21 </aboutMenuText>
22 <aboutDialog>
23 <file>about.txt</file>
24 <file language="de">ueber.txt</file>
25 <icon>about.png</icon>
26 </aboutDialog>
27 </assistant>
28 <docFiles>
29 <generate>
30 <file>
31 <input>myapplication-manual.qhp</input>
32 <output>myapplication-manual.qch</output>
33 </file>
34 </generate>
35 <register>
36 <file>myapplication-manual.qch</file>
37 </register>
38 </docFiles>
39</QHelpCollectionProject>
40//! [1]
41
42
43//! [2]
44QProcess *process = new QProcess;
45QStringList args;
46args << QLatin1String("-collectionFile")
47 << QLatin1String("mycollection.qhc")
48 << QLatin1String("-enableRemoteControl");
49process->start(QLatin1String("assistant"), args);
50if (!process->waitForStarted())
51 return;
52//! [2]
53
54
55//! [3]
56QByteArray ba;
57ba.append("setSource qthelp://com.mycompany.1_0_0/doc/index.html");
58ba.append('\0');
59process->write(ba);
60//! [3]
61
62
63//! [4]
64QByteArray ba;
65ba.append("hide bookmarks;");
66ba.append("hide index;");
67ba.append("setSource qthelp://com.mycompany.1_0_0/doc/index.html");
68ba.append('\0');
69process->write(ba);
70//! [4]
71
72//! [5]
73<?xml version="1.0" encoding="utf-8" ?>
74<QHelpCollectionProject version="1.0">
75 ...
76 <docFiles>
77 <register>
78 <file>myapplication-manual.qch</file>
79 <file>another-manual.qch</file>
80 </register>
81 </docFiles>
82</QHelpCollectionProject>
83//! [5]
84
85//! [6]
86assistant -collectionFile mycollection.qhc -register myapplication-manual.qch
87//! [6]
88
89//! [7]
90<?xml version="1.0" encoding="utf-8" ?>
91<QHelpCollectionProject version="1.0">
92 <assistant>
93 <title>My Application Help</title>
94 <cacheDirectory>mycompany/myapplication</cacheDirectory>
95 ...
96 </assistant>
97</QHelpCollectionProject>
98//! [7]
99
100//! [8]
101assistant -collectionFile mycollection.qhc
102//! [8]
103
104//! [9]
105%QDesktopServices::DataLocation%/mycompany/myapplication/mycollection.qhc
106//! [9]
107
108//! [10]
109qcollectiongenerator mycollection.qhcp -o mycollection.qhc
110//! [10]
Note: See TracBrowser for help on using the repository browser.