Removed unused IViewPane Editor class
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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 <QSize>
|
||||
|
||||
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
|
||||
@@ -11,9 +11,6 @@
|
||||
|
||||
#include "Plugin.h"
|
||||
|
||||
// Editor
|
||||
#include "Include/IViewPane.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
|
||||
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);
|
||||
|
||||
@@ -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<ClassDesc>(name, category));
|
||||
|
||||
#define REGISTER_QT_CLASS_DESC_SYSTEM_ID(ClassDesc, name, category, systemid) \
|
||||
CAutoRegisterClassHelper g_AutoRegHelper##ClassDesc(new CQtViewClass<ClassDesc>(name, category, systemid));
|
||||
|
||||
#endif // CRYINCLUDE_EDITOR_PLUGIN_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 TWidget>
|
||||
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
|
||||
|
||||
@@ -269,14 +269,6 @@ bool RegisterQtViewPaneWithName([[maybe_unused]] IEditor* editor, const QString&
|
||||
return true;
|
||||
}
|
||||
|
||||
template<class TWidget>
|
||||
void UnregisterQtViewPane()
|
||||
{
|
||||
// always close any views that the pane is responsible for before you remove it!
|
||||
GetIEditor()->CloseView(CQtViewClass<TWidget>::GetClassID());
|
||||
GetIEditor()->GetClassFactory()->UnregisterClass(CQtViewClass<TWidget>::GetClassID());
|
||||
}
|
||||
|
||||
template<typename TWidget>
|
||||
TWidget* FindViewPane(const QString& name)
|
||||
{
|
||||
|
||||
@@ -143,5 +143,3 @@ void C2DBezierKeyUIControls::OnUIChange(IVariable* pVar, CTrackViewKeyBundle& se
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_QT_CLASS_DESC(C2DBezierKeyUIControls, "TrackView.KeyUI.2DBezier", "TrackViewKeyUI");
|
||||
|
||||
@@ -220,5 +220,3 @@ void CAssetBlendKeyUIControls::OnUIChange(IVariable* pVar, CTrackViewKeyBundle&
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_QT_CLASS_DESC(CAssetBlendKeyUIControls, "TrackView.KeyUI.AssetBlends", "TrackViewKeyUI");
|
||||
|
||||
@@ -143,5 +143,3 @@ void CCaptureKeyUIControls::OnUIChange(IVariable* pVar, CTrackViewKeyBundle& sel
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_QT_CLASS_DESC(CCaptureKeyUIControls, "TrackView.KeyUI.Capture", "TrackViewKeyUI");
|
||||
|
||||
@@ -169,5 +169,3 @@ void CCommentKeyUIControls::OnUIChange(IVariable* pVar, CTrackViewKeyBundle& sel
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_QT_CLASS_DESC(CCommentKeyUIControls, "TrackView.KeyUI.Comment", "TrackViewKeyUI");
|
||||
|
||||
@@ -118,5 +118,3 @@ void CConsoleKeyUIControls::OnUIChange(IVariable* pVar, CTrackViewKeyBundle& sel
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_QT_CLASS_DESC(CConsoleKeyUIControls, "TrackView.KeyUI.Console", "TrackViewKeyUI");
|
||||
|
||||
@@ -149,5 +149,3 @@ void CEventKeyUIControls::OnUIChange(IVariable* pVar, CTrackViewKeyBundle& selec
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_QT_CLASS_DESC(CEventKeyUIControls, "TrackView.KeyUI.Event", "TrackViewKeyUI");
|
||||
|
||||
@@ -121,5 +121,3 @@ void CGotoKeyUIControls::OnUIChange(IVariable* pVar, CTrackViewKeyBundle& select
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_QT_CLASS_DESC(CGotoKeyUIControls, "TrackView.KeyUI.Goto", "TrackViewKeyUI");
|
||||
|
||||
@@ -167,5 +167,3 @@ void CScreenFaderKeyUIControls::OnUIChange(IVariable* pVar, CTrackViewKeyBundle&
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_QT_CLASS_DESC(CScreenFaderKeyUIControls, "TrackView.KeyUI.ScreenFader", "TrackViewKeyUI");
|
||||
|
||||
@@ -269,5 +269,3 @@ void CSelectKeyUIControls::ResetCameraEntries()
|
||||
OnCameraAdded(cameraComponentEntities.values[i]);
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_QT_CLASS_DESC(CSelectKeyUIControls, "TrackView.KeyUI.Select", "TrackViewKeyUI");
|
||||
|
||||
@@ -215,5 +215,3 @@ void CSequenceKeyUIControls::OnUIChange(IVariable* pVar, CTrackViewKeyBundle& se
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_QT_CLASS_DESC(CSequenceKeyUIControls, "TrackView.KeyUI.Sequence", "TrackViewKeyUI");
|
||||
|
||||
@@ -127,5 +127,3 @@ void CSoundKeyUIControls::OnUIChange(IVariable* pVar, CTrackViewKeyBundle& selec
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_QT_CLASS_DESC(CSoundKeyUIControls, "TrackView.KeyUI.Sound", "TrackViewKeyUI");
|
||||
|
||||
@@ -122,5 +122,3 @@ void CTimeRangeKeyUIControls::OnUIChange(IVariable* pVar, CTrackViewKeyBundle& s
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_QT_CLASS_DESC(CTimeRangeKeyUIControls, "TrackView.KeyUI.TimeRange", "TrackViewKeyUI");
|
||||
|
||||
@@ -235,5 +235,3 @@ void CTrackEventKeyUIControls::BuildEventDropDown(QString& curEvent, const QStri
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_QT_CLASS_DESC(CTrackEventKeyUIControls, "TrackView.KeyUI.TrackEvent", "TrackViewKeyUI");
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
|
||||
#include "Cry_Geo.h"
|
||||
#include "Viewport.h"
|
||||
#include "Include/IViewPane.h"
|
||||
#include "QtViewPaneManager.h"
|
||||
// forward declaration.
|
||||
class CLayoutWnd;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -63,7 +63,6 @@ CAudioControlsEditorPlugin::~CAudioControlsEditorPlugin()
|
||||
//-----------------------------------------------------------------------------------------------//
|
||||
void CAudioControlsEditorPlugin::Release()
|
||||
{
|
||||
UnregisterQtViewPane<CAudioControlsEditorWindow>();
|
||||
// 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<AudioControls::CAudioControlsEditorWindow>::GetClassID()
|
||||
{
|
||||
// {82AD1635-38A6-4642-A801-EAB7A829411B}
|
||||
static const GUID guid =
|
||||
{
|
||||
0x82AD1635, 0x38A6, 0x4642, { 0xA8, 0x01, 0xEA, 0xB7, 0xA8, 0x29, 0x41, 0x1B }
|
||||
};
|
||||
return guid;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
|
||||
#include "Objects/EntityObject.h"
|
||||
|
||||
#include "IViewPane.h"
|
||||
#include "PluginManager.h"
|
||||
#include "Util/3DConnexionDriver.h"
|
||||
#include "UiAnimViewNewSequenceDialog.h"
|
||||
|
||||
Reference in New Issue
Block a user