First part of UI feedback for downloading gems

Signed-off-by: AMZN-Phil <pconroy@amazon.com>
This commit is contained in:
AMZN-Phil
2021-10-19 19:48:36 -07:00
parent c8dc309b32
commit 02364b869e
10 changed files with 181 additions and 10 deletions
@@ -21,6 +21,7 @@
#include <QMoveEvent>
#include <QHideEvent>
#include <QVBoxLayout>
#include <O3DEObjectDownloadController.h>
#endif
namespace O3DE::ProjectManager
@@ -31,16 +32,18 @@ namespace O3DE::ProjectManager
Q_OBJECT // AUTOMOC
public:
CartOverlayWidget(GemModel* gemModel, QWidget* parent = nullptr);
CartOverlayWidget(GemModel* gemModel, O3DEObjectDownloadController* downloadController, QWidget* parent = nullptr);
private:
QStringList ConvertFromModelIndices(const QVector<QModelIndex>& gems) const;
using GetTagIndicesCallback = AZStd::function<QVector<QModelIndex>()>;
void CreateGemSection(const QString& singularTitle, const QString& pluralTitle, GetTagIndicesCallback getTagIndices);
void CreateDownloadSection();
QVBoxLayout* m_layout = nullptr;
GemModel* m_gemModel = nullptr;
O3DEObjectDownloadController* m_downloadController = nullptr;
inline constexpr static int s_width = 240;
};
@@ -51,7 +54,7 @@ namespace O3DE::ProjectManager
Q_OBJECT // AUTOMOC
public:
CartButton(GemModel* gemModel, QWidget* parent = nullptr);
CartButton(GemModel* gemModel, O3DEObjectDownloadController* downloadController, QWidget* parent = nullptr);
~CartButton();
void ShowOverlay();
@@ -64,6 +67,7 @@ namespace O3DE::ProjectManager
QLabel* m_countLabel = nullptr;
QPushButton* m_dropDownButton = nullptr;
CartOverlayWidget* m_cartOverlay = nullptr;
O3DEObjectDownloadController* m_downloadController = nullptr;
inline constexpr static int s_iconSize = 24;
inline constexpr static int s_arrowDownIconSize = 8;
@@ -75,7 +79,7 @@ namespace O3DE::ProjectManager
Q_OBJECT // AUTOMOC
public:
explicit GemCatalogHeaderWidget(GemModel* gemModel, GemSortFilterProxyModel* filterProxyModel, QWidget* parent = nullptr);
explicit GemCatalogHeaderWidget(GemModel* gemModel, GemSortFilterProxyModel* filterProxyModel, O3DEObjectDownloadController* downloadController, QWidget* parent = nullptr);
~GemCatalogHeaderWidget() = default;
void ReinitForProject();