Files
UnrealEngineUWP/Engine/Source/Developer/Localization/Public/LocalizationSettings.h
bryan sefcik de1956f47b Ran IWYU on Public headers under Engine/Source/Developer/...
Headers are updated to contain any missing #includes needed to compile and #includes are sorted.  Nothing is removed.

#ushell-cherrypick of 21064294 by bryan.sefcik
#jira
#preflight 62d5c2111062f2e63015e598

#ROBOMERGE-OWNER: bryan.sefcik
#ROBOMERGE-AUTHOR: bryan.sefcik
#ROBOMERGE-SOURCE: CL 21155249 via CL 21158121 via CL 21161259
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21182053 by bryan sefcik in ue5-main branch]
2022-07-20 12:03:45 -04:00

75 lines
2.5 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Containers/Array.h"
#include "CoreMinimal.h"
#include "LocalizationTargetTypes.h"
#include "UObject/Object.h"
#include "UObject/ObjectMacros.h"
#include "UObject/ObjectPtr.h"
#include "UObject/UObjectGlobals.h"
#include "LocalizationSettings.generated.h"
class FString;
class ULocalizationTargetSet;
struct FPropertyChangedEvent;
// Class for loading/saving configuration settings and the details view objects needed for localization dashboard functionality.
UCLASS(Config=Editor, defaultconfig)
class LOCALIZATION_API ULocalizationSettings : public UObject
{
GENERATED_BODY()
public:
ULocalizationSettings(const FObjectInitializer& ObjectInitializer);
private:
UPROPERTY()
TObjectPtr<ULocalizationTargetSet> EngineTargetSet;
UPROPERTY(config)
TArray<FLocalizationTargetSettings> EngineTargetsSettings;
UPROPERTY()
TObjectPtr<ULocalizationTargetSet> GameTargetSet;
UPROPERTY(config)
TArray<FLocalizationTargetSettings> GameTargetsSettings;
public:
#if WITH_EDITOR
virtual void PostInitProperties() override;
virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
#endif
static ULocalizationTargetSet* GetEngineTargetSet();
static ULocalizationTargetSet* GetGameTargetSet();
};
/** Struct containing util functions for getting/setting the SCC settings for the localization dashboard */
struct LOCALIZATION_API FLocalizationSourceControlSettings
{
public:
/** Checks to see whether source control is available based upon the current editor SCC settings. */
static bool IsSourceControlAvailable();
/** Check to see whether we should use SCC when running the localization commandlets. This should be used to optionally pass "-EnableSCC" to the commandlet. */
static bool IsSourceControlEnabled();
/** Check to see whether we should automatically submit changed files after running the commandlet. This should be used to optionally pass "-DisableSCCSubmit" to the commandlet. */
static bool IsSourceControlAutoSubmitEnabled();
/** Set whether we should use SCC when running the localization commandlets. */
static void SetSourceControlEnabled(const bool bIsEnabled);
/** Set whether we should automatically submit changed files after running the commandlet. */
static void SetSourceControlAutoSubmitEnabled(const bool bIsEnabled);
private:
static const FString LocalizationSourceControlSettingsCategoryName;
static const FString SourceControlEnabledSettingName;
static const FString SourceControlAutoSubmitEnabledSettingName;
};