1 | /****************************************************************************
|
---|
2 | **
|
---|
3 | ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
---|
4 | ** All rights reserved.
|
---|
5 | ** Contact: Nokia Corporation ([email protected])
|
---|
6 | **
|
---|
7 | ** This file is part of the documentation of the Qt Toolkit.
|
---|
8 | **
|
---|
9 | ** $QT_BEGIN_LICENSE:LGPL$
|
---|
10 | ** Commercial Usage
|
---|
11 | ** Licensees holding valid Qt Commercial licenses may use this file in
|
---|
12 | ** accordance with the Qt Commercial License Agreement provided with the
|
---|
13 | ** Software or, alternatively, in accordance with the terms contained in
|
---|
14 | ** a written agreement between you and Nokia.
|
---|
15 | **
|
---|
16 | ** GNU Lesser General Public License Usage
|
---|
17 | ** Alternatively, this file may be used under the terms of the GNU Lesser
|
---|
18 | ** General Public License version 2.1 as published by the Free Software
|
---|
19 | ** Foundation and appearing in the file LICENSE.LGPL included in the
|
---|
20 | ** packaging of this file. Please review the following information to
|
---|
21 | ** ensure the GNU Lesser General Public License version 2.1 requirements
|
---|
22 | ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
---|
23 | **
|
---|
24 | ** In addition, as a special exception, Nokia gives you certain additional
|
---|
25 | ** rights. These rights are described in the Nokia Qt LGPL Exception
|
---|
26 | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
---|
27 | **
|
---|
28 | ** GNU General Public License Usage
|
---|
29 | ** Alternatively, this file may be used under the terms of the GNU
|
---|
30 | ** General Public License version 3.0 as published by the Free Software
|
---|
31 | ** Foundation and appearing in the file LICENSE.GPL included in the
|
---|
32 | ** packaging of this file. Please review the following information to
|
---|
33 | ** ensure the GNU General Public License version 3.0 requirements will be
|
---|
34 | ** met: http://www.gnu.org/copyleft/gpl.html.
|
---|
35 | **
|
---|
36 | ** If you have questions regarding the use of this file, please contact
|
---|
37 | ** Nokia at [email protected].
|
---|
38 | ** $QT_END_LICENSE$
|
---|
39 | **
|
---|
40 | ****************************************************************************/
|
---|
41 |
|
---|
42 | //! [0]
|
---|
43 | assistant -collectionFile file
|
---|
44 | //! [0]
|
---|
45 |
|
---|
46 |
|
---|
47 | //! [1]
|
---|
48 | <?xml version="1.0" encoding="utf-8" ?>
|
---|
49 | <QHelpCollectionProject version="1.0">
|
---|
50 | <assistant>
|
---|
51 | <title>My Application Help</title>
|
---|
52 | <startPage>qthelp://com.mycompany.1_0_0/doc/index.html</startPage>
|
---|
53 | <currentFilter>myfilter</currentFilter>
|
---|
54 | <applicationIcon>application.png</applicationIcon>
|
---|
55 | <enableFilterFunctionality>false</enableFilterFunctionality>
|
---|
56 | <enableDocumentationManager>false</enableDocumentationManager>
|
---|
57 | <enableAddressBar visible="true">true</enableAddressBar>
|
---|
58 | <cacheDirectory>mycompany/myapplication</cacheDirectory>
|
---|
59 | <aboutMenuText>
|
---|
60 | <text>About My Application</text>
|
---|
61 | <text language="de">Über meine Applikation...</text>
|
---|
62 | </aboutMenuText>
|
---|
63 | <aboutDialog>
|
---|
64 | <file>about.txt</file>
|
---|
65 | <file language="de">ueber.txt</file>
|
---|
66 | <icon>about.png</icon>
|
---|
67 | </aboutDialog>
|
---|
68 | </assistant>
|
---|
69 | <docFiles>
|
---|
70 | <generate>
|
---|
71 | <file>
|
---|
72 | <input>myapplication-manual.qhp</input>
|
---|
73 | <output>myapplication-manual.qch</output>
|
---|
74 | </file>
|
---|
75 | </generate>
|
---|
76 | <register>
|
---|
77 | <file>myapplication-manual.qch</file>
|
---|
78 | </register>
|
---|
79 | </docFiles>
|
---|
80 | </QHelpCollectionProject>
|
---|
81 | //! [1]
|
---|
82 |
|
---|
83 |
|
---|
84 | //! [2]
|
---|
85 | QProcess *process = new QProcess;
|
---|
86 | QStringList args;
|
---|
87 | args << QLatin1String("-collectionFile")
|
---|
88 | << QLatin1String("mycollection.qhc")
|
---|
89 | << QLatin1String("-enableRemoteControl");
|
---|
90 | process->start(QLatin1String("assistant"), args);
|
---|
91 | if (!process->waitForStarted())
|
---|
92 | return;
|
---|
93 | //! [2]
|
---|
94 |
|
---|
95 |
|
---|
96 | //! [3]
|
---|
97 | QByteArray ba;
|
---|
98 | ba.append("setSource qthelp://com.mycompany.1_0_0/doc/index.html");
|
---|
99 | ba.append('\0');
|
---|
100 | process->write(ba);
|
---|
101 | //! [3]
|
---|
102 |
|
---|
103 |
|
---|
104 | //! [4]
|
---|
105 | QByteArray ba;
|
---|
106 | ba.append("hide bookmarks;");
|
---|
107 | ba.append("hide index;");
|
---|
108 | ba.append("setSource qthelp://com.mycompany.1_0_0/doc/index.html");
|
---|
109 | ba.append('\0');
|
---|
110 | process->write(ba);
|
---|
111 | //! [4]
|
---|
112 |
|
---|
113 | //! [5]
|
---|
114 | <?xml version="1.0" encoding="utf-8" ?>
|
---|
115 | <QHelpCollectionProject version="1.0">
|
---|
116 | ...
|
---|
117 | <docFiles>
|
---|
118 | <register>
|
---|
119 | <file>myapplication-manual.qch</file>
|
---|
120 | <file>another-manual.qch</file>
|
---|
121 | </register>
|
---|
122 | </docFiles>
|
---|
123 | </QHelpCollectionProject>
|
---|
124 | //! [5]
|
---|
125 |
|
---|
126 | //! [6]
|
---|
127 | assistant -collectionFile mycollection.qhc -register myapplication-manual.qch
|
---|
128 | //! [6]
|
---|
129 |
|
---|
130 | //! [7]
|
---|
131 | <?xml version="1.0" encoding="utf-8" ?>
|
---|
132 | <QHelpCollectionProject version="1.0">
|
---|
133 | <assistant>
|
---|
134 | <title>My Application Help</title>
|
---|
135 | <cacheDirectory>mycompany/myapplication</cacheDirectory>
|
---|
136 | ...
|
---|
137 | </assistant>
|
---|
138 | </QHelpCollectionProject>
|
---|
139 | //! [7]
|
---|
140 |
|
---|
141 | //! [8]
|
---|
142 | assistant -collectionFile mycollection.qhc
|
---|
143 | //! [8]
|
---|
144 |
|
---|
145 | //! [9]
|
---|
146 | %QDesktopServices::DataLocation%/mycompany/myapplication/mycollection.qhc
|
---|
147 | //! [9]
|
---|
148 |
|
---|
149 | //! [10]
|
---|
150 | qcollectiongenerator mycollection.qhcp -o mycollection.qhc
|
---|
151 | //! [10]
|
---|