Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > 1dd17e0d683ef79b4bb6872bbf359d7f > files > 5329

qt4-doc-4.8.7-26.2.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qfuture.cpp -->
  <title>Qt 4.8: QFuture Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtcore.html">QtCore</a></li>
<li>QFuture</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QFuture Class Reference</h1>
<!-- $$$QFuture-brief -->
<p>The QFuture class represents the result of an asynchronous computation. <a href="#details">More...</a></p>
<!-- @@@QFuture -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QFuture&gt;</span></pre><p><b>Note:</b> All functions in this class are <a href="threads-reentrancy.html#thread-safe">thread-safe</a>, except for <a href="qfuture-const-iterator.html">const_iterator</a>, which is only <a href="threads-reentrancy.html#reentrant">reentrant</a>.</p>
<p>This class was introduced in Qt 4.4.</p>
<ul>
<li><a href="qfuture-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> class </td><td class="memItemRight bottomAlign"><b><a href="qfuture-const-iterator.html">const_iterator</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qfuture.html#ConstIterator-typedef">ConstIterator</a></b></td></tr>
</table>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qfuture.html#QFuture">QFuture</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qfuture.html#QFuture-3">QFuture</a></b> ( const QFuture &amp; <i>other</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qfuture.html#dtor.QFuture">~QFuture</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const_iterator </td><td class="memItemRight bottomAlign"><b><a href="qfuture.html#begin">begin</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfuture.html#cancel">cancel</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const_iterator </td><td class="memItemRight bottomAlign"><b><a href="qfuture.html#constBegin">constBegin</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const_iterator </td><td class="memItemRight bottomAlign"><b><a href="qfuture.html#constEnd">constEnd</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const_iterator </td><td class="memItemRight bottomAlign"><b><a href="qfuture.html#end">end</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qfuture.html#isCanceled">isCanceled</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qfuture.html#isFinished">isFinished</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qfuture.html#isPaused">isPaused</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qfuture.html#isResultReadyAt">isResultReadyAt</a></b> ( int <i>index</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qfuture.html#isRunning">isRunning</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qfuture.html#isStarted">isStarted</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfuture.html#pause">pause</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qfuture.html#progressMaximum">progressMaximum</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qfuture.html#progressMinimum">progressMinimum</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qfuture.html#progressText">progressText</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qfuture.html#progressValue">progressValue</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> T </td><td class="memItemRight bottomAlign"><b><a href="qfuture.html#result">result</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> T </td><td class="memItemRight bottomAlign"><b><a href="qfuture.html#resultAt">resultAt</a></b> ( int <i>index</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qfuture.html#resultCount">resultCount</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;T&gt; </td><td class="memItemRight bottomAlign"><b><a href="qfuture.html#results">results</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfuture.html#resume">resume</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfuture.html#setPaused">setPaused</a></b> ( bool <i>paused</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfuture.html#togglePaused">togglePaused</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfuture.html#waitForFinished">waitForFinished</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qfuture.html#operator-T">operator T</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qfuture.html#operator-not-eq">operator!=</a></b> ( const QFuture &amp; <i>other</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QFuture &amp; </td><td class="memItemRight bottomAlign"><b><a href="qfuture.html#operator-eq">operator=</a></b> ( const QFuture &amp; <i>other</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qfuture.html#operator-eq-eq">operator==</a></b> ( const QFuture &amp; <i>other</i> ) const</td></tr>
</table>
<a name="details"></a>
<!-- $$$QFuture-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QFuture class represents the result of an asynchronous computation.</p>
<p>To start a computation, use one of the APIs in the <a href="threads-qtconcurrent.html">Qt Concurrent</a> framework.</p>
<p>QFuture allows threads to be synchronized against one or more results which will be ready at a later point in time. The result can be of any type that has a default constructor and a copy constructor. If a result is not available at the time of calling the <a href="qfuture.html#result">result</a>(), <a href="qfuture.html#resultAt">resultAt</a>(), or <a href="qfuture.html#results">results</a>() functions, QFuture will wait until the result becomes available. You can use the <a href="qfuture.html#isResultReadyAt">isResultReadyAt</a>() function to determine if a result is ready or not. For QFuture objects that report more than one result, the <a href="qfuture.html#resultCount">resultCount</a>() function returns the number of continuous results. This means that it is always safe to iterate through the results from 0 to <a href="qfuture.html#resultCount">resultCount</a>().</p>
<p>QFuture provides a <a href="containers.html#java-style-iterators">Java-style iterator</a> (<a href="qfutureiterator.html">QFutureIterator</a>) and an <a href="containers.html#stl-style-iterators">STL-style iterator</a> (<a href="qfuture-const-iterator.html">QFuture::const_iterator</a>). Using these iterators is another way to access results in the future.</p>
<p>QFuture also offers ways to interact with a runnning computation. For instance, the computation can be canceled with the <a href="qfuture.html#cancel">cancel</a>() function. To pause the computation, use the <a href="qfuture.html#setPaused">setPaused</a>() function or one of the <a href="qfuture.html#pause">pause</a>(), <a href="qfuture.html#resume">resume</a>(), or <a href="qfuture.html#togglePaused">togglePaused</a>() convenience functions. Be aware that not all asynchronous computations can be canceled or paused. For example, the future returned by <a href="qtconcurrentrun.html#run">QtConcurrent::run</a>() cannot be canceled; but the future returned by <a href="qtconcurrentmap.html#mappedReduced">QtConcurrent::mappedReduced</a>() can.</p>
<p>Progress information is provided by the <a href="qfuture.html#progressValue">progressValue</a>(), <a href="qfuture.html#progressMinimum">progressMinimum</a>(), <a href="qfuture.html#progressMaximum">progressMaximum</a>(), and <a href="qfuture.html#progressText">progressText</a>() functions. The <a href="qfuture.html#waitForFinished">waitForFinished</a>() function causes the calling thread to block and wait for the computation to finish, ensuring that all results are available.</p>
<p>The state of the computation represented by a QFuture can be queried using the <a href="qfuture.html#isCanceled">isCanceled</a>(), <a href="qfuture.html#isStarted">isStarted</a>(), <a href="qfuture.html#isFinished">isFinished</a>(), <a href="qfuture.html#isRunning">isRunning</a>(), or <a href="qfuture.html#isPaused">isPaused</a>() functions.</p>
<p>QFuture is a lightweight reference counted class that can be passed by value.</p>
<p>QFuture&lt;void&gt; is specialized to not contain any of the result fetching functions. Any QFuture&lt;T&gt; can be assigned or copied into a QFuture&lt;void&gt; as well. This is useful if only status or progress information is needed - not the actual result data.</p>
<p>To interact with running tasks using signals and slots, use <a href="qfuturewatcher.html">QFutureWatcher</a>.</p>
</div>
<p><b>See also </b><a href="qfuturewatcher.html">QFutureWatcher</a> and <a href="threads-qtconcurrent.html">Qt Concurrent</a>.</p>
<!-- @@@QFuture -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$ConstIterator -->
<h3 class="fn"><a name="ConstIterator-typedef"></a>typedef QFuture::<span class="name">ConstIterator</span></h3>
<p>Qt-style synonym for <a href="qfuture-const-iterator.html">QFuture::const_iterator</a>.</p>
<!-- @@@ConstIterator -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QFuture[overload1]$$$QFuture -->
<h3 class="fn"><a name="QFuture"></a>QFuture::<span class="name">QFuture</span> ()</h3>
<p>Constructs an empty future.</p>
<!-- @@@QFuture -->
<!-- $$$QFuture$$$QFutureconstQFuture& -->
<h3 class="fn"><a name="QFuture-3"></a>QFuture::<span class="name">QFuture</span> ( const <span class="type">QFuture</span> &amp; <i>other</i> )</h3>
<p>Constructs a copy of <i>other</i>.</p>
<p><b>See also </b><a href="qfuture.html#operator-eq">operator=</a>().</p>
<!-- @@@QFuture -->
<!-- $$$~QFuture[overload1]$$$~QFuture -->
<h3 class="fn"><a name="dtor.QFuture"></a>QFuture::<span class="name">~QFuture</span> ()</h3>
<p>Destroys the future.</p>
<p>Note that this neither waits nor cancels the asynchronous computation. Use <a href="qfuture.html#waitForFinished">waitForFinished</a>() or <a href="qfuturesynchronizer.html">QFutureSynchronizer</a> when you need to ensure that the computation is completed before the future is destroyed.</p>
<!-- @@@~QFuture -->
<!-- $$$begin[overload1]$$$begin -->
<h3 class="fn"><a name="begin"></a><span class="type"><a href="qfuture-const-iterator.html">const_iterator</a></span> QFuture::<span class="name">begin</span> () const</h3>
<p>Returns a const <a href="containers.html#stl-style-iterators">STL-style iterator</a> pointing to the first result in the future.</p>
<p><b>See also </b><a href="qfuture.html#constBegin">constBegin</a>() and <a href="qfuture.html#end">end</a>().</p>
<!-- @@@begin -->
<!-- $$$cancel[overload1]$$$cancel -->
<h3 class="fn"><a name="cancel"></a><span class="type">void</span> QFuture::<span class="name">cancel</span> ()</h3>
<p>Cancels the asynchronous computation represented by this future. Note that the cancelation is asynchronous. Use <a href="qfuture.html#waitForFinished">waitForFinished</a>() after calling cancel() when you need synchronous cancelation.</p>
<p>Results currently available may still be accessed on a canceled future, but new results will <i>not</i> become available after calling this function. Any <a href="qfuturewatcher.html">QFutureWatcher</a> object that is watching this future will not deliver progress and result ready signals on a canceled future.</p>
<p>Be aware that not all asynchronous computations can be canceled. For example, the future returned by <a href="qtconcurrentrun.html#run">QtConcurrent::run</a>() cannot be canceled; but the future returned by <a href="qtconcurrentmap.html#mappedReduced">QtConcurrent::mappedReduced</a>() can.</p>
<!-- @@@cancel -->
<!-- $$$constBegin[overload1]$$$constBegin -->
<h3 class="fn"><a name="constBegin"></a><span class="type"><a href="qfuture-const-iterator.html">const_iterator</a></span> QFuture::<span class="name">constBegin</span> () const</h3>
<p>Returns a const <a href="containers.html#stl-style-iterators">STL-style iterator</a> pointing to the first result in the future.</p>
<p><b>See also </b><a href="qfuture.html#begin">begin</a>() and <a href="qfuture.html#constEnd">constEnd</a>().</p>
<!-- @@@constBegin -->
<!-- $$$constEnd[overload1]$$$constEnd -->
<h3 class="fn"><a name="constEnd"></a><span class="type"><a href="qfuture-const-iterator.html">const_iterator</a></span> QFuture::<span class="name">constEnd</span> () const</h3>
<p>Returns a const <a href="containers.html#stl-style-iterators">STL-style iterator</a> pointing to the imaginary result after the last result in the future.</p>
<p><b>See also </b><a href="qfuture.html#constBegin">constBegin</a>() and <a href="qfuture.html#end">end</a>().</p>
<!-- @@@constEnd -->
<!-- $$$end[overload1]$$$end -->
<h3 class="fn"><a name="end"></a><span class="type"><a href="qfuture-const-iterator.html">const_iterator</a></span> QFuture::<span class="name">end</span> () const</h3>
<p>Returns a const <a href="containers.html#stl-style-iterators">STL-style iterator</a> pointing to the imaginary result after the last result in the future.</p>
<p><b>See also </b><a href="qfuture.html#begin">begin</a>() and <a href="qfuture.html#constEnd">constEnd</a>().</p>
<!-- @@@end -->
<!-- $$$isCanceled[overload1]$$$isCanceled -->
<h3 class="fn"><a name="isCanceled"></a><span class="type">bool</span> QFuture::<span class="name">isCanceled</span> () const</h3>
<p>Returns true if the asynchronous computation has been canceled with the <a href="qfuture.html#cancel">cancel</a>() function; otherwise returns false.</p>
<p>Be aware that the computation may still be running even though this function returns true. See <a href="qfuture.html#cancel">cancel</a>() for more details.</p>
<!-- @@@isCanceled -->
<!-- $$$isFinished[overload1]$$$isFinished -->
<h3 class="fn"><a name="isFinished"></a><span class="type">bool</span> QFuture::<span class="name">isFinished</span> () const</h3>
<p>Returns true if the asynchronous computation represented by this future has finished; otherwise returns false.</p>
<!-- @@@isFinished -->
<!-- $$$isPaused[overload1]$$$isPaused -->
<h3 class="fn"><a name="isPaused"></a><span class="type">bool</span> QFuture::<span class="name">isPaused</span> () const</h3>
<p>Returns true if the asynchronous computation has been paused with the <a href="qfuture.html#pause">pause</a>() function; otherwise returns false.</p>
<p>Be aware that the computation may still be running even though this function returns true. See <a href="qfuture.html#setPaused">setPaused</a>() for more details.</p>
<p><b>See also </b><a href="qfuture.html#setPaused">setPaused</a>() and <a href="qfuture.html#togglePaused">togglePaused</a>().</p>
<!-- @@@isPaused -->
<!-- $$$isResultReadyAt[overload1]$$$isResultReadyAtint -->
<h3 class="fn"><a name="isResultReadyAt"></a><span class="type">bool</span> QFuture::<span class="name">isResultReadyAt</span> ( <span class="type">int</span> <i>index</i> ) const</h3>
<p>Returns true if the result at <i>index</i> is immediately available; otherwise returns false.</p>
<p><b>See also </b><a href="qfuture.html#resultAt">resultAt</a>() and <a href="qfuture.html#resultCount">resultCount</a>().</p>
<!-- @@@isResultReadyAt -->
<!-- $$$isRunning[overload1]$$$isRunning -->
<h3 class="fn"><a name="isRunning"></a><span class="type">bool</span> QFuture::<span class="name">isRunning</span> () const</h3>
<p>Returns true if the asynchronous computation represented by this future is currently running; otherwise returns false.</p>
<!-- @@@isRunning -->
<!-- $$$isStarted[overload1]$$$isStarted -->
<h3 class="fn"><a name="isStarted"></a><span class="type">bool</span> QFuture::<span class="name">isStarted</span> () const</h3>
<p>Returns true if the asynchronous computation represented by this future has been started; otherwise returns false.</p>
<!-- @@@isStarted -->
<!-- $$$pause[overload1]$$$pause -->
<h3 class="fn"><a name="pause"></a><span class="type">void</span> QFuture::<span class="name">pause</span> ()</h3>
<p>Pauses the asynchronous computation represented by this future. This is a convenience method that simply calls setPaused(true).</p>
<p><b>See also </b><a href="qfuture.html#resume">resume</a>().</p>
<!-- @@@pause -->
<!-- $$$progressMaximum[overload1]$$$progressMaximum -->
<h3 class="fn"><a name="progressMaximum"></a><span class="type">int</span> QFuture::<span class="name">progressMaximum</span> () const</h3>
<p>Returns the maximum <a href="qfuture.html#progressValue">progressValue</a>().</p>
<p><b>See also </b><a href="qfuture.html#progressValue">progressValue</a>() and <a href="qfuture.html#progressMinimum">progressMinimum</a>().</p>
<!-- @@@progressMaximum -->
<!-- $$$progressMinimum[overload1]$$$progressMinimum -->
<h3 class="fn"><a name="progressMinimum"></a><span class="type">int</span> QFuture::<span class="name">progressMinimum</span> () const</h3>
<p>Returns the minimum <a href="qfuture.html#progressValue">progressValue</a>().</p>
<p><b>See also </b><a href="qfuture.html#progressValue">progressValue</a>() and <a href="qfuture.html#progressMaximum">progressMaximum</a>().</p>
<!-- @@@progressMinimum -->
<!-- $$$progressText[overload1]$$$progressText -->
<h3 class="fn"><a name="progressText"></a><span class="type"><a href="qstring.html">QString</a></span> QFuture::<span class="name">progressText</span> () const</h3>
<p>Returns the (optional) textual representation of the progress as reported by the asynchronous computation.</p>
<p>Be aware that not all computations provide a textual representation of the progress, and as such, this function may return an empty string.</p>
<!-- @@@progressText -->
<!-- $$$progressValue[overload1]$$$progressValue -->
<h3 class="fn"><a name="progressValue"></a><span class="type">int</span> QFuture::<span class="name">progressValue</span> () const</h3>
<p>Returns the current progress value, which is between the <a href="qfuture.html#progressMinimum">progressMinimum</a>() and <a href="qfuture.html#progressMaximum">progressMaximum</a>().</p>
<p><b>See also </b><a href="qfuture.html#progressMinimum">progressMinimum</a>() and <a href="qfuture.html#progressMaximum">progressMaximum</a>().</p>
<!-- @@@progressValue -->
<!-- $$$result[overload1]$$$result -->
<h3 class="fn"><a name="result"></a><span class="type">T</span> QFuture::<span class="name">result</span> () const</h3>
<p>Returns the first result in the future. If the result is not immediately available, this function will block and wait for the result to become available. This is a convenience method for calling resultAt(0).</p>
<p><b>See also </b><a href="qfuture.html#resultAt">resultAt</a>() and <a href="qfuture.html#results">results</a>().</p>
<!-- @@@result -->
<!-- $$$resultAt[overload1]$$$resultAtint -->
<h3 class="fn"><a name="resultAt"></a><span class="type">T</span> QFuture::<span class="name">resultAt</span> ( <span class="type">int</span> <i>index</i> ) const</h3>
<p>Returns the result at <i>index</i> in the future. If the result is not immediately available, this function will block and wait for the result to become available.</p>
<p><b>See also </b><a href="qfuture.html#result">result</a>(), <a href="qfuture.html#results">results</a>(), and <a href="qfuture.html#resultCount">resultCount</a>().</p>
<!-- @@@resultAt -->
<!-- $$$resultCount[overload1]$$$resultCount -->
<h3 class="fn"><a name="resultCount"></a><span class="type">int</span> QFuture::<span class="name">resultCount</span> () const</h3>
<p>Returns the number of continuous results available in this future. The real number of results stored might be different from this value, due to gaps in the result set. It is always safe to iterate through the results from 0 to resultCount().</p>
<p><b>See also </b><a href="qfuture.html#result">result</a>(), <a href="qfuture.html#resultAt">resultAt</a>(), and <a href="qfuture.html#results">results</a>().</p>
<!-- @@@resultCount -->
<!-- $$$results[overload1]$$$results -->
<h3 class="fn"><a name="results"></a><span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type">T</span>&gt; QFuture::<span class="name">results</span> () const</h3>
<p>Returns all results from the future. If the results are not immediately available, this function will block and wait for them to become available.</p>
<p><b>See also </b><a href="qfuture.html#result">result</a>(), <a href="qfuture.html#resultAt">resultAt</a>(), and <a href="qfuture.html#resultCount">resultCount</a>().</p>
<!-- @@@results -->
<!-- $$$resume[overload1]$$$resume -->
<h3 class="fn"><a name="resume"></a><span class="type">void</span> QFuture::<span class="name">resume</span> ()</h3>
<p>Resumes the asynchronous computation represented by this future. This is a convenience method that simply calls setPaused(false).</p>
<p><b>See also </b><a href="qfuture.html#pause">pause</a>().</p>
<!-- @@@resume -->
<!-- $$$setPaused[overload1]$$$setPausedbool -->
<h3 class="fn"><a name="setPaused"></a><span class="type">void</span> QFuture::<span class="name">setPaused</span> ( <span class="type">bool</span> <i>paused</i> )</h3>
<p>If <i>paused</i> is true, this function pauses the asynchronous computation represented by the future. If the computation is already paused, this function does nothing. Any <a href="qfuturewatcher.html">QFutureWatcher</a> object that is watching this future will stop delivering progress and result ready signals while the future is paused. Signal delivery will continue once the future is resumed.</p>
<p>If <i>paused</i> is false, this function resumes the asynchronous computation. If the computation was not previously paused, this function does nothing.</p>
<p>Be aware that not all computations can be paused. For example, the future returned by <a href="qtconcurrentrun.html#run">QtConcurrent::run</a>() cannot be paused; but the future returned by <a href="qtconcurrentmap.html#mappedReduced">QtConcurrent::mappedReduced</a>() can.</p>
<p><b>See also </b><a href="qfuture.html#isPaused">isPaused</a>(), <a href="qfuture.html#pause">pause</a>(), <a href="qfuture.html#resume">resume</a>(), and <a href="qfuture.html#togglePaused">togglePaused</a>().</p>
<!-- @@@setPaused -->
<!-- $$$togglePaused[overload1]$$$togglePaused -->
<h3 class="fn"><a name="togglePaused"></a><span class="type">void</span> QFuture::<span class="name">togglePaused</span> ()</h3>
<p>Toggles the paused state of the asynchronous computation. In other words, if the computation is currently paused, calling this function resumes it; if the computation is running, it is paused. This is a convenience method for calling setPaused(!<a href="qfuture.html#isPaused">isPaused</a>()).</p>
<p><b>See also </b><a href="qfuture.html#setPaused">setPaused</a>(), <a href="qfuture.html#pause">pause</a>(), and <a href="qfuture.html#resume">resume</a>().</p>
<!-- @@@togglePaused -->
<!-- $$$waitForFinished[overload1]$$$waitForFinished -->
<h3 class="fn"><a name="waitForFinished"></a><span class="type">void</span> QFuture::<span class="name">waitForFinished</span> ()</h3>
<p>Waits for the asynchronous computation to finish (including <a href="qfuture.html#cancel">cancel</a>()ed computations).</p>
<!-- @@@waitForFinished -->
<!-- $$$operator T[overload1]$$$operator T -->
<h3 class="fn"><a name="operator-T"></a>QFuture::<span class="name">operator T</span> () const</h3>
<p>Returns the first result in the future. If the result is not immediately available, this function will block and wait for the result to become available. This is a convenience method for calling <a href="qfuture.html#result">result</a>() or resultAt(0).</p>
<p><b>See also </b><a href="qfuture.html#result">result</a>(), <a href="qfuture.html#resultAt">resultAt</a>(), and <a href="qfuture.html#results">results</a>().</p>
<!-- @@@operator T -->
<!-- $$$operator!=[overload1]$$$operator!=constQFuture& -->
<h3 class="fn"><a name="operator-not-eq"></a><span class="type">bool</span> QFuture::<span class="name">operator!=</span> ( const <span class="type">QFuture</span> &amp; <i>other</i> ) const</h3>
<p>Returns true if <i>other</i> is <i>not</i> a copy of this future; otherwise returns false.</p>
<!-- @@@operator!= -->
<!-- $$$operator=[overload1]$$$operator=constQFuture& -->
<h3 class="fn"><a name="operator-eq"></a><span class="type">QFuture</span> &amp; QFuture::<span class="name">operator=</span> ( const <span class="type">QFuture</span> &amp; <i>other</i> )</h3>
<p>Assigns <i>other</i> to this future and returns a reference to this future.</p>
<!-- @@@operator= -->
<!-- $$$operator==[overload1]$$$operator==constQFuture& -->
<h3 class="fn"><a name="operator-eq-eq"></a><span class="type">bool</span> QFuture::<span class="name">operator==</span> ( const <span class="type">QFuture</span> &amp; <i>other</i> ) const</h3>
<p>Returns true if <i>other</i> is a copy of this future; otherwise returns false.</p>
<!-- @@@operator== -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2015 The Qt Company Ltd.
      Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      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.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      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. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>