Open 3D Engine SliceFavorites Gem 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.
SliceFavorites::FavoriteDataModel Class Reference

Inherits QAbstractItemModel, AzToolsFramework::EditorEvents::Bus::Handler, AzToolsFramework::AssetBrowser::AssetBrowserInteractionNotificationBus::Handler, AzFramework::AssetCatalogEventBus::Handler, AzQtComponents::DragAndDropEventsBus::Handler, and AzToolsFramework::AssetBrowser::AssetBrowserComponentNotificationBus::Handler.

Public Slots

void ProcessRemovedAssets ()
 

Signals

void DataModelChanged ()
 
void ExpandIndex (const QModelIndex &index, bool expanded)
 
void DisplayWarning (const QString &title, const QString &message)
 

Public Member Functions

 FavoriteDataModel (QObject *parent=nullptr)
 
QVariant data (const QModelIndex &index, int role) const override
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
 
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const override
 
QModelIndex parent (const QModelIndex &index) const override
 
int rowCount (const QModelIndex &parent=QModelIndex()) const override
 
int columnCount (const QModelIndex &parent=QModelIndex()) const override
 
bool moveRows (const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild) override
 
size_t GetNumFavorites ()
 
void EnumerateFavorites (const AZStd::function< void(const AZ::Data::AssetId &assetId)> &callback)
 
QMenu * GetFavoritesMenu ()
 
QModelIndex AddNewFolder (const QModelIndex &parent)
 
void RemoveFavorite (const QModelIndex &indexToRemove)
 
QModelIndex GetModelIndexForParent (const FavoriteData *child) const
 
QModelIndex GetModelIndexForFavorite (const FavoriteData *favorite) const
 
bool IsDescendentOf (QModelIndex index, QModelIndex potentialAncestor)
 
FavoriteDataGetFavoriteDataFromModelIndex (const QModelIndex &modelIndex) const
 
void CountFoldersAndFavoritesFromIndices (const QModelIndexList &indices, int &numFolders, int &numFavorites)
 
int GetNumFavoritesAndFolders ()
 
void ClearAll ()
 
bool HasFavoritesOrFolders () const
 
int ImportFavorites (const QString &importFileName)
 
int ExportFavorites (const QString &exportFileName) const
 
void AddFavorite (const AzToolsFramework::AssetBrowser::ProductAssetBrowserEntry *product, const QModelIndex parent=QModelIndex())
 

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