2014-12-07 19:09:38 -05:00
|
|
|
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
#include "DeviceProfileEditorPCH.h"
|
|
|
|
|
#include "WorkspaceMenuStructureModule.h"
|
2014-10-14 22:50:06 -04:00
|
|
|
#include "SDockTab.h"
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
#define LOCTEXT_NAMESPACE "DeviceProfileEditor"
|
|
|
|
|
|
|
|
|
|
IMPLEMENT_MODULE(FDeviceProfileEditorModule, DeviceProfileEditor);
|
|
|
|
|
|
|
|
|
|
static const FName DeviceProfileEditorName("DeviceProfileEditor");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void FDeviceProfileEditorModule::StartupModule()
|
|
|
|
|
{
|
|
|
|
|
FGlobalTabmanager::Get()->RegisterNomadTabSpawner(DeviceProfileEditorName, FOnSpawnTab::CreateStatic(&FDeviceProfileEditorModule::SpawnDeviceProfileEditorTab))
|
2014-10-09 12:34:55 -04:00
|
|
|
.SetDisplayName( NSLOCTEXT("DeviceProfileEditor", "DeviceProfileEditorTitle", "Device Profiles") )
|
2014-04-02 18:09:23 -04:00
|
|
|
.SetIcon(FSlateIcon(FEditorStyle::GetStyleSetName(), "DeviceDetails.Tabs.ProfileEditor"))
|
2014-10-09 12:34:55 -04:00
|
|
|
.SetGroup( WorkspaceMenu::GetMenuStructure().GetDeveloperToolsMiscCategory() );
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void FDeviceProfileEditorModule::ShutdownModule()
|
|
|
|
|
{
|
|
|
|
|
FGlobalTabmanager::Get()->UnregisterNomadTabSpawner(DeviceProfileEditorName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TSharedRef<SDockTab> FDeviceProfileEditorModule::SpawnDeviceProfileEditorTab(const FSpawnTabArgs& SpawnTabArgs)
|
|
|
|
|
{
|
|
|
|
|
const TSharedRef<SDockTab> MajorTab = SNew(SDockTab)
|
|
|
|
|
.TabRole(ETabRole::MajorTab);
|
|
|
|
|
|
|
|
|
|
const TSharedRef<SDeviceProfileEditor> DeviceProfileEditor = SNew(SDeviceProfileEditor);
|
|
|
|
|
|
|
|
|
|
MajorTab->SetContent(DeviceProfileEditor);
|
|
|
|
|
|
|
|
|
|
return MajorTab;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2014-09-21 20:35:48 -04:00
|
|
|
#undef LOCTEXT_NAMESPACE
|