1 | //! [0]
|
---|
2 | assistant -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]
|
---|
44 | QProcess *process = new QProcess;
|
---|
45 | QStringList args;
|
---|
46 | args << QLatin1String("-collectionFile")
|
---|
47 | << QLatin1String("mycollection.qhc")
|
---|
48 | << QLatin1String("-enableRemoteControl");
|
---|
49 | process->start(QLatin1String("assistant"), args);
|
---|
50 | if (!process->waitForStarted())
|
---|
51 | return;
|
---|
52 | //! [2]
|
---|
53 |
|
---|
54 |
|
---|
55 | //! [3]
|
---|
56 | QByteArray ba;
|
---|
57 | ba.append("setSource qthelp://com.mycompany.1_0_0/doc/index.html");
|
---|
58 | ba.append('\0');
|
---|
59 | process->write(ba);
|
---|
60 | //! [3]
|
---|
61 |
|
---|
62 |
|
---|
63 | //! [4]
|
---|
64 | QByteArray ba;
|
---|
65 | ba.append("hide bookmarks;");
|
---|
66 | ba.append("hide index;");
|
---|
67 | ba.append("setSource qthelp://com.mycompany.1_0_0/doc/index.html");
|
---|
68 | ba.append('\0');
|
---|
69 | process->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]
|
---|
86 | assistant -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]
|
---|
101 | assistant -collectionFile mycollection.qhc
|
---|
102 | //! [8]
|
---|
103 |
|
---|
104 | //! [9]
|
---|
105 | %QDesktopServices::DataLocation%/mycompany/myapplication/mycollection.qhc
|
---|
106 | //! [9]
|
---|
107 |
|
---|
108 | //! [10]
|
---|
109 | qcollectiongenerator mycollection.qhcp -o mycollection.qhc
|
---|
110 | //! [10]
|
---|