From 3db71950e864367b423b1018497d2ffb1bf96cb3 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Wed, 5 Jan 2022 19:31:10 -0800 Subject: [PATCH] Removes NewGraphDialog from Gems/ScriptCanvas Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../Code/Editor/SystemComponent.cpp | 1 - .../Editor/View/Dialogs/NewGraphDialog.cpp | 51 --------------- .../Code/Editor/View/Dialogs/NewGraphDialog.h | 42 ------------- .../Editor/View/Dialogs/NewGraphDialog.ui | 63 ------------------- .../Code/scriptcanvasgem_editor_files.cmake | 3 - 5 files changed, 160 deletions(-) delete mode 100644 Gems/ScriptCanvas/Code/Editor/View/Dialogs/NewGraphDialog.cpp delete mode 100644 Gems/ScriptCanvas/Code/Editor/View/Dialogs/NewGraphDialog.h delete mode 100644 Gems/ScriptCanvas/Code/Editor/View/Dialogs/NewGraphDialog.ui diff --git a/Gems/ScriptCanvas/Code/Editor/SystemComponent.cpp b/Gems/ScriptCanvas/Code/Editor/SystemComponent.cpp index 23c127b83b..59c52de05c 100644 --- a/Gems/ScriptCanvas/Code/Editor/SystemComponent.cpp +++ b/Gems/ScriptCanvas/Code/Editor/SystemComponent.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/Gems/ScriptCanvas/Code/Editor/View/Dialogs/NewGraphDialog.cpp b/Gems/ScriptCanvas/Code/Editor/View/Dialogs/NewGraphDialog.cpp deleted file mode 100644 index 402d80fb32..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/View/Dialogs/NewGraphDialog.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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 - * - */ - -#include "NewGraphDialog.h" - -#include -#include - -#include "Editor/View/Dialogs/ui_NewGraphDialog.h" - - - -namespace ScriptCanvasEditor -{ - NewGraphDialog::NewGraphDialog(const QString& title, const QString& text, QWidget* pParent /*=nullptr*/) - : QDialog(pParent) - , ui(new Ui::NewGraphDialog) - , m_text(text) - { - ui->setupUi(this); - - setWindowTitle(title); - - QObject::connect(ui->GraphName, &QLineEdit::returnPressed, this, &NewGraphDialog::OnOK); - QObject::connect(ui->GraphName, &QLineEdit::textChanged, this, &NewGraphDialog::OnTextChanged); - QObject::connect(ui->ok, &QPushButton::clicked, this, &NewGraphDialog::OnOK); - QObject::connect(ui->cancel, &QPushButton::clicked, this, &QDialog::reject); - - ui->ok->setEnabled(false); - } - - void NewGraphDialog::OnTextChanged(const QString& text) - { - ui->ok->setEnabled(!text.isEmpty()); - } - - void NewGraphDialog::OnOK() - { - QString itemName = ui->GraphName->text(); - m_text = itemName.toLocal8Bit().constData(); - - accept(); - } - - #include -} diff --git a/Gems/ScriptCanvas/Code/Editor/View/Dialogs/NewGraphDialog.h b/Gems/ScriptCanvas/Code/Editor/View/Dialogs/NewGraphDialog.h deleted file mode 100644 index de6c2a102f..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/View/Dialogs/NewGraphDialog.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 -#include -#endif - -namespace Ui -{ - class NewGraphDialog; -} - -namespace ScriptCanvasEditor -{ - class NewGraphDialog - : public QDialog - { - Q_OBJECT - - public: - NewGraphDialog(const QString& title, const QString& text, QWidget* pParent = nullptr); - - const QString& GetText() const { return m_text; } - - protected: - - void OnOK(); - void OnTextChanged(const QString& text); - - QString m_text; - - Ui::NewGraphDialog* ui; - }; -} diff --git a/Gems/ScriptCanvas/Code/Editor/View/Dialogs/NewGraphDialog.ui b/Gems/ScriptCanvas/Code/Editor/View/Dialogs/NewGraphDialog.ui deleted file mode 100644 index 89861c0a49..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/View/Dialogs/NewGraphDialog.ui +++ /dev/null @@ -1,63 +0,0 @@ - - - NewGraphDialog - - - - 0 - 0 - 300 - 72 - - - - - - - Name: - - - - - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - - - - - - Qt::Horizontal - - - - 40 - 10 - - - - - - - - OK - - - - - - - Cancel - - - - - - - - - - diff --git a/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_files.cmake b/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_files.cmake index a830ba08ff..51843a8837 100644 --- a/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_files.cmake +++ b/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_files.cmake @@ -125,9 +125,6 @@ set(FILES Editor/Utilities/RecentFiles.cpp Editor/Utilities/RecentAssetPath.h Editor/Utilities/RecentAssetPath.cpp - Editor/View/Dialogs/NewGraphDialog.h - Editor/View/Dialogs/NewGraphDialog.cpp - Editor/View/Dialogs/NewGraphDialog.ui Editor/View/Dialogs/SettingsDialog.h Editor/View/Dialogs/SettingsDialog.cpp Editor/View/Dialogs/SettingsDialog.ui