summaryrefslogtreecommitdiffstats
path: root/doc/html/qassistantclient.html
blob: af3a3c1500769aaf39be43ef82260fe22bd749fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/tools/assistant/lib/qassistantclient.cpp:55 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>QAssistantClient Class</title>
<style type="text/css"><!--
fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
body { background: #ffffff; color: black; }
--></style>
</head>
<body>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr bgcolor="#E5E5E5">
<td valign=center>
 <a href="index.html">
<font color="#004faf">Home</font></a>
 | <a href="classes.html">
<font color="#004faf">All&nbsp;Classes</font></a>
 | <a href="mainclasses.html">
<font color="#004faf">Main&nbsp;Classes</font></a>
 | <a href="annotated.html">
<font color="#004faf">Annotated</font></a>
 | <a href="groups.html">
<font color="#004faf">Grouped&nbsp;Classes</font></a>
 | <a href="functions.html">
<font color="#004faf">Functions</font></a>
</td>
<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QAssistantClient Class Reference</h1>

<p>The QAssistantClient class provides a means of using Qt
Assistant as an application's help tool.
<a href="#details">More...</a>
<p><tt>#include &lt;<a href="qassistantclient-h.html">qassistantclient.h</a>&gt;</tt>
<p>Inherits <a href="qobject.html">QObject</a>.
<p><a href="qassistantclient-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li class=fn><a href="#QAssistantClient"><b>QAssistantClient</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;path, QObject&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0 )</li>
<li class=fn><a href="#~QAssistantClient"><b>~QAssistantClient</b></a> ()</li>
<li class=fn>bool <a href="#isOpen"><b>isOpen</b></a> () const</li>
<li class=fn>void <a href="#setArguments"><b>setArguments</b></a> ( const&nbsp;QStringList&nbsp;&amp;&nbsp;args )</li>
</ul>
<h2>Public Slots</h2>
<ul>
<li class=fn>virtual void <a href="#openAssistant"><b>openAssistant</b></a> ()</li>
<li class=fn>virtual void <a href="#closeAssistant"><b>closeAssistant</b></a> ()</li>
<li class=fn>virtual void <a href="#showPage"><b>showPage</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;page )</li>
</ul>
<h2>Signals</h2>
<ul>
<li class=fn>void <a href="#assistantOpened"><b>assistantOpened</b></a> ()</li>
<li class=fn>void <a href="#assistantClosed"><b>assistantClosed</b></a> ()</li>
<li class=fn>void <a href="#error"><b>error</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;msg )</li>
</ul>
<h2>Properties</h2>
<ul>
<li class=fn>bool <a href="#open-prop"><b>open</b></a>&nbsp;- whether Qt Assistant is open &nbsp;<em>(read only)</em></li>
</ul>
<hr><a name="details"></a><h2>Detailed Description</h2>


The QAssistantClient class provides a means of using Qt
Assistant as an application's help tool.
<p> Using Qt Assistant is simple: Create a QAssistantClient instance,
then call <a href="#showPage">showPage</a>() as often as necessary to show your help
pages. When you call showPage(), Qt Assistant will be launched if
it isn't already running.
<p> The QAssistantClient instance can open (<a href="#openAssistant">openAssistant</a>()) or close
(<a href="#closeAssistant">closeAssistant</a>()) Qt Assistant whenever required. If Qt Assistant
is open, <a href="#isOpen">isOpen</a>() returns TRUE.
<p> One QAssistantClient instance interacts with one Qt Assistant
instance, so every time you call openAssistant(), showPage() or
closeAssistant() they are applied to the particular Qt Assistant
instance associated with the QAssistantClient.
<p> When you call openAssistant() the <a href="#assistantOpened">assistantOpened</a>() signal is
emitted. Similarly when closeAssistant() is called,
<a href="#assistantClosed">assistantClosed</a>() is emitted. In either case, if an error occurs,
<a href="#error">error</a>() is emitted.
<p> This class is not included in the Qt library itself. To use it you
must link against <tt>libqassistantclient.a</tt> (Unix) or <tt>qassistantclient.lib</tt> (Windows), which is built into <tt>INSTALL/lib</tt>
if you built the Qt tools (<tt>INSTALL</tt> is the directory where Qt is
installed). If you use qmake, then you can simply add the following
line to your pro file:
<p> <pre>
        LIBS += -lqassistantclient
    </pre>
 
<p> See also "Adding Documentation to Qt Assistant" in the <a href="assistant.html">Qt Assistant manual</a>.

<hr><h2>Member Function Documentation</h2>
<h3 class=fn><a name="QAssistantClient"></a>QAssistantClient::QAssistantClient ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;path, <a href="qobject.html">QObject</a>&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0 )
</h3>
Constructs an assistant client object. The <em>path</em> specifies the
path to the Qt Assistant executable. If <em>path</em> is an empty
string the system path (<tt>%PATH%</tt> or <tt>$PATH</tt>) is used.
<p> The assistant client object is a child of <em>parent</em> and is called
<em>name</em>.

<h3 class=fn><a name="~QAssistantClient"></a>QAssistantClient::~QAssistantClient ()
</h3>
Destroys the assistant client object and frees up all allocated
resources.

<h3 class=fn>void <a name="assistantClosed"></a>QAssistantClient::assistantClosed ()<tt> [signal]</tt>
</h3>

<p> This signal is emitted when the connection to Qt Assistant is
closed. This happens when the user exits Qt Assistant, or when an
error in the server or client occurs, or if <a href="#closeAssistant">closeAssistant</a>() is
called.

<h3 class=fn>void <a name="assistantOpened"></a>QAssistantClient::assistantOpened ()<tt> [signal]</tt>
</h3>

<p> This signal is emitted when Qt Assistant is open and the
client-server communication is set up.

<h3 class=fn>void <a name="closeAssistant"></a>QAssistantClient::closeAssistant ()<tt> [virtual slot]</tt>
</h3>
Use this function to close Qt Assistant.
<p> <p>See also <a href="#assistantClosed">assistantClosed</a>().

<h3 class=fn>void <a name="error"></a>QAssistantClient::error ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;msg )<tt> [signal]</tt>
</h3>

<p> This signal is emitted if Qt Assistant cannot be started or if an
error occurs during the initialization of the connection between
Qt Assistant and the calling application. The <em>msg</em> provides an
explanation of the error.

<h3 class=fn>bool <a name="isOpen"></a>QAssistantClient::isOpen () const
</h3><p>Returns TRUE if Qt Assistant is open; otherwise returns FALSE.
See the <a href="qassistantclient.html#open-prop">"open"</a> property for details.
<h3 class=fn>void <a name="openAssistant"></a>QAssistantClient::openAssistant ()<tt> [virtual slot]</tt>
</h3>
This function opens Qt Assistant and sets up the client-server
communiction between the application and Qt Assistant. If it is
already open, this function does nothing. If an error occurs,
<a href="#error">error</a>() is emitted.
<p> <p>See also <a href="#assistantOpened">assistantOpened</a>().

<h3 class=fn>void <a name="setArguments"></a>QAssistantClient::setArguments ( const&nbsp;<a href="qstringlist.html">QStringList</a>&nbsp;&amp;&nbsp;args )
</h3>
Sets the command line arguments used when Qt Assistant is
started to <em>args</em>.

<h3 class=fn>void <a name="showPage"></a>QAssistantClient::showPage ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;page )<tt> [virtual slot]</tt>
</h3>
Call this function to make Qt Assistant show a particular <em>page</em>.
The <em>page</em> is a filename (e.g. <tt>myhelpfile.html</tt>). See "Adding
Documentation to Qt Assistant" in the <a href="assistant.html">Qt
    Assistant manual</a> for further information.
<p> If Qt Assistant hasn't been <a href="#openAssistant">opened</a>
yet, this function will do nothing. You can use <a href="#isOpen">isOpen</a>() to
determine whether Qt Assistant is up and running, or you can
connect to the asssistantOpened() signal.
<p> <p>See also <a href="#open-prop">open</a> and <a href="#assistantOpened">assistantOpened</a>().

<p>Example: <a href="helpsystem-example.html#x2686">helpsystem/mainwindow.cpp</a>.
<hr><h2>Property Documentation</h2>
<h3 class=fn>bool <a name="open-prop"></a>open</h3>
<p>This property holds whether Qt Assistant is open.
<p>
<p>Get this property's value with <a href="#isOpen">isOpen</a>().
<!-- eof -->
<hr><p>
This file is part of the <a href="index.html">Qt toolkit</a>.
Copyright &copy; 1995-2007
<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
<table width=100% cellspacing=0 border=0><tr>
<td>Copyright &copy; 2007
<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
<td align=right><div align=right>Qt 3.3.8</div>
</table></div></address></body>
</html>