Live Config
Loading...
Searching...
No Matches
SLiveConfigCleanupUnusedPropertiesWidget.h
1// Copyright (c) 2026 Nicholas Arthur
2// Licensed under the MIT License
3
4#pragma once
5
6#include "CoreMinimal.h"
7#include "Widgets/SCompoundWidget.h"
8#include "Widgets/Views/SListView.h"
9
10class FUnusedLiveConfigPropertyItem : public TSharedFromThis<FUnusedLiveConfigPropertyItem>
11{
12public:
13 FUnusedLiveConfigPropertyItem(FName InPropertyName)
14 : PropertyName(InPropertyName)
15 , CheckState(ECheckBoxState::Checked)
16 {}
17
18 FName PropertyName;
19 ECheckBoxState CheckState;
20};
21
22class SLiveConfigCleanupUnusedPropertiesWidget : public SCompoundWidget
23{
24public:
26 SLATE_END_ARGS()
27
28 void Construct(const FArguments& InArgs);
29
30private:
31 TSharedRef<ITableRow> MakeUnusedPropertyListItemWidget(TSharedPtr<FUnusedLiveConfigPropertyItem> Item, const TSharedRef<STableViewBase>& OwnerTable);
32
33 void PopulateUnusedProperties();
34 FReply OnRemovePressed();
35 bool IsRemoveEnabled() const;
36
37 ECheckBoxState GetToggleSelectedState() const;
38 void OnToggleSelectedCheckBox(ECheckBoxState InNewState);
39
40 FText GetDescriptionText() const;
41
42 TArray<TSharedPtr<FUnusedLiveConfigPropertyItem>> UnusedProperties;
43 TSharedPtr<SListView<TSharedPtr<FUnusedLiveConfigPropertyItem>>> UnusedPropertiesListView;
44};
Definition SLiveConfigCleanupUnusedPropertiesWidget.h:11
Definition SLiveConfigCleanupUnusedPropertiesWidget.h:23