Native class

FGBAAttributeSetWizardViewModel#

  • Declared in "Models/GBAAttributeSetWizardViewModel.h"
class FGBAAttributeSetWizardViewModel : public IGBASlateViewModel

Implements a view model for the attribute set wizard.

Internal delegates#

  • public
    • FOnUpdateValidityChanged&

    Delegate called whenever input and model properties are validated passing down whether it was valid, and an error text if not

Methods#

  • public
    • FGBAAttributeSetWizardViewModel&

    Default constructor with ParentClass set to UAttributeSet

    • FGBAAttributeSetWizardViewModel&
    explicit
    FGBAAttributeSetWizardViewModel(​
    const FNewClassInfo& InParentClassInfo
    )

    Convenience constructor so you can construct from a FNewClassInfo

    • FGBAAttributeSetWizardViewModel&
    explicit
    FGBAAttributeSetWizardViewModel(​
    const UClass* InClass
    )

    Convenience constructor so you can construct from a UClass

    • AddRequiredModuleDependency&
    void
    AddRequiredModuleDependency(​
    const FString& InModuleName,
    const FText& InReason
    )

    Adds a new required module dependency if it's not the currently selected module

    • DECLARE_VIEWMODEL_PROPERTY&
    DECLARE_VIEWMODEL_PROPERTY(​
    EGBAPreviewCppType ,
    CurrentPreviewValue
    )

    Current value for the segmented control active view

    • DECLARE_VIEWMODEL_PROPERTY&
    DECLARE_VIEWMODEL_PROPERTY(​
    FNewClassInfo ,
    ParentClassInfo
    )

    The selected parent class

    • DECLARE_VIEWMODEL_PROPERTY&
    DECLARE_VIEWMODEL_PROPERTY(​
    FString ,
    CalculatedClassHeaderName
    )

    The calculated name of the generated header file for this class

    • DECLARE_VIEWMODEL_PROPERTY&
    DECLARE_VIEWMODEL_PROPERTY(​
    FString ,
    CalculatedClassSourceName
    )

    The calculated name of the generated source file for this class

    • DECLARE_VIEWMODEL_PROPERTY&
    DECLARE_VIEWMODEL_PROPERTY(​
    FString ,
    NewClassName
    )

    The name of the class being created (Value of Name Edit box)

    • DECLARE_VIEWMODEL_PROPERTY&
    DECLARE_VIEWMODEL_PROPERTY(​
    FString ,
    NewClassPath
    )

    The path to place the files for the class being generated

    • DECLARE_VIEWMODEL_PROPERTY&
    DECLARE_VIEWMODEL_PROPERTY(​
    FString ,
    SelectedClassPath
    )

    The displayed and edited path to place the file for the class being generated, relative to target module source path

    • DECLARE_VIEWMODEL_PROPERTY&
    DECLARE_VIEWMODEL_PROPERTY(​
    GameProjectUtils::EClassLocation ,
    ClassLocation
    )

    Whether the class should be created as a Public or Private class

    • DECLARE_VIEWMODEL_PROPERTY&
    DECLARE_VIEWMODEL_PROPERTY(​
    TArray<FGBARequiredModuleDependency> ,
    RequiredModuleDependencies
    )

    List of required module dependencies for class being generated (dynamic based on parent class and other parameters)

    • DECLARE_VIEWMODEL_PROPERTY&
    DECLARE_VIEWMODEL_PROPERTY(​
    TArray<FString> ,
    MissingModuleDependencies
    )

    List of missing module dependencies for class being generated (updated as part of the validation process)

    • DECLARE_VIEWMODEL_PROPERTY&
    DECLARE_VIEWMODEL_PROPERTY(​
    TSharedPtr<FModuleContextInfo> ,
    SelectedModuleInfo
    )

    Information about the currently selected module; used for class validation

    • DECLARE_VIEWMODEL_PROPERTY&
    DECLARE_VIEWMODEL_PROPERTY(​
    TWeakObjectPtr<UBlueprint> ,
    SelectedBlueprint
    )

    The asset currently being displayed by the header view

    • DECLARE_VIEWMODEL_PROPERTY&
    DECLARE_VIEWMODEL_PROPERTY(​
    bool ,
    bSatisfiesModuleDependencies
    )

    Whether all required module dependencies are present in target module Build.cs file

    • GetLastInputValidityErrorText&

    Returns localized text with error info in case last input validity check failed

    • Initialize&
    • Implements IGBASlateViewModel::​Initialize
    virtual void
    Initialize(​) override

    Noop (for now) initialization sequence

    • IsLastInputValidityCheckSuccessful&

    Returns whether last validity check was successful

    • OnUpdateValidityChanged&
    • ResetRequiredModuleDependencies&

    Reset required module dependencies to the reserved always included ones

    • RunPeriodicValidationOnTick&
    void
    RunPeriodicValidationOnTick(​
    const double InCurrentTime
    )

    Runs periodic check to check the class name/path for validity in case the disk contents changed and the location is now valid or invalid.

    • UpdateInputValidity&

    Checks the current class name/path for validity and updates cached values accordingly

Fields#

  • private
    • bLastInputValidityCheckSuccessful&
    bool bLastInputValidityCheckSuccessful = false

    True if the last validity check returned that the class name/path is valid for creation

    • bPreventPeriodicValidityChecksUntilNextChange&
    bool bPreventPeriodicValidityChecksUntilNextChange = false

    Periodic checks for validity will not occur while this flag is true. Used to prevent a frame of "this project already exists" while exiting after a successful creation.

    • LastInputValidityErrorText&
    FText LastInputValidityErrorText

    The error text from the last validity check

    • LastPeriodicValidityCheckTime&
    double LastPeriodicValidityCheckTime = 0

    The last time that the class name/path was checked for validity. This is used to throttle I/O requests to a reasonable frequency

    • OnUpdateValidityChangedDelegate&
    FOnUpdateValidityChanged OnUpdateValidityChangedDelegate

    Delegate invoked at the end of a new validity check

    • PeriodicValidityCheckFrequency&
    double PeriodicValidityCheckFrequency = 4

    The frequency in seconds for validity checks while the dialog is idle. Changes to the name/path immediately update the validity.

    • ReservedModuleDependencies&
    static TArray<FGBARequiredModuleDependency> ReservedModuleDependencies

    The list of "reserved" always required dependencies