c6ba1ef064
• This change is partially to unblock physics tool prototyping. It introduces a tool ID that is passed down into systems and acts as a context for document, window, and other systems and buses. • The document system component is no longer a component. It is just a system class that can be constructed with a tool ID. Internally, it will connect to its buses and be addressable by tool ID. More than one can be instantiated, each with a unique tool ID. • These changes are still backward compatible because most of the buses were using broadcast for standalone applications. All of those calls have been updated but not all of the scripts, which should still work as is. • Got rid of the window factory request bus in favor of just instantiating the main window or any other UI in the application layer. • Fixed a couple of bugs that were discovered while making these changes. Signed-off-by: Guthrie Adams <guthadam@amazon.com>
42 lines
1.5 KiB
C++
42 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 <Atom/RPI.Edit/Shader/ShaderVariantListSourceData.h>
|
|
#include <Atom/RPI.Public/Shader/Shader.h>
|
|
#include <AtomToolsFramework/Document/AtomToolsDocumentMainWindow.h>
|
|
|
|
AZ_PUSH_DISABLE_WARNING(4251 4800, "-Wunknown-warning-option") // disable warnings spawned by QT
|
|
#include <QStandardItemModel>
|
|
AZ_POP_DISABLE_WARNING
|
|
#endif
|
|
|
|
namespace ShaderManagementConsole
|
|
{
|
|
//! ShaderManagementConsoleWindow is the main class. Its responsibility is limited to initializing and connecting
|
|
//! its panels, managing selection of assets, and performing high-level actions like saving. It contains...
|
|
class ShaderManagementConsoleWindow
|
|
: public AtomToolsFramework::AtomToolsDocumentMainWindow
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
AZ_CLASS_ALLOCATOR(ShaderManagementConsoleWindow, AZ::SystemAllocator, 0);
|
|
|
|
using Base = AtomToolsFramework::AtomToolsDocumentMainWindow;
|
|
|
|
ShaderManagementConsoleWindow(const AZ::Crc32& toolId, QWidget* parent = 0);
|
|
~ShaderManagementConsoleWindow() = default;
|
|
|
|
protected:
|
|
bool GetOpenDocumentParams(AZStd::string& openPath) override;
|
|
QWidget* CreateDocumentTabView(const AZ::Uuid& documentId) override;
|
|
};
|
|
} // namespace ShaderManagementConsole
|