Files
UnrealEngineUWP/Engine/Plugins/Runtime/ModelViewViewModel/Source/ModelViewViewModelBlueprint/Public/MVVMDeveloperProjectSettings.h
patrick boutot eeb3c16fca MVVM: Add a allowed ExecutionMode list.
Move GlobalCollection to GameInstance subsystem.
Rename category from MVVM to Viewmodel.
#preflight 63d5e0bcba4fadeef09bdfc2

[CL 23927160 by patrick boutot in ue5-main branch]
2023-01-31 10:21:03 -05:00

64 lines
1.7 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Engine/DeveloperSettings.h"
#include "Types/MVVMExecutionMode.h"
#include "MVVMDeveloperProjectSettings.generated.h"
/**
*
*/
USTRUCT()
struct FMVVMDeveloperProjectWidgetSettings
{
GENERATED_BODY()
/** Properties or functions name that should not be use for binding (read or write). */
UPROPERTY(EditAnywhere, config, Category = "Viewmodel")
TSet<FName> DisallowedFieldNames;
/** Properties or functions name that are displayed in the advanced category. */
UPROPERTY(EditAnywhere, config, Category = "Viewmodel")
TSet<FName> AdvancedFieldNames;
};
/**
* Implements the settings for the MVVM Editor
*/
UCLASS(config=ModelViewViewModel, defaultconfig)
class MODELVIEWVIEWMODELBLUEPRINT_API UMVVMDeveloperProjectSettings : public UDeveloperSettings
{
GENERATED_BODY()
public:
UMVVMDeveloperProjectSettings();
virtual FName GetCategoryName() const override;
virtual FText GetSectionText() const override;
bool IsPropertyAllowed(const FProperty* Property) const;
bool IsFunctionAllowed(const UFunction* Function) const;
bool IsExecutionModeAllowed(EMVVMExecutionMode ExecutionMode) const
{
return AllowedExecutionMode.Contains(ExecutionMode);
}
private:
/** Permission list for filtering which properties are visible in UI. */
UPROPERTY(EditAnywhere, config, Category = "Viewmodel")
TMap<FSoftClassPath, FMVVMDeveloperProjectWidgetSettings> FieldSelectorPermissions;
/** Permission list for filtering which execution mode is allowed. */
UPROPERTY(EditAnywhere, config, Category = "Viewmodel")
TSet<EMVVMExecutionMode> AllowedExecutionMode;
};
#if UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_2
#include "Components/Widget.h"
#include "CoreMinimal.h"
#endif