Files
UnrealEngineUWP/Engine/Source/Editor/UMGEditor/Public/Components/SinglePropertyView.h
Cody Albert d911ffd4e7 Expose NameOverride on SinglePropertyView widget
#rb none

[CL 14788537 by Cody Albert in ue5-main branch]
2020-11-19 14:27:39 -04:00

63 lines
1.6 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Components/PropertyViewBase.h"
#include "SinglePropertyView.generated.h"
class ISinglePropertyView;
/**
* The single property view allows you to display the value of an object's property.
*/
UCLASS()
class UMGEDITOR_API USinglePropertyView : public UPropertyViewBase
{
GENERATED_BODY()
private:
/** The name of the property to display. */
UPROPERTY(EditAnywhere, Category = "View")
FName PropertyName;
/** Override for the property name that will be displayed instead of the property name. */
UPROPERTY(EditAnywhere, AdvancedDisplay, Category = "View")
FText NameOverride;
public:
UFUNCTION(BlueprintCallable, Category = "View")
FName GetPropertyName() const;
UFUNCTION(BlueprintCallable, Category = "View")
void SetPropertyName(FName NewPropertyName);
UFUNCTION(BlueprintCallable, Category = "View")
FText GetNameOverride() const;
UFUNCTION(BlueprintCallable, Category = "View")
void SetNameOverride(FText NewPropertyName);
private:
void InternalSinglePropertyChanged();
//~ UPropertyViewBase interface
private:
virtual void BuildContentWidget() override;
virtual void OnObjectChanged() override;
//~ End of UPropertyViewBase interface
//~ UWidget interface
public:
virtual void ReleaseSlateResources(bool bReleaseChildren) override;
//~ End of UWidget interface
// UObject interface
public:
virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
// End of UObject interface
private:
TSharedPtr<ISinglePropertyView> SinglePropertyViewWidget;
};