KLingo Project Documentation 1.0.0
Unreal Engine 5.6 C++ Project Documentation
로딩중...
검색중...
일치하는것 없음
UPopup_QuestionnaireItem 클래스 참조

#include <Popup_QuestionnaireItem.h>

+ UPopup_QuestionnaireItem에 대한 상속 다이어그램 :
+ UPopup_QuestionnaireItem에 대한 협력 다이어그램:

Public 멤버 함수

void InitItem (const FWriteQuestionData &Data)
 질문 항목 초기화
 
bool IsAnswered () const
 답변 입력 여부 반환
 
void SetAnswerState (bool bAnswered)
 답변 상태 설정
 

Public 속성

FOnAnswerStateChanged OnAnswerStateChanged
 답변 상태 변경 시 호출되는 델리게이트
 

Protected 멤버 함수

virtual void NativeConstruct () override
 

Protected 속성

TObjectPtr< class UImageButtonButton_Answer
 
TObjectPtr< class UImage > Image_Checker
 
TObjectPtr< class UTextBlock > Text_Index
 
TObjectPtr< class UTextBlock > Text_Question
 "What is your current country..." 같은 질문 내용
 
TObjectPtr< class UWidgetSwitcher > WidgetSwitcher
 

Private 멤버 함수

void OnClickButton ()
 
void OnWriteBoardSaved ()
 WriteBoard 저장 완료 콜백
 
void UpdateWidgetSwitcher ()
 WidgetSwitcher 상태 업데이트
 

Private 속성

bool bIsAnswered = false
 답변 입력 여부
 
FWriteQuestionData QuestionData
 
TObjectPtr< class UTextureRenderTarget2D > RT_Canvas
 

상세한 설명

Popup_QuestionnaireItem.h 파일의 17 번째 라인에서 정의되었습니다.

멤버 함수 문서화

◆ InitItem()

void UPopup_QuestionnaireItem::InitItem ( const FWriteQuestionData Data)

질문 항목 초기화

Popup_QuestionnaireItem.cpp 파일의 27 번째 라인에서 정의되었습니다.

28{
29 this->QuestionData = Data;
30
31 // 질문 인덱스 설정 (예: "Question.01")
32 if (Text_Index)
33 {
34 FString IndexText = FString::Printf(TEXT("Q%d"), Data.Id);
35 Text_Index->SetText(FText::FromString(IndexText));
36 }
37
38 // FString Description = FString::Printf(TEXT("%s\n[%s]"),
39 // *Data.word_data.kor,
40 // *Data.word_data.eng);
41 //
42 // // 질문 내용 설정
43 // Text_Question->SetText(FText::FromString(Description));
44
45 Text_Question->SetText(FText::FromString(Data.word_data.eng));
46
47 // 초기 상태는 답변 안됨
48 SetAnswerState(false);
49}
TObjectPtr< class UTextBlock > Text_Index
TObjectPtr< class UTextBlock > Text_Question
"What is your current country..." 같은 질문 내용
void SetAnswerState(bool bAnswered)
답변 상태 설정
FWriteWordData word_data

다음을 참조함 : FWriteWordData::eng, FWriteQuestionData::Id, QuestionData, SetAnswerState(), Text_Index, Text_Question, FWriteQuestionData::word_data.

다음에 의해서 참조됨 : UPopup_Questionnaire::InitPopup().

+ 이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
+ 이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ IsAnswered()

bool UPopup_QuestionnaireItem::IsAnswered ( ) const
inline

답변 입력 여부 반환

Popup_QuestionnaireItem.h 파일의 35 번째 라인에서 정의되었습니다.

35{ return bIsAnswered; }
bool bIsAnswered
답변 입력 여부

◆ NativeConstruct()

void UPopup_QuestionnaireItem::NativeConstruct ( )
overrideprotectedvirtual

Popup_QuestionnaireItem.cpp 파일의 16 번째 라인에서 정의되었습니다.

17{
18 Super::NativeConstruct();
19
20 if (Button_Answer)
21 {
22 Button_Answer->OnButtonClickedEvent.RemoveDynamic(this, &UPopup_QuestionnaireItem::OnClickButton);
23 Button_Answer->OnButtonClickedEvent.AddDynamic(this, &UPopup_QuestionnaireItem::OnClickButton);
24 }
25}
TObjectPtr< class UImageButton > Button_Answer

다음을 참조함 : Button_Answer, OnClickButton().

+ 이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ OnClickButton()

void UPopup_QuestionnaireItem::OnClickButton ( )
private

Popup_QuestionnaireItem.cpp 파일의 51 번째 라인에서 정의되었습니다.

52{
53 if (auto Popup = UPopupManager::ShowPopupAs<UPopup_WriteBoard>(GetWorld(), EPopupType::WriteBoard))
54 {
55 // TODO: 단어 수 및 글자 수 구하기
56 TArray<FString> Tokens;
57 QuestionData.answer_kor.ParseIntoArrayWS(Tokens);
58 // for (const auto& token : Tokens)
59 // {
60 // PRINT_STRING(TEXT("Question 글 : %s"), *token);
61 // }
62 // PRINT_STRING(TEXT("Question 단어 수 : %d"), Tokens.Num());
63 // PRINT_STRING(TEXT("Question 글자 수 : %d"), QuestionData.answer_kor.Len());
64 // PRINT_STRING(TEXT("Question 첫 단어 글자 수 : %d"), Tokens[0].Len());
65
66 Popup->InitPopup(QuestionData.Id, QuestionData);
67
68 // WriteBoard 팝업이 닫힐 때 답변 저장 완료를 감지하기 위해 델리게이트 바인딩
69 // 중복 바인딩 방지를 위해 먼저 제거 후 추가
70 Popup->OnCanvasSaved.RemoveDynamic(this, &UPopup_QuestionnaireItem::OnWriteBoardSaved);
71 Popup->OnCanvasSaved.AddDynamic(this, &UPopup_QuestionnaireItem::OnWriteBoardSaved);
72 }
73}
void OnWriteBoardSaved()
WriteBoard 저장 완료 콜백

다음을 참조함 : FWriteQuestionData::answer_kor, FWriteQuestionData::Id, OnWriteBoardSaved(), QuestionData.

다음에 의해서 참조됨 : NativeConstruct().

+ 이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
+ 이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ OnWriteBoardSaved()

void UPopup_QuestionnaireItem::OnWriteBoardSaved ( )
private

WriteBoard 저장 완료 콜백

Popup_QuestionnaireItem.cpp 파일의 75 번째 라인에서 정의되었습니다.

76{
77 // 답변이 저장되었으므로 상태 업데이트
78 SetAnswerState(true);
79}

다음을 참조함 : SetAnswerState().

다음에 의해서 참조됨 : OnClickButton().

+ 이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
+ 이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ SetAnswerState()

void UPopup_QuestionnaireItem::SetAnswerState ( bool  bAnswered)

답변 상태 설정

Popup_QuestionnaireItem.cpp 파일의 81 번째 라인에서 정의되었습니다.

82{
83 if (bIsAnswered != bAnswered)
84 {
85 bIsAnswered = bAnswered;
87
88 // 델리게이트 브로드캐스트
90 }
91}
FOnAnswerStateChanged OnAnswerStateChanged
답변 상태 변경 시 호출되는 델리게이트
void UpdateWidgetSwitcher()
WidgetSwitcher 상태 업데이트

다음을 참조함 : bIsAnswered, OnAnswerStateChanged, UpdateWidgetSwitcher().

다음에 의해서 참조됨 : InitItem(), OnWriteBoardSaved().

+ 이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
+ 이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ UpdateWidgetSwitcher()

void UPopup_QuestionnaireItem::UpdateWidgetSwitcher ( )
private

WidgetSwitcher 상태 업데이트

Popup_QuestionnaireItem.cpp 파일의 93 번째 라인에서 정의되었습니다.

94{
96 {
97 // bIsAnswered가 true이면 Image_Checker(인덱스 1) 표시, false이면 Text_Index(인덱스 0) 표시
98 WidgetSwitcher->SetActiveWidgetIndex(bIsAnswered ? 1 : 0);
99 }
100}
TObjectPtr< class UWidgetSwitcher > WidgetSwitcher

다음을 참조함 : bIsAnswered, WidgetSwitcher.

다음에 의해서 참조됨 : SetAnswerState().

+ 이 함수를 호출하는 함수들에 대한 그래프입니다.:

멤버 데이터 문서화

◆ bIsAnswered

bool UPopup_QuestionnaireItem::bIsAnswered = false
private

답변 입력 여부

Popup_QuestionnaireItem.h 파일의 66 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : SetAnswerState(), UpdateWidgetSwitcher().

◆ Button_Answer

TObjectPtr<class UImageButton> UPopup_QuestionnaireItem::Button_Answer
protected

Popup_QuestionnaireItem.h 파일의 57 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : NativeConstruct().

◆ Image_Checker

TObjectPtr<class UImage> UPopup_QuestionnaireItem::Image_Checker
protected

Popup_QuestionnaireItem.h 파일의 50 번째 라인에서 정의되었습니다.

◆ OnAnswerStateChanged

FOnAnswerStateChanged UPopup_QuestionnaireItem::OnAnswerStateChanged

답변 상태 변경 시 호출되는 델리게이트

Popup_QuestionnaireItem.h 파일의 39 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : UPopup_Questionnaire::InitPopup(), SetAnswerState().

◆ QuestionData

FWriteQuestionData UPopup_QuestionnaireItem::QuestionData
private

Popup_QuestionnaireItem.h 파일의 60 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : InitItem(), OnClickButton().

◆ RT_Canvas

TObjectPtr<class UTextureRenderTarget2D> UPopup_QuestionnaireItem::RT_Canvas
private

Popup_QuestionnaireItem.h 파일의 63 번째 라인에서 정의되었습니다.

◆ Text_Index

TObjectPtr<class UTextBlock> UPopup_QuestionnaireItem::Text_Index
protected

Popup_QuestionnaireItem.h 파일의 47 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : InitItem().

◆ Text_Question

TObjectPtr<class UTextBlock> UPopup_QuestionnaireItem::Text_Question
protected

"What is your current country..." 같은 질문 내용

Popup_QuestionnaireItem.h 파일의 54 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : InitItem().

◆ WidgetSwitcher

TObjectPtr<class UWidgetSwitcher> UPopup_QuestionnaireItem::WidgetSwitcher
protected

Popup_QuestionnaireItem.h 파일의 44 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : UpdateWidgetSwitcher().


이 클래스에 대한 문서화 페이지는 다음의 파일들로부터 생성되었습니다.: