Adds Download status info UI to Gem Catalog (#4602)
* Adds Download status info UI to Gem Catalog Signed-off-by: nggieber <nggieber@amazon.com> * Removed test code Signed-off-by: nggieber <nggieber@amazon.com> * Remove unused variable Signed-off-by: nggieber <nggieber@amazon.com> * Addressed PR feedback Signed-off-by: nggieber <nggieber@amazon.com> * Fixed Open3DEngine spelling Signed-off-by: nggieber <nggieber@amazon.com>
This commit is contained in:
@@ -48,6 +48,7 @@ namespace O3DE::ProjectManager
|
||||
item->setData(gemInfo.m_features, RoleFeatures);
|
||||
item->setData(gemInfo.m_path, RolePath);
|
||||
item->setData(gemInfo.m_requirement, RoleRequirement);
|
||||
item->setData(gemInfo.m_downloadStatus, RoleDownloadStatus);
|
||||
|
||||
appendRow(item);
|
||||
|
||||
@@ -132,6 +133,11 @@ namespace O3DE::ProjectManager
|
||||
return static_cast<GemInfo::Types>(modelIndex.data(RoleTypes).toInt());
|
||||
}
|
||||
|
||||
GemInfo::DownloadStatus GemModel::GetDownloadStatus(const QModelIndex& modelIndex)
|
||||
{
|
||||
return static_cast<GemInfo::DownloadStatus>(modelIndex.data(RoleDownloadStatus).toInt());
|
||||
}
|
||||
|
||||
QString GemModel::GetSummary(const QModelIndex& modelIndex)
|
||||
{
|
||||
return modelIndex.data(RoleSummary).toString();
|
||||
@@ -373,6 +379,11 @@ namespace O3DE::ProjectManager
|
||||
return previouslyAdded && !added;
|
||||
}
|
||||
|
||||
void GemModel::SetDownloadStatus(QAbstractItemModel& model, const QModelIndex& modelIndex, GemInfo::DownloadStatus status)
|
||||
{
|
||||
model.setData(modelIndex, status, RoleDownloadStatus);
|
||||
}
|
||||
|
||||
bool GemModel::HasRequirement(const QModelIndex& modelIndex)
|
||||
{
|
||||
return !modelIndex.data(RoleRequirement).toString().isEmpty();
|
||||
|
||||
Reference in New Issue
Block a user