// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "Widgets/SCompoundWidget.h" #include "Widgets/Views/SListView.h" #include "Widgets/Views/STableRow.h" #include "Widgets/Text/STextBlock.h" #include "ChangeInfo.h" class UGSTab; class SLogWidget; class SBuildDataRow final : public SMultiColumnTableRow> { SLATE_BEGIN_ARGS(SBuildDataRow) {} SLATE_END_ARGS() void Construct(const FArguments& InArgs, const TSharedRef& InOwnerTableView, const TSharedPtr& Item); virtual TSharedRef GenerateWidgetForColumn(const FName& ColumnId) override; protected: TSharedPtr CurrentItem; }; class SGameSyncTab final : public SCompoundWidget { public: SLATE_BEGIN_ARGS(SGameSyncTab) {} SLATE_END_ARGS() void Construct(const FArguments& InArgs, UGSTab* InTab); // We need access to the SyncLog when creating the Workspace // TODO: think of a better way to do this TSharedPtr GetSyncLog() const; bool SetSyncLogLocation(const FString& LogFileName); void SetStreamPathText(FText StreamPath); void SetChangelistText(int Changelist); void SetProjectPathText(FText ProjectPath); void AddHordeBuilds(const TArray>& Builds); private: TSharedRef GenerateHordeBuildTableRow(TSharedPtr InItem, const TSharedRef& InOwnerTable); TSharedRef MakeSyncButtonDropdown(); // Widget callbacks TSharedPtr OnRightClickedBuild(); TSharedPtr>> HordeBuildsView; TArray> HordeBuilds; TSharedPtr SyncLog; TSharedPtr StreamPathText; TSharedPtr ChangelistText; TSharedPtr ProjectPathText; TSharedPtr SyncProgressText; static constexpr float HordeBuildRowHorizontalPadding = 10.0f; static constexpr float HordeBuildRowVerticalPadding = 2.5f; static constexpr float HordeBuildRowExtraIconPadding = 10.0f; UGSTab* Tab = nullptr; };