- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Classes | Public Types | Public Member Functions | Public Attributes | Friends

# QFuture< T > Class Template Reference

Search for all occurrences

## Detailed Description

### template<typename T>
class QFuture< T >

Definition at line 64 of file qfuture.h.

`#include <qfuture.h>`

List of all members.

## Classes
class | const_iterator
## Public Types
typedef const_iterator | ConstIterator
## Public Member Functions
| QFuture ()
| QFuture (QFutureInterface< T > *p)
| QFuture (const QFuture &other)
| ~QFuture ()
QFuture & | operator= (const QFuture &other)
bool | operator== (const QFuture &other) const
bool | operator!= (const QFuture &other) const
void | cancel ()
bool | isCanceled () const
void | setPaused (bool paused)
bool | isPaused () const
void | pause ()
void | resume ()
void | togglePaused ()
bool | isStarted () const
bool | isFinished () const
bool | isRunning () const
int | resultCount () const
int | progressValue () const
int | progressMinimum () const
int | progressMaximum () const
QString | progressText () const
void | waitForFinished ()
T | result () const
T | resultAt (int index) const
bool | isResultReadyAt (int resultIndex) const
| operator T () const
QList< T > | results () const
const_iterator | begin () const
const_iterator | constBegin () const
const_iterator | end () const
const_iterator | constEnd () const
## Public Attributes
QFutureInterface< T > | d
## Friends
class | const_iterator
class | QFutureWatcher< T >

## Member Typedef Documentation

typedef const_iterator ConstIterator

Search for all occurrences

Definition at line 150 of file qfuture.h.

## Constructor & Destructor Documentation

QFuture | ( |  | ) | `[inline]`

Definition at line 67 of file qfuture.h.

            : d(QFutureInterface<T>::canceledResult())
        { }

QFuture | ( | QFutureInterface< T > * | p | ) | `[inline, explicit]`

Definition at line 70 of file qfuture.h.

            : d(*p)
        { }

QFuture | ( | const QFuture< T > & | other | ) | `[inline]`

Definition at line 73 of file qfuture.h.

            : d(other.d)
        { }

~QFuture | ( |  | ) | `[inline]`

Definition at line 76 of file qfuture.h.

        { }

## Member Function Documentation

QFuture< T > & operator= | ( | const QFuture< T > & | other | ) | `[inline]`

Definition at line 165 of file qfuture.h.

    {
        d = other.d;
        return *this;
    }

bool operator== | ( | const QFuture< T > & | other | ) | const `[inline]`

Definition at line 80 of file qfuture.h.

    { return (d == other.d); }

bool operator!= | ( | const QFuture< T > & | other | ) | const `[inline]`

Definition at line 81 of file qfuture.h.

    { return (d != other.d); }

void cancel | ( |  | ) | `[inline]`

Search for all occurrences

Definition at line 83 of file qfuture.h.

    { d.cancel(); }

bool isCanceled | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 84 of file qfuture.h.

    { return d.isCanceled(); }

void setPaused | ( | bool | paused | ) | `[inline]`

Search for all occurrences

Definition at line 86 of file qfuture.h.

    { d.setPaused(paused); }

bool isPaused | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 87 of file qfuture.h.

    { return d.isPaused(); }

void pause | ( |  | ) | `[inline]`

Search for all occurrences

Definition at line 88 of file qfuture.h.

    { setPaused(true); }

void resume | ( |  | ) | `[inline]`

Search for all occurrences

Definition at line 89 of file qfuture.h.

    { setPaused(false); }

void togglePaused | ( |  | ) | `[inline]`

Search for all occurrences

Definition at line 90 of file qfuture.h.

    { d.togglePaused(); }

bool isStarted | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 92 of file qfuture.h.

    { return d.isStarted(); }

bool isFinished | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 93 of file qfuture.h.

    { return d.isFinished(); }

bool isRunning | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 94 of file qfuture.h.

    { return d.isRunning(); }

int resultCount | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 96 of file qfuture.h.

    { return d.resultCount(); }

int progressValue | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 97 of file qfuture.h.

    { return d.progressValue(); }

int progressMinimum | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 98 of file qfuture.h.

    { return d.progressMinimum(); }

int progressMaximum | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 99 of file qfuture.h.

    { return d.progressMaximum(); }

QString progressText | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 100 of file qfuture.h.

    { return d.progressText(); }

void waitForFinished | ( |  | ) | `[inline]`

Search for all occurrences

Definition at line 101 of file qfuture.h.

    { d.waitForFinished(); }

T result | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 172 of file qfuture.h.

    {
        d.waitForResult(0);
        return d.resultReference(0);
    }

T resultAt | ( | int | index | ) | const `[inline]`

Search for all occurrences

Definition at line 179 of file qfuture.h.

    {
        d.waitForResult(index);
        return d.resultReference(index);
    }

bool isResultReadyAt | ( | int | resultIndex | ) | const `[inline]`

Search for all occurrences

Definition at line 105 of file qfuture.h.

    { return d.isResultReadyAt(resultIndex); }

operator T | ( |  | ) | const `[inline]`

Definition at line 107 of file qfuture.h.

    { return result(); }

QList<T> results | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 108 of file qfuture.h.

    { return d.results(); }

const_iterator begin | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 152 of file qfuture.h.

    { return  const_iterator(this, 0); }

const_iterator constBegin | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 153 of file qfuture.h.

    { return  const_iterator(this, 0); }

const_iterator end | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 154 of file qfuture.h.

    { return const_iterator(this, -1); }

const_iterator constEnd | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 155 of file qfuture.h.

    { return const_iterator(this, -1); }

## Friends And Related Function Documentation

friend class const_iterator `[friend]`

Search for all occurrences

Definition at line 149 of file qfuture.h.

friend class QFutureWatcher< T > `[friend]`

Search for all occurrences

Definition at line 158 of file qfuture.h.

## Member Data Documentation

QFutureInterface<T> d `[mutable]`

Search for all occurrences

Definition at line 161 of file qfuture.h.

The documentation for this class was generated from the following file:

- QtCore/qfuture.h