Files
UnrealEngineUWP/Engine/Source/Developer/ScreenShotComparison/Private/Models/ScreenComparisonModel.h
Marc Audy 11f5b21210 Merging //UE5/Release-Engine-Staging @ 13752110 to Main (//UE5/Main)
#rnx

[CL 13753156 by Marc Audy in ue5-main branch]
2020-06-23 18:40:00 -04:00

58 lines
1.1 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "ImageComparer.h"
#include "AutomationWorkerMessages.h"
#include "Misc/FileHelper.h"
#include "JsonObjectConverter.h"
#include "AutomationWorkerMessages.h"
class FScreenComparisonModel
{
public:
FScreenComparisonModel(const FComparisonReport& InReport);
DECLARE_MULTICAST_DELEGATE(FOnComplete);
FOnComplete OnComplete;
FComparisonReport Report;
bool IsComplete() const;
void Complete(bool WasSuccessful);
bool AddNew();
bool Replace();
bool AddAlternative();
TOptional<FAutomationScreenshotMetadata> GetMetadata();
private:
bool RemoveExistingApproved();
private:
bool bComplete;
TOptional<FAutomationScreenshotMetadata> Metadata;
struct FFileMapping
{
FFileMapping(const FString& InDestFile, const FString& InSourceFile)
: DestinationFile(InDestFile)
, SourceFile(InSourceFile)
{
}
// local file we'd write to on disk
FString DestinationFile;
// input file from the report
FString SourceFile;
};
//
TArray<FFileMapping> FileImports;
};