24086ab394
* Initial mostly working attempt at resizable headers Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com> * Add const and constexpr to variables Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com> * Add header tracking for buttons, display items based on header scrollbar position, fix some spacing issues Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com> * Correct styling for adjustable header, and intending header section and alingned item content with header text Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com> * Prevent header resizing larger than table width. Signed-off-by: Alex Peterson <26804013+AMZN-alexpete@users.noreply.github.com> * Fix resize graphical glitching Signed-off-by: Alex Peterson <26804013+AMZN-alexpete@users.noreply.github.com> * Remove unecessary qss Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com> * Removed necessary headers Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com> * Remove extra nl and old comment Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com> * Address PR feedback Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com> * Removed unused variables Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com> * Change variable to constexpr Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com> * Remove AUTOMOC from headers, set background color of Gem Catalog to 333333 and adjustable header to transparent Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com> * Change to using update instead of repaint when sections are resized Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com> * Change temp directory creation on for gradle Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com> Co-authored-by: Alex Peterson <26804013+AMZN-alexpete@users.noreply.github.com>
73 lines
2.0 KiB
C++
73 lines
2.0 KiB
C++
/*
|
|
* Copyright (c) Contributors to the Open 3D Engine Project.
|
|
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#if !defined(Q_MOC_RUN)
|
|
#include <ScreenWidget.h>
|
|
#endif
|
|
|
|
QT_FORWARD_DECLARE_CLASS(QLabel)
|
|
QT_FORWARD_DECLARE_CLASS(QPushButton)
|
|
QT_FORWARD_DECLARE_CLASS(QHeaderView)
|
|
QT_FORWARD_DECLARE_CLASS(QTableWidget)
|
|
QT_FORWARD_DECLARE_CLASS(QFrame)
|
|
QT_FORWARD_DECLARE_CLASS(QStackedWidget)
|
|
|
|
namespace O3DE::ProjectManager
|
|
{
|
|
QT_FORWARD_DECLARE_CLASS(GemRepoInspector)
|
|
QT_FORWARD_DECLARE_CLASS(GemRepoListView)
|
|
QT_FORWARD_DECLARE_CLASS(GemRepoModel)
|
|
QT_FORWARD_DECLARE_CLASS(AdjustableHeaderWidget)
|
|
|
|
class GemRepoScreen
|
|
: public ScreenWidget
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit GemRepoScreen(QWidget* parent = nullptr);
|
|
~GemRepoScreen() = default;
|
|
ProjectManagerScreen GetScreenEnum() override;
|
|
|
|
void Reinit();
|
|
|
|
GemRepoModel* GetGemRepoModel() const { return m_gemRepoModel; }
|
|
|
|
void NotifyCurrentScreen() override;
|
|
|
|
signals:
|
|
void OnRefresh();
|
|
|
|
public slots:
|
|
void HandleAddRepoButton();
|
|
void HandleRemoveRepoButton(const QModelIndex& modelIndex);
|
|
void HandleRefreshAllButton();
|
|
void HandleRefreshRepoButton(const QModelIndex& modelIndex);
|
|
|
|
|
|
private:
|
|
void FillModel();
|
|
QFrame* CreateNoReposContent();
|
|
QFrame* CreateReposContent();
|
|
|
|
QStackedWidget* m_contentStack = nullptr;
|
|
QFrame* m_noRepoContent;
|
|
QFrame* m_repoContent;
|
|
|
|
AdjustableHeaderWidget* m_gemRepoHeaderTable = nullptr;
|
|
QHeaderView* m_gemRepoListHeader = nullptr;
|
|
GemRepoListView* m_gemRepoListView = nullptr;
|
|
GemRepoInspector* m_gemRepoInspector = nullptr;
|
|
GemRepoModel* m_gemRepoModel = nullptr;
|
|
|
|
QLabel* m_lastAllUpdateLabel;
|
|
QPushButton* m_AllUpdateButton;
|
|
};
|
|
} // namespace O3DE::ProjectManager
|