以下成员源于类 QFutureWatcher 被弃用。 提供它们是为使旧源代码能继续工作。强烈建议不要在新代码中使用它们。
(deprecated (6.0))
bool
|
isPaused () const |
(deprecated)
void
|
pause () |
(deprecated (6.6))
void
|
setPaused (bool paused ) |
(deprecated (6.0))
void
|
togglePaused () |
(deprecated (6.0))
void
|
paused () |
[slot]
void
QFutureWatcher::
pause
()
This function is deprecated. We strongly advise against using it in new code.
使用 suspend () 代替。
Pauses the asynchronous computation represented by the future (). This is a convenience method that simply calls setPaused (true)。
另请参阅 resume ().
[signal]
void
QFutureWatcher::
paused
()
This function is deprecated since 6.0. We strongly advise against using it in new code.
使用 suspending () 代替。
This signal is emitted when the state of the watched future is set to paused.
注意: This signal only informs that pause has been requested. It doesn't indicate that all background operations are stopped. Signals for computations that were in progress at the moment of pausing will still be delivered. To to be informed when pause () actually took effect, use the suspended () 信号。
另请参阅 setPaused (), setSuspended (), suspend (),和 suspended ().
[slot]
void
QFutureWatcher::
setPaused
(
bool
paused
)
This function is deprecated since 6.6. We strongly advise against using it in new code.
使用 setSuspended () 代替。
若 paused is true, this function pauses the asynchronous computation represented by the future (). If the computation is already paused, this function does nothing. QFutureWatcher will not immediately stop delivering progress and result ready signals when the future is paused. At the moment of pausing there may still be computations that are in progress and cannot be stopped. Signals for such computations will still be delivered after pause.
若 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 QFuture returned by QtConcurrent::run() cannot be paused; but the QFuture returned by QtConcurrent::mappedReduced() can.
另请参阅 paused (), suspend (), resume (),和 toggleSuspended ().
[slot]
void
QFutureWatcher::
togglePaused
()
This function is deprecated since 6.0. We strongly advise against using it in new code.
使用 toggleSuspended () 代替。
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 ()).
另请参阅 setSuspended (), suspend (),和 resume ().
This function is deprecated since 6.0. We strongly advise against using it in new code.
使用 isSuspending () 或 isSuspended () 代替。
返回
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
。见
setPaused
() for more details. To check if pause actually took effect, use
isSuspended
() 代替。
另请参阅 setSuspended (), toggleSuspended (),和 isSuspended ().