Removal of AzQtAppWindow
Signed-off-by: Dayo Lawal <lawalfua@amazon.com>
This commit is contained in:
-29
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <AzQtComponents/Application/Window/AzQtApplicationWindow.h>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
|
||||
namespace AzQtComponents
|
||||
{
|
||||
AzQtApplicationWindow::AzQtApplicationWindow(QWidget* parent /* = 0 */)
|
||||
: AzQtComponents::DockMainWindow(parent)
|
||||
{
|
||||
m_advancedDockManager = new AzQtComponents::FancyDocking(this);
|
||||
|
||||
m_menuBar = new QMenuBar(this);
|
||||
m_menuBar->setObjectName("MenuBar");
|
||||
setMenuBar(m_menuBar);
|
||||
}
|
||||
}
|
||||
|
||||
-56
@@ -1,56 +0,0 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#if !defined(Q_MOC_RUN)
|
||||
#include <AzCore/Memory/SystemAllocator.h>
|
||||
#include <AzCore/std/string/string.h>
|
||||
#include <AzCore/std/containers/vector.h>
|
||||
#include <AzCore/std/containers/unordered_map.h>
|
||||
|
||||
AZ_PUSH_DISABLE_WARNING(4251 4800, "-Wunknown-warning-option") // disable warnings spawned by QT
|
||||
#include <AzQtComponents/Components/DockMainWindow.h>
|
||||
#include <AzQtComponents/Components/FancyDocking.h>
|
||||
#include <AzQtComponents/Components/StyledDockWidget.h>
|
||||
#include <AzQtComponents/Components/Widgets/TabWidget.h>
|
||||
|
||||
#include <QMenuBar>
|
||||
#include <QStatusBar>
|
||||
#include <QToolBar>
|
||||
#include <QVBoxLayout>
|
||||
AZ_POP_DISABLE_WARNING
|
||||
#endif
|
||||
|
||||
namespace AzQtComponents
|
||||
{
|
||||
/**
|
||||
* //! Base class for O3DE Tools Applications Windows. Its responsibility is limited to initializing and connecting
|
||||
* its panels, managing selection of assets, and performing high-level actions like saving. It contains...
|
||||
*/
|
||||
class AZ_QT_COMPONENTS_API AzQtApplicationWindow
|
||||
: public AzQtComponents::DockMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
AzQtApplicationWindow(QWidget* parent);
|
||||
|
||||
protected:
|
||||
virtual void SetupMenu() {};
|
||||
virtual void SetupTabs() {};
|
||||
|
||||
virtual void OpenTabContextMenu() {};
|
||||
|
||||
AzQtComponents::FancyDocking* m_advancedDockManager = nullptr;
|
||||
QMenuBar* m_menuBar = nullptr;
|
||||
};
|
||||
} // namespace ShaderManagementConsole
|
||||
@@ -1,12 +1,8 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
* 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.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
* 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.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ AZ_POP_DISABLE_WARNING
|
||||
namespace MaterialEditor
|
||||
{
|
||||
MaterialEditorWindow::MaterialEditorWindow(QWidget* parent /* = 0 */)
|
||||
: AzQtComponents::AzQtApplicationWindow(parent)
|
||||
: AzQtComponents::DockMainWindow(parent)
|
||||
{
|
||||
resize(1280, 1024);
|
||||
|
||||
@@ -82,6 +82,8 @@ namespace MaterialEditor
|
||||
setWindowTitle(QApplication::applicationName());
|
||||
}
|
||||
|
||||
m_advancedDockManager = new AzQtComponents::FancyDocking(this);
|
||||
|
||||
setObjectName("MaterialEditorWindow");
|
||||
setDockNestingEnabled(true);
|
||||
setCorner(Qt::TopLeftCorner, Qt::LeftDockWidgetArea);
|
||||
@@ -89,6 +91,10 @@ namespace MaterialEditor
|
||||
setCorner(Qt::TopRightCorner, Qt::RightDockWidgetArea);
|
||||
setCorner(Qt::BottomRightCorner, Qt::RightDockWidgetArea);
|
||||
|
||||
m_menuBar = new QMenuBar(this);
|
||||
m_menuBar->setObjectName("MenuBar");
|
||||
setMenuBar(m_menuBar);
|
||||
|
||||
m_toolBar = new MaterialEditorToolBar(this);
|
||||
m_toolBar->setObjectName("ToolBar");
|
||||
addToolBar(m_toolBar);
|
||||
|
||||
@@ -12,11 +12,10 @@
|
||||
#include <Atom/Document/MaterialDocumentNotificationBus.h>
|
||||
|
||||
AZ_PUSH_DISABLE_WARNING(4251 4800, "-Wunknown-warning-option") // disable warnings spawned by QT
|
||||
//#include <AzQtComponents/Components/DockMainWindow.h>
|
||||
#include <AzQtComponents/Components/DockMainWindow.h>
|
||||
#include <AzQtComponents/Components/FancyDocking.h>
|
||||
#include <AzQtComponents/Components/StyledDockWidget.h>
|
||||
#include <AzQtComponents/Components/Widgets/TabWidget.h>
|
||||
#include <AzQtComponents/Application/Window/AzQtApplicationWindow.h>
|
||||
|
||||
#include <Atom/Window/MaterialEditorWindowRequestBus.h>
|
||||
#include <Viewport/MaterialViewportWidget.h>
|
||||
@@ -44,7 +43,7 @@ namespace MaterialEditor
|
||||
* 3) MaterialPropertyInspector - The user edits the properties of the selected Material.
|
||||
*/
|
||||
class MaterialEditorWindow
|
||||
: public AzQtComponents::AzQtApplicationWindow
|
||||
: public AzQtComponents::DockMainWindow
|
||||
, private MaterialEditorWindowRequestBus::Handler
|
||||
, private MaterialDocumentNotificationBus::Handler
|
||||
{
|
||||
@@ -75,8 +74,8 @@ namespace MaterialEditor
|
||||
void OnDocumentUndoStateChanged(const AZ::Uuid& documentId) override;
|
||||
void OnDocumentSaved(const AZ::Uuid& documentId) override;
|
||||
|
||||
void SetupMenu() override;
|
||||
void SetupTabs() override;
|
||||
void SetupMenu();
|
||||
void SetupTabs();
|
||||
|
||||
void AddTabForDocumentId(const AZ::Uuid& documentId);
|
||||
void RemoveTabForDocumentId(const AZ::Uuid& documentId);
|
||||
@@ -84,12 +83,14 @@ namespace MaterialEditor
|
||||
AZ::Uuid GetDocumentIdFromTab(const int tabIndex) const;
|
||||
QString GetDocumentPath(const AZ::Uuid& documentId) const;
|
||||
|
||||
void OpenTabContextMenu() override;
|
||||
void OpenTabContextMenu();
|
||||
void SelectPreviousTab();
|
||||
void SelectNextTab();
|
||||
|
||||
void closeEvent(QCloseEvent* closeEvent) override;
|
||||
|
||||
AzQtComponents::FancyDocking* m_advancedDockManager = nullptr;
|
||||
QMenuBar* m_menuBar = nullptr;
|
||||
QWidget* m_centralWidget = nullptr;
|
||||
AzQtComponents::TabWidget* m_tabWidget = nullptr;
|
||||
MaterialViewportWidget* m_materialViewport = nullptr;
|
||||
|
||||
+7
-1
@@ -37,8 +37,10 @@ AZ_POP_DISABLE_WARNING
|
||||
namespace ShaderManagementConsole
|
||||
{
|
||||
ShaderManagementConsoleWindow::ShaderManagementConsoleWindow(QWidget* parent /* = 0 */)
|
||||
: AzQtComponents::AzQtApplicationWindow(parent)
|
||||
: AzQtComponents::DockMainWindow(parent)
|
||||
{
|
||||
m_advancedDockManager = new AzQtComponents::FancyDocking(this);
|
||||
|
||||
setWindowTitle("Shader Management Console");
|
||||
setObjectName("ShaderManagementConsoleWindow");
|
||||
setDockNestingEnabled(true);
|
||||
@@ -47,6 +49,10 @@ namespace ShaderManagementConsole
|
||||
setCorner(Qt::TopRightCorner, Qt::RightDockWidgetArea);
|
||||
setCorner(Qt::BottomRightCorner, Qt::RightDockWidgetArea);
|
||||
|
||||
m_menuBar = new QMenuBar(this);
|
||||
m_menuBar->setObjectName("MenuBar");
|
||||
setMenuBar(m_menuBar);
|
||||
|
||||
m_toolBar = new ShaderManagementConsoleToolBar(this);
|
||||
m_toolBar->setObjectName("ToolBar");
|
||||
addToolBar(m_toolBar);
|
||||
|
||||
+7
-6
@@ -15,11 +15,10 @@
|
||||
#include <Atom/RPI.Edit/Shader/ShaderVariantListSourceData.h>
|
||||
|
||||
AZ_PUSH_DISABLE_WARNING(4251 4800, "-Wunknown-warning-option") // disable warnings spawned by QT
|
||||
//#include <AzQtComponents/Components/DockMainWindow.h>
|
||||
#include <AzQtComponents/Components/DockMainWindow.h>
|
||||
#include <AzQtComponents/Components/FancyDocking.h>
|
||||
#include <AzQtComponents/Components/StyledDockWidget.h>
|
||||
#include <AzQtComponents/Components/Widgets/TabWidget.h>
|
||||
#include <AzQtComponents/Application/Window/AzQtApplicationWindow.h>
|
||||
|
||||
#include <Window/ShaderManagementConsoleBrowserWidget.h>
|
||||
#include <Window/ToolBar/ShaderManagementConsoleToolBar.h>
|
||||
@@ -42,7 +41,7 @@ namespace ShaderManagementConsole
|
||||
* its panels, managing selection of assets, and performing high-level actions like saving. It contains...
|
||||
*/
|
||||
class ShaderManagementConsoleWindow
|
||||
: public AzQtComponents::AzQtApplicationWindow
|
||||
: public AzQtComponents::DockMainWindow
|
||||
, private ShaderManagementConsoleDocumentNotificationBus::Handler
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -60,15 +59,15 @@ namespace ShaderManagementConsole
|
||||
void OnDocumentUndoStateChanged(const AZ::Uuid& documentId) override;
|
||||
void OnDocumentSaved(const AZ::Uuid& documentId) override;
|
||||
|
||||
void SetupMenu() override;
|
||||
void SetupTabs() override;
|
||||
void SetupMenu();
|
||||
void SetupTabs();
|
||||
|
||||
void AddTabForDocumentId(const AZ::Uuid& documentId);
|
||||
void RemoveTabForDocumentId(const AZ::Uuid& documentId);
|
||||
void UpdateTabForDocumentId(const AZ::Uuid& documentId);
|
||||
AZ::Uuid GetDocumentIdFromTab(const int tabIndex) const;
|
||||
|
||||
void OpenTabContextMenu() override;
|
||||
void OpenTabContextMenu();
|
||||
void SelectPreviousTab();
|
||||
void SelectNextTab();
|
||||
|
||||
@@ -80,6 +79,8 @@ namespace ShaderManagementConsole
|
||||
|
||||
void CreateDocumentContent(const AZ::Uuid& documentId, QStandardItemModel* model);
|
||||
|
||||
AzQtComponents::FancyDocking* m_advancedDockManager = nullptr;
|
||||
QMenuBar* m_menuBar = nullptr;
|
||||
QWidget* m_centralWidget = nullptr;
|
||||
AzQtComponents::TabWidget* m_tabWidget = nullptr;
|
||||
ShaderManagementConsoleBrowserWidget* m_assetBrowser = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user