engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数 | Public 属性 | 所有成员列表
FSlowTask结构体 参考

Data type used to store information about a currently running slow task. 更多...

#include <SlowTask.h>

+ 类 FSlowTask 继承关系图:

Public 成员函数

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
 

静态 Public 成员函数

static bool ShouldCreateThrottledSlowTask ()
 True if a slow task should be created. 更多...
 

Public 属性

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

参数
InAmountOfWorkArbitrary 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)
InDefaultMessageA message to display to the user to describe the purpose of the scope
bInVisibleWhen 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).

参数
ExpectedWorkThisFrameThe amount of work that will happen between now and the next frame, as a numerator of TotalAmountOfWork.
TextOptional 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

参数
bShowCancelButtonWhether to show a cancel button on the dialog or not
bAllowInPIEWhether 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.

参数
ThresholdTime in seconds before dialog will be shown.
bShowCancelButtonWhether to show a cancel button on the dialog or not
bAllowInPIEWhether 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.


该结构体的文档由以下文件生成: