com.trolltech.qt.core
Class QFutureVoid

java.lang.Object
  extended by com.trolltech.qt.internal.QSignalEmitterInternal
      extended by com.trolltech.qt.QSignalEmitter
          extended by com.trolltech.qt.QtJambiObject
              extended by com.trolltech.qt.core.QFutureVoid
All Implemented Interfaces:
QtJambiInterface, java.lang.Cloneable

public class QFutureVoid
extends QtJambiObject
implements java.lang.Cloneable


Nested Class Summary
 
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9
 
Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal
 
Field Summary
 
Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
currentSender
 
Constructor Summary
QFutureVoid()
           
QFutureVoid(QFutureVoid other)
          Constructs a copy of other.
 
Method Summary
 void cancel()
          Cancels the asynchronous computation represented by this future.
 QFutureVoid clone()
          This method is reimplemented for internal reasons
 boolean isCanceled()
          Returns true if the asynchronous computation has been canceled with the cancel() function; otherwise returns false.
 boolean isFinished()
          Returns true if the asynchronous computation represented by this future has finished; otherwise returns false.
 boolean isPaused()
          Returns true if the asynchronous computation has been paused with the pause() function; otherwise returns false.
 boolean isRunning()
          Returns true if the asynchronous computation represented by this future is currently running; otherwise returns false.
 boolean isStarted()
          Returns true if the asynchronous computation represented by this future has been started; otherwise returns false.
 void pause()
          Pauses the asynchronous computation represented by this future.
 int progressMaximum()
          Returns the maximum progressValue().
 int progressMinimum()
          Returns the minimum progressValue().
 java.lang.String progressText()
          Returns the (optional) textual representation of the progress as reported by the asynchronous computation.
 int progressValue()
          Returns the current progress value, which is between the progressMinimum() and progressMaximum().
 void resume()
          Resumes the asynchronous computation represented by this future.
 void setPaused(boolean paused)
          If paused is true, this function pauses the asynchronous computation represented by the future.
 void togglePaused()
          Toggles the paused state of the asynchronous computation.
 void waitForFinished()
          Waits for the asynchronous computation to finish (including cancel()ed computations).
 
Methods inherited from class com.trolltech.qt.QtJambiObject
dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr
 
Methods inherited from class com.trolltech.qt.QSignalEmitter
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread
 
Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
__qt_signalInitialization
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.trolltech.qt.QtJambiInterface
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership
 

Constructor Detail

QFutureVoid

public QFutureVoid()

QFutureVoid

public QFutureVoid(QFutureVoid other)
Constructs a copy of other.

See also:
operator=().

Method Detail

cancel

public final void cancel()
Cancels the asynchronous computation represented by this future. Note that the cancelation is asynchronous. Use waitForFinished() after calling cancel() when you need synchronous cancelation.

Results currently available may still be accessed on a canceled future, but new results will not become available after calling this function. Any QFutureWatcher object that is watching this future will not deliver progress and result ready signals on a canceled future.

Be aware that not all asynchronous computations can be canceled. For example, the future returned by QtConcurrent::run() cannot be canceled; but the future returned by QtConcurrent::mappedReduced() can.


isCanceled

public final boolean isCanceled()
Returns true if the asynchronous computation has been canceled with the cancel() function; otherwise returns false.

Be aware that the computation may still be running even though this function returns true. See cancel() for more details.


isFinished

public final boolean isFinished()
Returns true if the asynchronous computation represented by this future has finished; otherwise returns false.


isPaused

public final boolean isPaused()
Returns true if the asynchronous computation has been paused with the pause() function; otherwise returns false.

Be aware that the computation may still be running even though this function returns true. See setPaused() for more details.

See also:
setPaused(), and togglePaused().


isRunning

public final boolean isRunning()
Returns true if the asynchronous computation represented by this future is currently running; otherwise returns false.


isStarted

public final boolean isStarted()
Returns true if the asynchronous computation represented by this future has been started; otherwise returns false.


pause

public final void pause()
Pauses the asynchronous computation represented by this future. This is a convenience method that simply calls setPaused(true).

See also:
resume().


progressMaximum

public final int progressMaximum()
Returns the maximum progressValue().

See also:
progressValue(), and progressMinimum().


progressMinimum

public final int progressMinimum()
Returns the minimum progressValue().

See also:
progressValue(), and progressMaximum().


progressText

public final java.lang.String progressText()
Returns the (optional) textual representation of the progress as reported by the asynchronous computation.

Be aware that not all computations provide a textual representation of the progress, and as such, this function may return an empty string.


progressValue

public final int progressValue()
Returns the current progress value, which is between the progressMinimum() and progressMaximum().

See also:
progressMinimum(), and progressMaximum().


resume

public final void resume()
Resumes the asynchronous computation represented by this future. This is a convenience method that simply calls setPaused(false).

See also:
pause().


setPaused

public final void setPaused(boolean paused)
If paused is true, this function pauses the asynchronous computation represented by the future. If the computation is already paused, this function does nothing. Any QFutureWatcher 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.

If paused is false, this function resumes the asynchronous computation. If the computation was not previously paused, this function does nothing.

Be aware that not all computations can be paused. For example, the future returned by QtConcurrent::run() cannot be paused; but the future returned by QtConcurrent::mappedReduced() can.

See also:
isPaused(), pause(), resume(), and togglePaused().


togglePaused

public final void togglePaused()
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(!isPaused()).

See also:
setPaused(), pause(), and resume().


waitForFinished

public final void waitForFinished()
Waits for the asynchronous computation to finish (including cancel()ed computations).


clone

public QFutureVoid clone()
This method is reimplemented for internal reasons

Overrides:
clone in class java.lang.Object