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
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QAssistantClient Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">  </td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QAssistantClient Class Reference<br /><sup><sup>[<a href="qtassistant.html">QtAssistant</a> module]</sup></sup></h1><p>The QAssistantClient class provides a means of using Qt Assistant as an application's help tool. <a href="#details">More...</a></p>
<p>Inherits <a href="qobject.html">QObject</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qassistantclient.html#QAssistantClient">__init__</a></b> (<i>self</i>, QString <i>path</i>, QObject <i>parent</i> = None)</li><li><div class="fn" /><b><a href="qassistantclient.html#closeAssistant">closeAssistant</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qassistantclient.html#isOpen">isOpen</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qassistantclient.html#openAssistant">openAssistant</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qassistantclient.html#setArguments">setArguments</a></b> (<i>self</i>, QStringList <i>args</i>)</li><li><div class="fn" /><b><a href="qassistantclient.html#showPage">showPage</a></b> (<i>self</i>, QString <i>page</i>)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qassistantclient.html#assistantClosed">assistantClosed</a></b> ()</li><li><div class="fn" />void <b><a href="qassistantclient.html#assistantOpened">assistantOpened</a></b> ()</li><li><div class="fn" />void <b><a href="qassistantclient.html#error">error</a></b> (const QString&)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QAssistantClient class provides a means of using Qt Assistant as an application's help tool.</p>
<p>In order to make Qt Assistant act as a customized help tool for your application, you must provide your application with a QAssistantClient object in addition to a <a href="assistant-manual.html#profiles">Qt Assistant Document Profile</a> (<tt>.adp</tt> file) and the associated documentation.</p>
<p>Note that the QAssistantClient class is not included in the Qt library. To use it you must add the following line to your pro file:</p>
<pre>
CONFIG += assistant
</pre>
<p>A QAssistantClient instance can open or close Qt Assistant whenever it is required.</p>
<p>Once you have created a QAssistantClient instance, specifying the path to the Qt Assistant executable, using Qt Assistant is simple: You can either call the <a href="qassistantclient.html#openAssistant">openAssistant</a>() slot to show the defined start page of the documentation, or you can call the <a href="qassistantclient.html#showPage">showPage</a>() slot to show a particular help page. When you call <a href="qassistantclient.html#openAssistant">openAssistant</a>() and <a href="qassistantclient.html#showPage">showPage</a>(), Qt Assistant will be launched if it isn't already running. When Qt Assistant is running, the <a href="qassistantclient.html#open-prop">isOpen</a>() function returns true.</p>
<p>When calling <a href="qassistantclient.html#showPage">showPage</a>() the Qt Assistant instance will also be brought to the foreground if its hidden. The <a href="qassistantclient.html#showPage">showPage</a>() slot can be called multiple times, while calling <a href="qassistantclient.html#openAssistant">openAssistant</a>() several times without closing the application in between, will have no effect.</p>
<p>You can close Qt Assistant at any time using the <a href="qassistantclient.html#closeAssistant">closeAssistant</a>() slot. When you call <a href="qassistantclient.html#openAssistant">openAssistant</a>(), or you call <a href="qassistantclient.html#showPage">showPage</a>() without a previous call to <a href="qassistantclient.html#openAssistant">openAssistant</a>(), the <a href="qassistantclient.html#assistantOpened">assistantOpened</a>() signal is emitted. Similarly when <a href="qassistantclient.html#closeAssistant">closeAssistant</a>() is called, <a href="qassistantclient.html#assistantClosed">assistantClosed</a>() is emitted. In either case, if an error occurs, <a href="qassistantclient.html#error">error</a>() is emitted.</p>
<p>One QAssistantClient instance interacts with one Qt Assistant instance, so every time you call <a href="qassistantclient.html#openAssistant">openAssistant</a>(), <a href="qassistantclient.html#showPage">showPage</a>() or <a href="qassistantclient.html#closeAssistant">closeAssistant</a>() they are applied to the particular Qt Assistant instance associated with the QAssistantClient.</p>
<p>Qt Assistant's documentation set can be altered using the command line arguments that are passed to the application when it is launched. When started without any options, Qt Assistant displays a default set of documentation. When Qt is installed, the default documentation set in Qt Assistant contains the Qt reference documentation as well as the tools that come with Qt, such as <i>Qt Designer</i> and <tt>qmake</tt>.</p>
<p>Use the <a href="qassistantclient.html#setArguments">setArguments</a>() function to specify the command line arguments. You can add or remove documentation from Qt Assistant by adding and removing the relevant content files: The command line arguments are <tt>-addContentFile file.dcf</tt> and <tt>-removeContentFile file.dcf</tt> respectively. You can make Qt Assistant run customized documentation sets that are separate from the Qt documentation, by specifying a profile: <tt>-profile myapplication.adp</tt>. The profile format can also be used to alter several of Qt Assistant's properties such as its title and startpage.</p>
<p>The Documentation Content File (<tt>.dcf</tt>) and Qt Assistant Documentation Profile (<tt>.adp</tt>) formats are documented in the <a href="assistant-manual.html">Qt Assistant Manual</a>.</p>
<p>See also <a href="assistant-manual.html">Qt Assistant Manual</a>.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QAssistantClient" />QAssistantClient.__init__ (<i>self</i>, <a href="qstring.html">QString</a> <i>path</i>, <a href="qobject.html">QObject</a> <i>parent</i> = None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs an assistant client with the given <i>parent</i>. The <i>path</i> specifies the path to the Qt Assistant executable. If <i>path</i> is an empty string the system path (<tt>%PATH%</tt> or <tt>$PATH</tt>) is used.</p>
<h3 class="fn"><a name="closeAssistant" />QAssistantClient.closeAssistant (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void closeAssistant()</tt>.</p><p>Closes the Qt Assistant instance.</p>
<p>See also <a href="qassistantclient.html#openAssistant">openAssistant</a>() and <a href="qassistantclient.html#assistantClosed">assistantClosed</a>().</p>
<h3 class="fn"><a name="isOpen" />bool QAssistantClient.isOpen (<i>self</i>)</h3><h3 class="fn"><a name="openAssistant" />QAssistantClient.openAssistant (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void openAssistant()</tt>.</p><p>Opens Qt Assistant, i.e. sets up the client-server communication between the application and Qt Assistant, and shows the start page specified by the current <a href="assistant-manual.html#profiles">Qt Assistant Document Profile</a>. If there is no specfied profile, and Qt is installed, the default start page is the Qt Reference Documentation's index page.</p>
<p>If the connection is already established, this function does nothing. Use the <a href="qassistantclient.html#showPage">showPage</a>() function to show another page. If an error occurs, the <a href="qassistantclient.html#error">error</a>() signal is emitted.</p>
<p>See also <a href="qassistantclient.html#showPage">showPage</a>() and <a href="qassistantclient.html#assistantOpened">assistantOpened</a>().</p>
<h3 class="fn"><a name="setArguments" />QAssistantClient.setArguments (<i>self</i>, <a href="qstringlist.html">QStringList</a> <i>args</i>)</h3><p>Sets the command line <i>arguments</i> that are passed to Qt Assistant when it is launched.</p>
<p>The command line arguments can be used to alter Qt Assistant's documentation set. When started without any options, Qt Assistant displays a default set of documentation. When Qt is installed, the default documentation set in Qt Assistant contains the Qt reference documentation as well as the tools that come with Qt, such as Qt Designer and qmake.</p>
<p>See also <a href="assistant-manual.html#customizing-qt-assistant">Customizing Qt Assistant</a>.</p>
<h3 class="fn"><a name="showPage" />QAssistantClient.showPage (<i>self</i>, <a href="qstring.html">QString</a> <i>page</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void showPage(const QString&)</tt>.</p><p>Brings Qt Assistant to the forground showing the given <i>page</i>. The <i>page</i> parameter is a filename (e.g. <tt>myhelpfile.html</tt>).</p>
<p>If Qt Assistant hasn't been opened yet, this function will call the <a href="qassistantclient.html#openAssistant">openAssistant</a>() slot with the specified page as the start page.</p>
<p>See also <a href="qassistantclient.html#openAssistant">openAssistant</a>().</p>
<hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="assistantClosed" />void assistantClosed ()</h3><p>This signal is emitted when the connection to Qt Assistant is closed. This happens when the user exits Qt Assistant, if an error in the server or client occurs, or if <a href="qassistantclient.html#closeAssistant">closeAssistant</a>() is called.</p>
<p>See also <a href="qassistantclient.html#closeAssistant">closeAssistant</a>().</p>
<h3 class="fn"><a name="assistantOpened" />void assistantOpened ()</h3><p>This signal is emitted when Qt Assistant is opened and the client-server communication is set up.</p>
<p>See also <a href="qassistantclient.html#openAssistant">openAssistant</a>() and <a href="qassistantclient.html#showPage">showPage</a>().</p>
<h3 class="fn"><a name="error" />void error (const QString&)</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 <i>message</i> provides an explanation of the error.</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td width="25%">PyQt 4.0.1 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.trolltech.com">Trolltech AS</a> 2006</td><td align="right" width="25%">Qt 4.1.4</td></tr></table></div></address></body></html>
|