Sophie

Sophie

distrib > Mageia > 6 > x86_64 > media > core-updates > by-pkgid > 749fcc421771b410525f39bd88a5732d > files > 426

qttools5-doc-5.9.4-1.mga6.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qhelpsearchengine.cpp -->
  <title>QHelpSearchEngine Class | Qt Help 5.9</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.9</td><td ><a href="qthelp-index.html">Qt Help</a></td><td ><a href="qthelp-module.html">C++ Classes</a></td><td >QHelpSearchEngine</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QHelpSearchEngine Class</h1>
<!-- $$$QHelpSearchEngine-brief -->
<p>The <a href="qhelpsearchengine.html">QHelpSearchEngine</a> class provides access to widgets reusable to integrate fulltext search as well as to index and search documentation. <a href="#details">More...</a></p>
<!-- @@@QHelpSearchEngine -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QHelpSearchEngine&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += help</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign">  Qt 4.4</td></tr></table></div><ul>
<li><a href="qhelpsearchengine-members.html">List of all members, including inherited members</a></li>
<li><a href="qhelpsearchengine-obsolete.html">Obsolete members</a></li>
</ul>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qhelpsearchengine.html#QHelpSearchEngine">QHelpSearchEngine</a></b>(QHelpEngineCore *<i>helpEngine</i>, QObject *<i>parent</i> = Q_NULLPTR)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qhelpsearchengine.html#dtor.QHelpSearchEngine">~QHelpSearchEngine</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QHelpSearchQueryWidget *</td><td class="memItemRight bottomAlign"><b><a href="qhelpsearchengine.html#queryWidget">queryWidget</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QHelpSearchResultWidget *</td><td class="memItemRight bottomAlign"><b><a href="qhelpsearchengine.html#resultWidget">resultWidget</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qhelpsearchengine.html#searchInput">searchInput</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qhelpsearchengine.html#searchResultCount">searchResultCount</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVector&lt;QHelpSearchResult&gt; </td><td class="memItemRight bottomAlign"><b><a href="qhelpsearchengine.html#searchResults">searchResults</a></b>(int <i>start</i>, int <i>end</i>) const</td></tr>
</table></div>
<a name="public-slots"></a>
<h2 id="public-slots">Public Slots</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qhelpsearchengine.html#cancelIndexing">cancelIndexing</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qhelpsearchengine.html#cancelSearching">cancelSearching</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qhelpsearchengine.html#reindexDocumentation">reindexDocumentation</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qhelpsearchengine.html#search">search</a></b>(const QString &amp;<i>searchInput</i>)</td></tr>
</table></div>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qhelpsearchengine.html#indexingFinished">indexingFinished</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qhelpsearchengine.html#indexingStarted">indexingStarted</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qhelpsearchengine.html#searchingFinished">searchingFinished</a></b>(int <i>searchResultCount</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qhelpsearchengine.html#searchingStarted">searchingStarted</a></b>()</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QHelpSearchEngine-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qhelpsearchengine.html">QHelpSearchEngine</a> 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>When the indexing process has finished, the search engine can be used to search through the index for a given term using the <a href="qhelpsearchengine.html#search">search</a>() function. When the search input is passed to the search engine, the <a href="qhelpsearchengine.html#searchingStarted">searchingStarted</a>() signal is emitted. When the search finishes, 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, <a href="qhelpsearchengine.html#searchingFinished">searchingFinished</a>() is called with the search result count to fetch the search results from the search engine. Calling the <a href="qhelpsearchengine.html#searchResults">searchResults</a>() function with a range returns a list of <a href="qhelpsearchresult.html">QHelpSearchResult</a> objects within the range. The results consist of the document title and URL, as well as a snippet from the document that contains the best match for the search input.</p>
<p>To display the given search results 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>
</div>
<!-- @@@QHelpSearchEngine -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QHelpSearchEngine[overload1]$$$QHelpSearchEngineQHelpEngineCore*QObject* -->
<h3 class="fn" id="QHelpSearchEngine"><a name="QHelpSearchEngine"></a>QHelpSearchEngine::<span class="name">QHelpSearchEngine</span>(<span class="type"><a href="qhelpenginecore.html">QHelpEngineCore</a></span> *<i>helpEngine</i>, <span class="type">QObject</span> *<i>parent</i> = Q_NULLPTR)</h3>
<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>
<!-- @@@QHelpSearchEngine -->
<!-- $$$~QHelpSearchEngine[overload1]$$$~QHelpSearchEngine -->
<h3 class="fn" id="dtor.QHelpSearchEngine"><a name="dtor.QHelpSearchEngine"></a>QHelpSearchEngine::<span class="name">~QHelpSearchEngine</span>()</h3>
<p>Destructs the search engine.</p>
<!-- @@@~QHelpSearchEngine -->
<!-- $$$cancelIndexing[overload1]$$$cancelIndexing -->
<h3 class="fn" id="cancelIndexing"><a name="cancelIndexing"></a><code>[slot] </code><span class="type">void</span> QHelpSearchEngine::<span class="name">cancelIndexing</span>()</h3>
<p>Stops the indexing process.</p>
<!-- @@@cancelIndexing -->
<!-- $$$cancelSearching[overload1]$$$cancelSearching -->
<h3 class="fn" id="cancelSearching"><a name="cancelSearching"></a><code>[slot] </code><span class="type">void</span> QHelpSearchEngine::<span class="name">cancelSearching</span>()</h3>
<p>Stops the search process.</p>
<!-- @@@cancelSearching -->
<!-- $$$indexingFinished[overload1]$$$indexingFinished -->
<h3 class="fn" id="indexingFinished"><a name="indexingFinished"></a><code>[signal] </code><span class="type">void</span> QHelpSearchEngine::<span class="name">indexingFinished</span>()</h3>
<p>This signal is emitted when the indexing process is complete.</p>
<!-- @@@indexingFinished -->
<!-- $$$indexingStarted[overload1]$$$indexingStarted -->
<h3 class="fn" id="indexingStarted"><a name="indexingStarted"></a><code>[signal] </code><span class="type">void</span> QHelpSearchEngine::<span class="name">indexingStarted</span>()</h3>
<p>This signal is emitted when indexing process is started.</p>
<!-- @@@indexingStarted -->
<!-- $$$queryWidget[overload1]$$$queryWidget -->
<h3 class="fn" id="queryWidget"><a name="queryWidget"></a><span class="type"><a href="qhelpsearchquerywidget.html">QHelpSearchQueryWidget</a></span> *QHelpSearchEngine::<span class="name">queryWidget</span>()</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>
<!-- @@@queryWidget -->
<!-- $$$reindexDocumentation[overload1]$$$reindexDocumentation -->
<h3 class="fn" id="reindexDocumentation"><a name="reindexDocumentation"></a><code>[slot] </code><span class="type">void</span> QHelpSearchEngine::<span class="name">reindexDocumentation</span>()</h3>
<p>Forces the search engine to reindex all documentation files.</p>
<!-- @@@reindexDocumentation -->
<!-- $$$resultWidget[overload1]$$$resultWidget -->
<h3 class="fn" id="resultWidget"><a name="resultWidget"></a><span class="type"><a href="qhelpsearchresultwidget.html">QHelpSearchResultWidget</a></span> *QHelpSearchEngine::<span class="name">resultWidget</span>()</h3>
<p>Returns a widget that can hold and display the search results.</p>
<!-- @@@resultWidget -->
<!-- $$$search[overload1]$$$searchconstQString& -->
<h3 class="fn" id="search"><a name="search"></a><code>[slot] </code><span class="type">void</span> QHelpSearchEngine::<span class="name">search</span>(const <span class="type">QString</span> &amp;<i>searchInput</i>)</h3>
<p>Starts the search process using the given search phrase <i>searchInput</i>.</p>
<p>The phrase may consist of several words. By default, the search engine returns the list of documents that contain all the specified words. The phrase may contain any combination of the logical operators AND, OR, and NOT. The operator must be written in all capital letters, otherwise it will be considered a part of the search phrase.</p>
<p>If double quotation marks are used to group the words, the search engine will search for an exact match of the quoted phrase.</p>
<p>For more information about the text query syntax, see <a href="https://sqlite.org/fts5.html#full_text_query_syntax">SQLite FTS5 Extension</a>.</p>
<p>This function was introduced in  Qt 5.9.</p>
<!-- @@@search -->
<!-- $$$searchInput[overload1]$$$searchInput -->
<h3 class="fn" id="searchInput"><a name="searchInput"></a><span class="type">QString</span> QHelpSearchEngine::<span class="name">searchInput</span>() const</h3>
<p>Returns the phrase that was last searched for.</p>
<p>This function was introduced in  Qt 5.9.</p>
<!-- @@@searchInput -->
<!-- $$$searchResultCount[overload1]$$$searchResultCount -->
<h3 class="fn" id="searchResultCount"><a name="searchResultCount"></a><span class="type">int</span> QHelpSearchEngine::<span class="name">searchResultCount</span>() const</h3>
<p>Returns the number of results the search engine found.</p>
<p>This function was introduced in  Qt 5.9.</p>
<!-- @@@searchResultCount -->
<!-- $$$searchResults[overload1]$$$searchResultsintint -->
<h3 class="fn" id="searchResults"><a name="searchResults"></a><span class="type">QVector</span>&lt;<span class="type"><a href="qhelpsearchresult.html">QHelpSearchResult</a></span>&gt; QHelpSearchEngine::<span class="name">searchResults</span>(<span class="type">int</span> <i>start</i>, <span class="type">int</span> <i>end</i>) const</h3>
<p>Returns a list of search results within the range from the index specified by <i>start</i> to the index specified by <i>end</i>.</p>
<p>This function was introduced in  Qt 5.9.</p>
<!-- @@@searchResults -->
<!-- $$$searchingFinished[overload1]$$$searchingFinishedint -->
<h3 class="fn" id="searchingFinished"><a name="searchingFinished"></a><code>[signal] </code><span class="type">void</span> QHelpSearchEngine::<span class="name">searchingFinished</span>(<span class="type">int</span> <i>searchResultCount</i>)</h3>
<p>This signal is emitted when the search process is complete. The search result count is stored in <i>searchResultCount</i>.</p>
<!-- @@@searchingFinished -->
<!-- $$$searchingStarted[overload1]$$$searchingStarted -->
<h3 class="fn" id="searchingStarted"><a name="searchingStarted"></a><code>[signal] </code><span class="type">void</span> QHelpSearchEngine::<span class="name">searchingStarted</span>()</h3>
<p>This signal is emitted when the search process is started.</p>
<!-- @@@searchingStarted -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2017 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>