Open 3D Engine AzToolsFramework API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzToolsFramework::Prefab::PrefabSaveHandler Class Referencefinal

Class to handle dialogs and windows related to prefab save operations. More...

#include <PrefabSaveLoadHandler.h>

Inherits QObject, AzQtComponents::DragAndDropEventsBus::Handler, AzQtComponents::DragAndDropItemViewEventsBus::Handler, and AzToolsFramework::AssetSystemBus::Handler.

Public Types

enum class  PrefabSaveResult { Continue , Retry , Cancel }
 

Public Member Functions

 AZ_CLASS_ALLOCATOR (PrefabSaveHandler, AZ::SystemAllocator)
 
int GetDragAndDropEventsPriority () const override
 
void DragEnter (QDragEnterEvent *event, AzQtComponents::DragAndDropContextBase &context) override
 
void DragMove (QDragMoveEvent *event, AzQtComponents::DragAndDropContextBase &context) override
 
void DragLeave (QDragLeaveEvent *event) override
 
void Drop (QDropEvent *event, AzQtComponents::DragAndDropContextBase &context) override
 
int GetDragAndDropItemViewEventsPriority () const override
 
void CanDropItemView (bool &accepted, AzQtComponents::DragAndDropContextBase &context) override
 
void DoDropItemView (bool &accepted, AzQtComponents::DragAndDropContextBase &context) override
 
void InitializePrefabToastNotificationsView ()
 Initializes PrefabToastNotificationsView member, which uses the editor's main window as the parent widget to show toasts.
 
int ExecuteClosePrefabDialog (TemplateId templateId)
 
void ExecuteSavePrefabDialog (AZ::EntityId entityId)
 
void ExecuteSavePrefabDialog (TemplateId templateId, bool useSaveAllPrefabsPreference)
 

Static Public Member Functions

static bool GetPrefabSaveLocation (AZStd::string &path, AZ::u32 settingsId)
 
static void SetPrefabSaveLocation (const AZStd::string &path, AZ::u32 settingsId)
 
static bool QueryUserForPrefabFilePath (AZStd::string &outPrefabFilePath)
 
static bool QueryUserForProceduralPrefabAsset (AZStd::string &outPrefabAssetPath)
 
static bool QueryUserForPrefabSaveLocation (const AZStd::string &suggestedName, const char *initialTargetDirectory, AZ::u32 prefabUserSettingsId, QWidget *activeWindow, AZStd::string &outPrefabName, AZStd::string &outPrefabFilePath)
 
static void GenerateSuggestedFilenameFromEntities (const EntityIdList &entities, AZStd::string &outName)
 
static bool AppendEntityToSuggestedFilename (AZStd::string &filename, AZ::EntityId entityId)
 
static PrefabSaveResult IsPrefabPathValidForAssets (QWidget *activeWindow, QString prefabPath, AZStd::string &retrySavePath)
 
static void GenerateSuggestedPrefabPath (const AZStd::string &prefabName, const AZStd::string &targetDirectory, AZStd::string &suggestedFullPath)
 

Detailed Description

Class to handle dialogs and windows related to prefab save operations.


The documentation for this class was generated from the following file: