Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > 28b9e36e96ce34b2567ae5b47a27b2c5 > files > 777

python-qt4-doc-4.10.3-3.mga4.noarch.rpm

<?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>QHelpSearchEngine 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">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QHelpSearchEngine Class Reference<br /><sup><sup>[<a href="qthelp.html">QtHelp</a> module]</sup></sup></h1><p>The QHelpSearchEngine class provides access to widgets reusable
to integrate fulltext search as well as to index and search
documentation. <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="qhelpsearchengine.html#QHelpSearchEngine">__init__</a></b> (<i>self</i>, QHelpEngineCore&#160;<i>helpEngine</i>, QObject&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qhelpsearchengine.html#cancelIndexing">cancelIndexing</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qhelpsearchengine.html#cancelSearching">cancelSearching</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qhelpsearchengine.html#hitCount">hitCount</a></b> (<i>self</i>)</li><li><div class="fn" />list-of-tuple-of-QString-QString <b><a href="qhelpsearchengine.html#hits">hits</a></b> (<i>self</i>, int&#160;<i>start</i>, int&#160;<i>end</i>)</li><li><div class="fn" />int <b><a href="qhelpsearchengine.html#hitsCount">hitsCount</a></b> (<i>self</i>)</li><li><div class="fn" />list-of-QHelpSearchQuery <b><a href="qhelpsearchengine.html#query">query</a></b> (<i>self</i>)</li><li><div class="fn" />QHelpSearchQueryWidget <b><a href="qhelpsearchengine.html#queryWidget">queryWidget</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qhelpsearchengine.html#reindexDocumentation">reindexDocumentation</a></b> (<i>self</i>)</li><li><div class="fn" />QHelpSearchResultWidget <b><a href="qhelpsearchengine.html#resultWidget">resultWidget</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qhelpsearchengine.html#search">search</a></b> (<i>self</i>, list-of-QHelpSearchQuery&#160;<i>queryList</i>)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qhelpsearchengine.html#indexingFinished">indexingFinished</a></b> ()</li><li><div class="fn" />void <b><a href="qhelpsearchengine.html#indexingStarted">indexingStarted</a></b> ()</li><li><div class="fn" />void <b><a href="qhelpsearchengine.html#searchingFinished">searchingFinished</a></b> (int)</li><li><div class="fn" />void <b><a href="qhelpsearchengine.html#searchingStarted">searchingStarted</a></b> ()</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QHelpSearchEngine class provides access to widgets reusable
to integrate fulltext search as well as to index and search
documentation.</p>
<p>Before the search engine can be used, one has to instantiate at
least a <a href="qhelpenginecore.html">QHelpEngineCore</a> object
that needs to be passed to the search engines constructor. This is
required as the search engine needs to be connected to the help
engines setupFinished() signal to know when it can start to index
documentation.</p>
<p>After starting the indexing process the signal <a href="qhelpsearchengine.html#indexingStarted">indexingStarted</a>() is
emitted and on the end of the indexing process the <a href="qhelpsearchengine.html#indexingFinished">indexingFinished</a>() is
emitted. To stop the indexing one can call <a href="qhelpsearchengine.html#cancelIndexing">cancelIndexing</a>().</p>
<p>While the indexing process has finished, the search engine can
now be used to search thru its index for a given term. To do this
one may use the possibility of creating the <a href="qhelpsearchquery.html">QHelpSearchQuery</a> list by self or reuse
the <a href="qhelpsearchquerywidget.html">QHelpSearchQueryWidget</a> which has
the inbuild functionality to set up a proper search queries list
that get's passed to the search engines <a href="qhelpsearchengine.html#search">search</a>() function.</p>
<p>After the list of queries have been passed to the search engine,
the signal <a href="qhelpsearchengine.html#searchingStarted">searchingStarted</a>() is
emitted and after the search has finished the <a href="qhelpsearchengine.html#searchingFinished">searchingFinished</a>()
signal is emitted. The search process can be stopped by calling
<a href="qhelpsearchengine.html#cancelSearching">cancelSearching</a>().</p>
<p>If the search succeeds, the <a href="qhelpsearchengine.html#searchingFinished">searchingFinished</a>()
will be called with the search hits count, which can be reused to
fetch the search hits from the search engine. Calling the <a href="qhelpsearchengine.html#hits">hits</a>() function with the range of
hits you would like to get will return a list of the requested
SearchHits. They basically constist at the moment of a pair of
strings where the values of that pair are the documentation file
path and the page title.</p>
<p>To display the given hits use the <a href="qhelpsearchresultwidget.html">QHelpSearchResultWidget</a> or build
up your own one if you need more advanced functionality. Note that
the <a href="qhelpsearchresultwidget.html">QHelpSearchResultWidget</a> can not
be instantiated directly, you must retrieve the widget from the
search engine in use as all connections will be established for you
by the widget itself.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QHelpSearchEngine" />QHelpSearchEngine.__init__ (<i>self</i>, <a href="qhelpenginecore.html">QHelpEngineCore</a>&#160;<i>helpEngine</i>, <a href="qobject.html">QObject</a>&#160;<i>parent</i>&#160;=&#160;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 a new search engine with the given <i>parent</i>. The
search engine uses the given <i>helpEngine</i> to access the
documentation that needs to be indexed. The <a href="qhelpengine.html">QHelpEngine</a>'s setupFinished() signal is
automatically connected to the <a href="qhelpsearchengine.html">QHelpSearchEngine</a>'s indexing function,
so that new documentation will be indexed after the signal is
emitted.</p>


<h3 class="fn"><a name="cancelIndexing" />QHelpSearchEngine.cancelIndexing (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void cancelIndexing()</tt>.</p><p>Stops the indexing process.</p>


<h3 class="fn"><a name="cancelSearching" />QHelpSearchEngine.cancelSearching (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void cancelSearching()</tt>.</p><p>Stops the search process.</p>


<h3 class="fn"><a name="hitCount" />int QHelpSearchEngine.hitCount (<i>self</i>)</h3><p>Returns the amount of hits the search engine found.</p>
<p>This function was introduced in Qt 4.6.</p>


<h3 class="fn"><a name="hits" />list-of-tuple-of-QString-QString QHelpSearchEngine.hits (<i>self</i>, int&#160;<i>start</i>, int&#160;<i>end</i>)</h3><p>Returns a list of search hits within the range of <i>start</i>
<i>end</i>.</p>


<h3 class="fn"><a name="hitsCount" />int QHelpSearchEngine.hitsCount (<i>self</i>)</h3><h3 class="fn"><a name="query" />list-of-QHelpSearchQuery QHelpSearchEngine.query (<i>self</i>)</h3><p>Returns the list of queries last searched for.</p>
<p>This function was introduced in Qt 4.5.</p>


<h3 class="fn"><a name="queryWidget" /><a href="qhelpsearchquerywidget.html">QHelpSearchQueryWidget</a> QHelpSearchEngine.queryWidget (<i>self</i>)</h3><p>Returns a widget to use as input widget. Depending on your
search engine configuration you will get a different widget with
more or less subwidgets.</p>


<h3 class="fn"><a name="reindexDocumentation" />QHelpSearchEngine.reindexDocumentation (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void reindexDocumentation()</tt>.</p><p>Forces the search engine to reindex all documentation files.</p>


<h3 class="fn"><a name="resultWidget" /><a href="qhelpsearchresultwidget.html">QHelpSearchResultWidget</a> QHelpSearchEngine.resultWidget (<i>self</i>)</h3><p>Returns a widget that can hold and display the search
results.</p>


<h3 class="fn"><a name="search" />QHelpSearchEngine.search (<i>self</i>, list-of-QHelpSearchQuery&#160;<i>queryList</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void search(const QList&lt;QHelpSearchQuery&gt;&amp;)</tt>.</p><p>Starts the search process using the given list of queries
<i>queryList</i> build by the search field name and the values to
search for.</p>


<hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="indexingFinished" />void indexingFinished ()</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the indexing process is
complete.</p>


<h3 class="fn"><a name="indexingStarted" />void indexingStarted ()</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when indexing process is started.</p>


<h3 class="fn"><a name="searchingFinished" />void searchingFinished (int)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the search process is complete. The
hit count is stored in <i>hits</i>.</p>


<h3 class="fn"><a name="searchingStarted" />void searchingStarted ()</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the search process is started.</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.10.3 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.5</td></tr></table></div></address></body></html>