Files
o3de/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.h
T
Benjamin Jillich 1586c00fc8 [LYN-4929] Correct gems not showing as enabled for a template (#1722)
* When there are multiple project templates present, we re-gather the gems when changing the selected the project template.
* In case the user enabled or disabled any gem and they select a new project template, we show a warning dialog where users can either cancel the operation or proceed to the new project template. The warning dialog will only appear in case the enabled gems actually differ from the currently used template's default.
* New helper function to select the used project template.
* Storing the currently used project template index and only update the template details and emitting the changed event in case the user has actually chosen another template. This avoids emitting signals in case the user clicks on the already selected template.

Signed-off-by: Benjamin Jillich <jillich@amazon.com>
2021-07-01 18:53:17 +02:00

47 lines
1.5 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>
#include <GemCatalog/GemCatalogHeaderWidget.h>
#include <GemCatalog/GemFilterWidget.h>
#include <GemCatalog/GemListView.h>
#include <GemCatalog/GemInspector.h>
#include <GemCatalog/GemModel.h>
#include <GemCatalog/GemSortFilterProxyModel.h>
#endif
namespace O3DE::ProjectManager
{
class GemCatalogScreen
: public ScreenWidget
{
public:
explicit GemCatalogScreen(QWidget* parent = nullptr);
~GemCatalogScreen() = default;
ProjectManagerScreen GetScreenEnum() override;
void ReinitForProject(const QString& projectPath, bool isNewProject);
bool EnableDisableGemsForProject(const QString& projectPath);
GemModel* GetGemModel() const { return m_gemModel; }
private:
void FillModel(const QString& projectPath, bool isNewProject);
GemListView* m_gemListView = nullptr;
GemInspector* m_gemInspector = nullptr;
GemModel* m_gemModel = nullptr;
GemCatalogHeaderWidget* m_headerWidget = nullptr;
GemSortFilterProxyModel* m_proxModel = nullptr;
QVBoxLayout* m_filterWidgetLayout = nullptr;
GemFilterWidget* m_filterWidget = nullptr;
};
} // namespace O3DE::ProjectManager