Files
UnrealEngineUWP/Engine/Source/Editor/DerivedDataEditor/Private/SDerivedDataStatusBar.h
paul chipchase 3eb268abbb Create a new module 'VirtualizationEditor' and move the existing VA editor code there from the 'DerivedDataEditor'
#rb Per.Larsson
#jira UE-162600
#rnx
#preflight 631597667562a90dfa991913

- Up until now we have been piggybacking off the DDC editor module as the VA statistics panel was originally based on the DDC statistic panel but now we are starting to do more VA editor/UX work so we should probably have our own module.
- This does mean we need to remove the the VA statistics panel from the DDC status bar, but it didn't really belong there and the panel can still be opened via the menu 'Tool->Audit->Virtual Assets'

[CL 21790583 by paul chipchase in ue5-main branch]
2022-09-05 06:19:34 -04:00

68 lines
1.7 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Framework/Commands/Commands.h"
#include "Internationalization/Text.h"
#include "Templates/SharedPointer.h"
#include "Types/SlateEnums.h"
#include "Widgets/DeclarativeSyntaxSupport.h"
#include "Widgets/SCompoundWidget.h"
class FUICommandInfo;
class FUICommandList;
class SNotificationItem;
class SWidget;
struct FSlateBrush;
class FDerivedDataStatusBarMenuCommands : public TCommands<FDerivedDataStatusBarMenuCommands>
{
public:
FDerivedDataStatusBarMenuCommands();
virtual void RegisterCommands() override;
private:
static void ChangeSettings_Clicked();
static void ViewCacheStatistics_Clicked();
static void ViewResourceUsage_Clicked();
public:
TSharedPtr< FUICommandInfo > ChangeSettings;
TSharedPtr< FUICommandInfo > ViewResourceUsage;
TSharedPtr< FUICommandInfo > ViewCacheStatistics;
static TSharedRef<FUICommandList> ActionList;
};
class SDerivedDataStatusBarWidget : public SCompoundWidget
{
SLATE_BEGIN_ARGS(SDerivedDataStatusBarWidget) {}
SLATE_END_ARGS()
void Construct(const FArguments& InArgs);
private:
FText GetTitleToolTipText() const;
FText GetRemoteCacheToolTipText() const;
FText GetTitleText() const;
const FSlateBrush* GetRemoteCacheStateBackgroundIcon() const;
const FSlateBrush* GetRemoteCacheStateBadgeIcon() const;
TSharedRef<SWidget> CreateStatusBarMenu();
EActiveTimerReturnType UpdateBusyIndicator(double InCurrentTime, float InDeltaTime);
EActiveTimerReturnType UpdateWarnings(double InCurrentTime, float InDeltaTime);
double ElapsedDownloadTime = 0;
double ElapsedUploadTime = 0;
double ElapsedBusyTime = 0;
bool bBusy = false;
TSharedPtr<SNotificationItem> NotificationItem;
};