Browse Source

added edit button to gem inspector. Currently redirects to create gem workflow

Signed-off-by: T.J. Kotha <[email protected]>
T.J. Kotha 2 năm trước cách đây
mục cha
commit
bf49e30dbd

+ 1 - 0
Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.cpp

@@ -96,6 +96,7 @@ namespace O3DE::ProjectManager
         connect(m_gemInspector, &GemInspector::TagClicked, [=](const Tag& tag) { SelectGem(tag.id); });
         connect(m_gemInspector, &GemInspector::TagClicked, [=](const Tag& tag) { SelectGem(tag.id); });
         connect(m_gemInspector, &GemInspector::UpdateGem, this, &GemCatalogScreen::UpdateGem);
         connect(m_gemInspector, &GemInspector::UpdateGem, this, &GemCatalogScreen::UpdateGem);
         connect(m_gemInspector, &GemInspector::UninstallGem, this, &GemCatalogScreen::UninstallGem);
         connect(m_gemInspector, &GemInspector::UninstallGem, this, &GemCatalogScreen::UninstallGem);
+        connect(m_gemInspector, &GemInspector::EditGem, this, &GemCatalogScreen::HandleCreateGem);
 
 
         QWidget* filterWidget = new QWidget(this);
         QWidget* filterWidget = new QWidget(this);
         filterWidget->setFixedWidth(sidePanelWidth);
         filterWidget->setFixedWidth(sidePanelWidth);

+ 7 - 0
Code/Tools/ProjectManager/Source/GemCatalog/GemInspector.cpp

@@ -275,6 +275,13 @@ namespace O3DE::ProjectManager
 
 
         m_mainLayout->addSpacing(10);
         m_mainLayout->addSpacing(10);
 
 
+        m_editGemButton = new QPushButton(tr("Edit Gem"));
+        m_editGemButton->setObjectName("gemCatalogUpdateGemButton");
+        m_mainLayout->addWidget(m_editGemButton);
+        connect(m_editGemButton, &QPushButton::clicked, this , [this]{ emit EditGem(); });
+
+        m_mainLayout->addSpacing(10);
+
         m_uninstallGemButton = new QPushButton(tr("Uninstall Gem"));
         m_uninstallGemButton = new QPushButton(tr("Uninstall Gem"));
         m_uninstallGemButton->setObjectName("gemCatalogUninstallGemButton");
         m_uninstallGemButton->setObjectName("gemCatalogUninstallGemButton");
         m_mainLayout->addWidget(m_uninstallGemButton);
         m_mainLayout->addWidget(m_uninstallGemButton);

+ 2 - 0
Code/Tools/ProjectManager/Source/GemCatalog/GemInspector.h

@@ -48,6 +48,7 @@ namespace O3DE::ProjectManager
         void TagClicked(const Tag& tag);
         void TagClicked(const Tag& tag);
         void UpdateGem(const QModelIndex& modelIndex);
         void UpdateGem(const QModelIndex& modelIndex);
         void UninstallGem(const QModelIndex& modelIndex);
         void UninstallGem(const QModelIndex& modelIndex);
+        void EditGem();
 
 
     private slots:
     private slots:
         void OnSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected);
         void OnSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected);
@@ -85,6 +86,7 @@ namespace O3DE::ProjectManager
         QLabel* m_binarySizeLabel = nullptr;
         QLabel* m_binarySizeLabel = nullptr;
 
 
         QPushButton* m_updateGemButton = nullptr;
         QPushButton* m_updateGemButton = nullptr;
+        QPushButton* m_editGemButton = nullptr;
         QPushButton* m_uninstallGemButton = nullptr;
         QPushButton* m_uninstallGemButton = nullptr;
     };
     };
 } // namespace O3DE::ProjectManager
 } // namespace O3DE::ProjectManager