// OpenAI, Copyright LifeEXE. All Rights Reserved. #pragma once #include "CoreMinimal.h" #include "EditorUtilityWidget.h" #include "ChatGPT/ChatGPT.h" #include "ServiceWidget.generated.h" class UServiceWidget; DECLARE_MULTICAST_DELEGATE_ThreeParams(FOnServiceEnabled, bool, const TSubclassOf&, const TObjectPtr&); class UTextBlock; class UEditorUtilityCheckBox; class UBaseService; UCLASS() class OPENAIEDITOR_API UServiceWidget : public UEditorUtilityWidget { GENERATED_BODY() public: void SetServiceClass(const TSubclassOf& Class); bool IsEnabled() const; void SetEnabled(bool IsEnabled); FOnServiceEnabled& OnServiceEnabled() { return ServiceEnabled; } protected: virtual void NativeConstruct() override; UPROPERTY(meta = (BindWidget)) TObjectPtr ServiceName; UPROPERTY(meta = (BindWidget)) TObjectPtr EnableCheckBox; private: TSubclassOf ServiceClass; FOnServiceEnabled ServiceEnabled; UFUNCTION() void OnCheckStateChanged(bool bIsChecked); };