Data type used to store information about a currently running slow task.
更多...
#include <SlowTask.h>
|
|
void | Destroy () |
| | Function that finishes any remaining work and removes itself from the global scope stack
|
| |
| void | EnterProgressFrame (float ExpectedWorkThisFrame=1.f, const FText &Text=FText()) |
| | Indicate that we are to enter a frame that will take up the specified amount of work. 更多...
|
| |
| | FSlowTask (float InAmountOfWork, const FText &InDefaultMessage=FText(), bool bInEnabled=true, FFeedbackContext &InContext= *GWarn) |
| | Construct this scope from an amount of work to do, and a message to display 更多...
|
| |
|
const FText & | GetCurrentMessage () const |
| | Get the frame message or default message if empty
|
| |
|
void | Initialize () |
| | Function that initializes the scope by adding it to its context's stack
|
| |
| void | MakeDialog (bool bShowCancelButton=false, bool bAllowInPIE=false) |
| | Creates a new dialog for this slow task, if there is currently not one open 更多...
|
| |
| void | MakeDialogDelayed (float Threshold, bool bShowCancelButton=false, bool bAllowInPIE=false) |
| | Creates a new dialog for this slow task after the given time threshold. 更多...
|
| |
|
bool | ShouldCancel () const |
| | True if the user has requested that the slow task be canceled
|
| |
|
|
float | CompletedWork |
| | The amount of work we have already completed in this scope
|
| |
|
float | CurrentFrameScope |
| | The amount of work the current frame is responsible for
|
| |
|
FText | DefaultMessage |
| | Default message to display to the user when not overridden by a frame
|
| |
|
FText | FrameMessage |
| | Message pertaining to the current frame's work
|
| |
|
TOptional< float > | OpenDialogThreshold |
| | Threshold before dialog is opened
|
| |
|
double | StartTime |
| | The time that this scope was created
|
| |
|
float | TotalAmountOfWork |
| | The amount of work to do in this scope
|
| |
|
ESlowTaskVisibility | Visibility |
| | The visibility of this slow task
|
| |
Data type used to store information about a currently running slow task.
Direct use is not advised, use FScopedSlowTask instead
◆ FSlowTask()
| FSlowTask::FSlowTask |
( |
float |
InAmountOfWork, |
|
|
const FText & |
InDefaultMessage = FText(), |
|
|
bool |
bInEnabled = true, |
|
|
FFeedbackContext & |
InContext = *GWarn |
|
) |
| |
Construct this scope from an amount of work to do, and a message to display
- 参数
-
| InAmountOfWork | Arbitrary number of work units to perform (can be a percentage or number of steps). 0 indicates that no progress frames are to be entered in this scope (automatically enters a frame encompassing the entire scope) |
| InDefaultMessage | A message to display to the user to describe the purpose of the scope |
| bInVisible | When false, this scope will have no effect. Allows for proper scoped objects that are conditionally hidden. |
◆ EnterProgressFrame()
| void FSlowTask::EnterProgressFrame |
( |
float |
ExpectedWorkThisFrame = 1.f, |
|
|
const FText & |
Text = FText() |
|
) |
| |
Indicate that we are to enter a frame that will take up the specified amount of work.
Completes any previous frames (potentially contributing to parent scopes' progress).
- 参数
-
| ExpectedWorkThisFrame | The amount of work that will happen between now and the next frame, as a numerator of TotalAmountOfWork. |
| Text | Optional text to describe this frame's purpose. |
◆ MakeDialog()
| void FSlowTask::MakeDialog |
( |
bool |
bShowCancelButton = false, |
|
|
bool |
bAllowInPIE = false |
|
) |
| |
Creates a new dialog for this slow task, if there is currently not one open
- 参数
-
| bShowCancelButton | Whether to show a cancel button on the dialog or not |
| bAllowInPIE | Whether to allow this dialog in PIE. If false, this dialog will not appear during PIE sessions. |
◆ MakeDialogDelayed()
| void FSlowTask::MakeDialogDelayed |
( |
float |
Threshold, |
|
|
bool |
bShowCancelButton = false, |
|
|
bool |
bAllowInPIE = false |
|
) |
| |
Creates a new dialog for this slow task after the given time threshold.
If the task completes before this time, no dialog will be shown.
- 参数
-
| Threshold | Time in seconds before dialog will be shown. |
| bShowCancelButton | Whether to show a cancel button on the dialog or not |
| bAllowInPIE | Whether to allow this dialog in PIE. If false, this dialog will not appear during PIE sessions. |
◆ ShouldCreateThrottledSlowTask()
| static bool FSlowTask::ShouldCreateThrottledSlowTask |
( |
| ) |
|
|
static |
True if a slow task should be created.
False if a slow task should not be created because another was created recently.
该结构体的文档由以下文件生成: