diff --git a/Code/Editor/Include/IEditorClassFactory.h b/Code/Editor/Include/IEditorClassFactory.h index 6c85192436..82422799cf 100644 --- a/Code/Editor/Include/IEditorClassFactory.h +++ b/Code/Editor/Include/IEditorClassFactory.h @@ -135,9 +135,6 @@ struct IClassDesc ////////////////////////////////////////////////////////////////////////// }; - -struct IViewPaneClass; - struct CRYEDIT_API IEditorClassFactory { public: @@ -149,7 +146,6 @@ public: virtual IClassDesc* FindClass(const char* pClassName) const = 0; //! Find class in the factory by class id virtual IClassDesc* FindClass(const GUID& rClassID) const = 0; - virtual IViewPaneClass* FindViewPaneClassByTitle(const char* pPaneTitle) const = 0; virtual void UnregisterClass(const char* pClassName) = 0; virtual void UnregisterClass(const GUID& rClassID) = 0; //! Get classes that matching specific requirements. diff --git a/Code/Editor/Include/IViewPane.h b/Code/Editor/Include/IViewPane.h deleted file mode 100644 index f2425fb954..0000000000 --- a/Code/Editor/Include/IViewPane.h +++ /dev/null @@ -1,74 +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 - * - */ - - -#ifndef CRYINCLUDE_EDITOR_INCLUDE_IVIEWPANE_H -#define CRYINCLUDE_EDITOR_INCLUDE_IVIEWPANE_H -#pragma once - -#include "IEditorClassFactory.h" - -#include - -class QWidget; -class QRect; - -struct IViewPaneClass - : public IClassDesc -{ - DEFINE_UUID(0x7E13EC7C, 0xF621, 0x4aeb, 0xB6, 0x42, 0x67, 0xD7, 0x8E, 0xD4, 0x68, 0xF8) - - enum EDockingDirection - { - DOCK_TOP, - DOCK_LEFT, - DOCK_RIGHT, - DOCK_BOTTOM, - DOCK_FLOAT, - }; - - virtual ~IViewPaneClass() = default; - - // Return text for view pane title. - virtual QString GetPaneTitle() = 0; - - // Return the string resource ID for the title's text. - virtual unsigned int GetPaneTitleID() const = 0; - - // Return preferable initial docking position for pane. - virtual EDockingDirection GetDockingDirection() = 0; - - // Initial pane size. - virtual QRect GetPaneRect() = 0; - - // Get Minimal view size - virtual QSize GetMinSize() { return QSize(0, 0); } - - // Return true if only one pane at a time of time view class can be created. - virtual bool SinglePane() = 0; - - // Return true if the view window wants to get ID_IDLE_UPDATE commands. - virtual bool WantIdleUpdate() = 0; - - ////////////////////////////////////////////////////////////////////////// - // IUnknown - ////////////////////////////////////////////////////////////////////////// - HRESULT STDMETHODCALLTYPE QueryInterface(const IID& riid, void** ppvObj) - { - if (riid == __az_uuidof(IViewPaneClass)) - { - *ppvObj = this; - return S_OK; - } - return E_NOINTERFACE; - } - ////////////////////////////////////////////////////////////////////////// - -}; - -#endif // CRYINCLUDE_EDITOR_INCLUDE_IVIEWPANE_H diff --git a/Code/Editor/Plugin.cpp b/Code/Editor/Plugin.cpp index 16c386e31c..fd70cc282d 100644 --- a/Code/Editor/Plugin.cpp +++ b/Code/Editor/Plugin.cpp @@ -11,9 +11,6 @@ #include "Plugin.h" -// Editor -#include "Include/IViewPane.h" - #include CClassFactory* CClassFactory::s_pInstance = nullptr; @@ -149,23 +146,6 @@ IClassDesc* CClassFactory::FindClass(const GUID& rClassID) const return pClassDesc; } -IViewPaneClass* CClassFactory::FindViewPaneClassByTitle(const char* pPaneTitle) const -{ - for (size_t i = 0; i < m_classes.size(); i++) - { - IViewPaneClass* viewPane = nullptr; - IClassDesc* desc = m_classes[i]; - if (SUCCEEDED(desc->QueryInterface(__az_uuidof(IViewPaneClass), (void**)&viewPane))) - { - if (QString::compare(viewPane->GetPaneTitle(), pPaneTitle) == 0) - { - return viewPane; - } - } - } - return nullptr; -} - void CClassFactory::UnregisterClass(const char* pClassName) { IClassDesc* pClassDesc = FindClass(pClassName); diff --git a/Code/Editor/Plugin.h b/Code/Editor/Plugin.h index 5fa45ac140..7a6e2f8995 100644 --- a/Code/Editor/Plugin.h +++ b/Code/Editor/Plugin.h @@ -71,8 +71,6 @@ public: IClassDesc* FindClass(const char* className) const; //! Find class in the factory by class ID IClassDesc* FindClass(const GUID& rClassID) const; - //! Find View Pane Class in the factory by pane title - IViewPaneClass* FindViewPaneClassByTitle(const char* pPaneTitle) const; void UnregisterClass(const char* pClassName); void UnregisterClass(const GUID& rClassID); //! Get classes matching specific requirements ordered alphabetically by name. @@ -135,10 +133,4 @@ public: #define REGISTER_CLASS_DESC(ClassDesc) \ CAutoRegisterClassHelper g_AutoRegHelper##ClassDesc(new ClassDesc); -#define REGISTER_QT_CLASS_DESC(ClassDesc, name, category) \ - CAutoRegisterClassHelper g_AutoRegHelper##ClassDesc(new CQtViewClass(name, category)); - -#define REGISTER_QT_CLASS_DESC_SYSTEM_ID(ClassDesc, name, category, systemid) \ - CAutoRegisterClassHelper g_AutoRegHelper##ClassDesc(new CQtViewClass(name, category, systemid)); - #endif // CRYINCLUDE_EDITOR_PLUGIN_H diff --git a/Code/Editor/QtViewPane.h b/Code/Editor/QtViewPane.h index 194dd8919a..7d7dd04459 100644 --- a/Code/Editor/QtViewPane.h +++ b/Code/Editor/QtViewPane.h @@ -13,7 +13,6 @@ #include "IEditor.h" #include "Include/IEditorClassFactory.h" -#include "Include/IViewPane.h" #include "Include/ObjectEvent.h" #include "Objects/ClassDesc.h" @@ -107,43 +106,4 @@ public: } }; -template -class CQtViewClass - : public IViewPaneClass -{ -public: - const char* m_name; - const char* m_category; - ESystemClassID m_classId; - - CQtViewClass(const char* name, const char* category, ESystemClassID classId = ESYSTEM_CLASS_VIEWPANE) - : m_name(name) - , m_category(category) - , m_classId(classId) - { - } - - ESystemClassID SystemClassID() override { return m_classId; }; - static const GUID& GetClassID() - { - return TWidget::GetClassID(); - } - - const GUID& ClassID() override - { - return GetClassID(); - } - QString ClassName() override { return m_name; }; - QString Category() override { return m_category; }; - - QObject* CreateQObject() const override { return new TWidget(); }; - QString GetPaneTitle() override { return m_name; }; - unsigned int GetPaneTitleID() const override { return 0; }; - EDockingDirection GetDockingDirection() override { return DOCK_FLOAT; }; - QRect GetPaneRect() override { return {}; /* KDAB_TODO: ;m_sizeOptions.m_paneRect; */}; - bool SinglePane() override { return false; }; - bool WantIdleUpdate() override { return true; }; - QSize GetMinSize() override { return {}; /*return m_sizeOptions.m_minSize;*/ } -}; - #endif // CRYINCLUDE_EDITORCOMMON_QTVIEWPANE_H diff --git a/Code/Editor/QtViewPaneManager.h b/Code/Editor/QtViewPaneManager.h index 0515ae726e..5f65958592 100644 --- a/Code/Editor/QtViewPaneManager.h +++ b/Code/Editor/QtViewPaneManager.h @@ -269,14 +269,6 @@ bool RegisterQtViewPaneWithName([[maybe_unused]] IEditor* editor, const QString& return true; } -template -void UnregisterQtViewPane() -{ - // always close any views that the pane is responsible for before you remove it! - GetIEditor()->CloseView(CQtViewClass::GetClassID()); - GetIEditor()->GetClassFactory()->UnregisterClass(CQtViewClass::GetClassID()); -} - template TWidget* FindViewPane(const QString& name) { diff --git a/Code/Editor/TrackView/2DBezierKeyUIControls.cpp b/Code/Editor/TrackView/2DBezierKeyUIControls.cpp index 81cd151373..24f2633eb9 100644 --- a/Code/Editor/TrackView/2DBezierKeyUIControls.cpp +++ b/Code/Editor/TrackView/2DBezierKeyUIControls.cpp @@ -143,5 +143,3 @@ void C2DBezierKeyUIControls::OnUIChange(IVariable* pVar, CTrackViewKeyBundle& se } } } - -REGISTER_QT_CLASS_DESC(C2DBezierKeyUIControls, "TrackView.KeyUI.2DBezier", "TrackViewKeyUI"); diff --git a/Code/Editor/TrackView/AssetBlendKeyUIControls.cpp b/Code/Editor/TrackView/AssetBlendKeyUIControls.cpp index 038a9d9780..d90f63ee24 100644 --- a/Code/Editor/TrackView/AssetBlendKeyUIControls.cpp +++ b/Code/Editor/TrackView/AssetBlendKeyUIControls.cpp @@ -220,5 +220,3 @@ void CAssetBlendKeyUIControls::OnUIChange(IVariable* pVar, CTrackViewKeyBundle& } } } - -REGISTER_QT_CLASS_DESC(CAssetBlendKeyUIControls, "TrackView.KeyUI.AssetBlends", "TrackViewKeyUI"); diff --git a/Code/Editor/TrackView/CaptureKeyUIControls.cpp b/Code/Editor/TrackView/CaptureKeyUIControls.cpp index e6d88a6cd6..89d55f0a2b 100644 --- a/Code/Editor/TrackView/CaptureKeyUIControls.cpp +++ b/Code/Editor/TrackView/CaptureKeyUIControls.cpp @@ -143,5 +143,3 @@ void CCaptureKeyUIControls::OnUIChange(IVariable* pVar, CTrackViewKeyBundle& sel } } } - -REGISTER_QT_CLASS_DESC(CCaptureKeyUIControls, "TrackView.KeyUI.Capture", "TrackViewKeyUI"); diff --git a/Code/Editor/TrackView/CommentKeyUIControls.cpp b/Code/Editor/TrackView/CommentKeyUIControls.cpp index 6b52efd8f1..e4d7183d5e 100644 --- a/Code/Editor/TrackView/CommentKeyUIControls.cpp +++ b/Code/Editor/TrackView/CommentKeyUIControls.cpp @@ -169,5 +169,3 @@ void CCommentKeyUIControls::OnUIChange(IVariable* pVar, CTrackViewKeyBundle& sel } } } - -REGISTER_QT_CLASS_DESC(CCommentKeyUIControls, "TrackView.KeyUI.Comment", "TrackViewKeyUI"); diff --git a/Code/Editor/TrackView/ConsoleKeyUIControls.cpp b/Code/Editor/TrackView/ConsoleKeyUIControls.cpp index 7bf23e0b52..f3ed919393 100644 --- a/Code/Editor/TrackView/ConsoleKeyUIControls.cpp +++ b/Code/Editor/TrackView/ConsoleKeyUIControls.cpp @@ -118,5 +118,3 @@ void CConsoleKeyUIControls::OnUIChange(IVariable* pVar, CTrackViewKeyBundle& sel } } } - -REGISTER_QT_CLASS_DESC(CConsoleKeyUIControls, "TrackView.KeyUI.Console", "TrackViewKeyUI"); diff --git a/Code/Editor/TrackView/EventKeyUIControls.cpp b/Code/Editor/TrackView/EventKeyUIControls.cpp index 56b16d7c02..b8c737fa6a 100644 --- a/Code/Editor/TrackView/EventKeyUIControls.cpp +++ b/Code/Editor/TrackView/EventKeyUIControls.cpp @@ -149,5 +149,3 @@ void CEventKeyUIControls::OnUIChange(IVariable* pVar, CTrackViewKeyBundle& selec } } } - -REGISTER_QT_CLASS_DESC(CEventKeyUIControls, "TrackView.KeyUI.Event", "TrackViewKeyUI"); diff --git a/Code/Editor/TrackView/GotoKeyUIControls.cpp b/Code/Editor/TrackView/GotoKeyUIControls.cpp index c48ce4c5ad..a2767e9d4f 100644 --- a/Code/Editor/TrackView/GotoKeyUIControls.cpp +++ b/Code/Editor/TrackView/GotoKeyUIControls.cpp @@ -121,5 +121,3 @@ void CGotoKeyUIControls::OnUIChange(IVariable* pVar, CTrackViewKeyBundle& select } } } - -REGISTER_QT_CLASS_DESC(CGotoKeyUIControls, "TrackView.KeyUI.Goto", "TrackViewKeyUI"); diff --git a/Code/Editor/TrackView/ScreenFaderKeyUIControls.cpp b/Code/Editor/TrackView/ScreenFaderKeyUIControls.cpp index d8b3a2bdf7..b3f971bce0 100644 --- a/Code/Editor/TrackView/ScreenFaderKeyUIControls.cpp +++ b/Code/Editor/TrackView/ScreenFaderKeyUIControls.cpp @@ -167,5 +167,3 @@ void CScreenFaderKeyUIControls::OnUIChange(IVariable* pVar, CTrackViewKeyBundle& } } } - -REGISTER_QT_CLASS_DESC(CScreenFaderKeyUIControls, "TrackView.KeyUI.ScreenFader", "TrackViewKeyUI"); diff --git a/Code/Editor/TrackView/SelectKeyUIControls.cpp b/Code/Editor/TrackView/SelectKeyUIControls.cpp index d12f449c73..81af5f8c8c 100644 --- a/Code/Editor/TrackView/SelectKeyUIControls.cpp +++ b/Code/Editor/TrackView/SelectKeyUIControls.cpp @@ -269,5 +269,3 @@ void CSelectKeyUIControls::ResetCameraEntries() OnCameraAdded(cameraComponentEntities.values[i]); } } - -REGISTER_QT_CLASS_DESC(CSelectKeyUIControls, "TrackView.KeyUI.Select", "TrackViewKeyUI"); diff --git a/Code/Editor/TrackView/SequenceKeyUIControls.cpp b/Code/Editor/TrackView/SequenceKeyUIControls.cpp index 4199563e10..21c654ecc2 100644 --- a/Code/Editor/TrackView/SequenceKeyUIControls.cpp +++ b/Code/Editor/TrackView/SequenceKeyUIControls.cpp @@ -215,5 +215,3 @@ void CSequenceKeyUIControls::OnUIChange(IVariable* pVar, CTrackViewKeyBundle& se } } } - -REGISTER_QT_CLASS_DESC(CSequenceKeyUIControls, "TrackView.KeyUI.Sequence", "TrackViewKeyUI"); diff --git a/Code/Editor/TrackView/SoundKeyUIControls.cpp b/Code/Editor/TrackView/SoundKeyUIControls.cpp index f001937e82..2ea41077c4 100644 --- a/Code/Editor/TrackView/SoundKeyUIControls.cpp +++ b/Code/Editor/TrackView/SoundKeyUIControls.cpp @@ -127,5 +127,3 @@ void CSoundKeyUIControls::OnUIChange(IVariable* pVar, CTrackViewKeyBundle& selec } } } - -REGISTER_QT_CLASS_DESC(CSoundKeyUIControls, "TrackView.KeyUI.Sound", "TrackViewKeyUI"); diff --git a/Code/Editor/TrackView/TimeRangeKeyUIControls.cpp b/Code/Editor/TrackView/TimeRangeKeyUIControls.cpp index e35c18329b..11e20d854b 100644 --- a/Code/Editor/TrackView/TimeRangeKeyUIControls.cpp +++ b/Code/Editor/TrackView/TimeRangeKeyUIControls.cpp @@ -122,5 +122,3 @@ void CTimeRangeKeyUIControls::OnUIChange(IVariable* pVar, CTrackViewKeyBundle& s } } } - -REGISTER_QT_CLASS_DESC(CTimeRangeKeyUIControls, "TrackView.KeyUI.TimeRange", "TrackViewKeyUI"); diff --git a/Code/Editor/TrackView/TrackEventKeyUIControls.cpp b/Code/Editor/TrackView/TrackEventKeyUIControls.cpp index 035087733b..835636c080 100644 --- a/Code/Editor/TrackView/TrackEventKeyUIControls.cpp +++ b/Code/Editor/TrackView/TrackEventKeyUIControls.cpp @@ -235,5 +235,3 @@ void CTrackEventKeyUIControls::BuildEventDropDown(QString& curEvent, const QStri } } } - -REGISTER_QT_CLASS_DESC(CTrackEventKeyUIControls, "TrackView.KeyUI.TrackEvent", "TrackViewKeyUI"); diff --git a/Code/Editor/ViewManager.h b/Code/Editor/ViewManager.h index 5b84efd197..f67fb19bcb 100644 --- a/Code/Editor/ViewManager.h +++ b/Code/Editor/ViewManager.h @@ -17,7 +17,6 @@ #include "Cry_Geo.h" #include "Viewport.h" -#include "Include/IViewPane.h" #include "QtViewPaneManager.h" // forward declaration. class CLayoutWnd; diff --git a/Code/Editor/editor_lib_files.cmake b/Code/Editor/editor_lib_files.cmake index 5d45bbd853..17f6b0b2f4 100644 --- a/Code/Editor/editor_lib_files.cmake +++ b/Code/Editor/editor_lib_files.cmake @@ -283,7 +283,6 @@ set(FILES Include/IPreferencesPage.h Include/ISourceControl.h Include/ITransformManipulator.h - Include/IViewPane.h Include/ObjectEvent.h Util/AffineParts.cpp Objects/BaseObject.cpp diff --git a/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorPlugin.cpp b/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorPlugin.cpp index f3d5a03ffc..209df2fa69 100644 --- a/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorPlugin.cpp +++ b/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorPlugin.cpp @@ -63,7 +63,6 @@ CAudioControlsEditorPlugin::~CAudioControlsEditorPlugin() //-----------------------------------------------------------------------------------------------// void CAudioControlsEditorPlugin::Release() { - UnregisterQtViewPane(); // clear connections before releasing the implementation since they hold pointers to data // instantiated from the implementation dll. CUndoSuspend suspendUndo; @@ -198,15 +197,3 @@ CImplementationManager* CAudioControlsEditorPlugin::GetImplementationManager() { return &ms_implementationManager; } - -//-----------------------------------------------------------------------------------------------// -template<> -REFGUID CQtViewClass::GetClassID() -{ - // {82AD1635-38A6-4642-A801-EAB7A829411B} - static const GUID guid = - { - 0x82AD1635, 0x38A6, 0x4642, { 0xA8, 0x01, 0xEA, 0xB7, 0xA8, 0x29, 0x41, 0x1B } - }; - return guid; -} diff --git a/Gems/LyShine/Code/Editor/Animation/UiAnimViewDialog.cpp b/Gems/LyShine/Code/Editor/Animation/UiAnimViewDialog.cpp index 9ad9a50aa5..27c5eac38e 100644 --- a/Gems/LyShine/Code/Editor/Animation/UiAnimViewDialog.cpp +++ b/Gems/LyShine/Code/Editor/Animation/UiAnimViewDialog.cpp @@ -37,7 +37,6 @@ #include "Objects/EntityObject.h" -#include "IViewPane.h" #include "PluginManager.h" #include "Util/3DConnexionDriver.h" #include "UiAnimViewNewSequenceDialog.h"