Stream Chat Unreal SDK
Loading...
Searching...
No Matches
ProfilePicWidget.h
1// Copyright 2022 Stream.IO, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "Components/Image.h"
6#include "Components/TextBlock.h"
7#include "CoreMinimal.h"
8#include "StreamWidget.h"
9#include "User/UserRef.h"
10
11#include "ProfilePicWidget.generated.h"
12
16UCLASS()
17class STREAMCHATUI_API UProfilePicWidget final : public UStreamWidget
18{
19 GENERATED_BODY()
20
21public:
22 UFUNCTION(BlueprintCallable, Category = "Stream Chat")
23 void Setup(const FUserRef& InUser);
24 UFUNCTION(BlueprintCallable, Category = "Stream Chat")
25 void SetupWithUrl(const FString& InImageUrl);
26
27protected:
28 UPROPERTY(meta = (BindWidget))
29 UImage* Image;
30
31 UPROPERTY(meta = (BindWidget))
32 UTextBlock* InitialsTextBlock;
33
34 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Setup)
35 FUserRef User;
36
37 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Setup)
38 FString ImageUrl;
39
40private:
41 virtual void OnSetup() override;
42
43 FString GetUrl() const;
44 void FetchRemoteImage();
45};
A reference to a unique User.
Definition: UserRef.h:23