2009-05-08 13:28:41 +00:00
|
|
|
/*
|
|
|
|
* OpenClonk, http://www.openclonk.org
|
|
|
|
*
|
2013-12-17 20:01:09 +00:00
|
|
|
* Copyright (c) 2007-2009, RedWolf Design GmbH, http://www.clonk.de/
|
2016-04-03 18:18:29 +00:00
|
|
|
* Copyright (c) 2009-2016, The OpenClonk Team and contributors
|
2009-05-08 13:28:41 +00:00
|
|
|
*
|
2013-12-17 20:01:09 +00:00
|
|
|
* Distributed under the terms of the ISC license; see accompanying file
|
|
|
|
* "COPYING" for details.
|
2009-05-08 13:28:41 +00:00
|
|
|
*
|
2013-12-17 20:01:09 +00:00
|
|
|
* "Clonk" is a registered trademark of Matthes Bender, used with permission.
|
|
|
|
* See accompanying file "TRADEMARK" for details.
|
2009-05-08 13:28:41 +00:00
|
|
|
*
|
2013-12-17 20:01:09 +00:00
|
|
|
* To redistribute this file separately, substitute the full license texts
|
|
|
|
* for the above references.
|
2009-05-08 13:28:41 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/* A window listing all objects in the game */
|
|
|
|
|
2016-04-03 18:07:56 +00:00
|
|
|
#include "C4Include.h"
|
|
|
|
#include "editor/C4ObjectListDlg.h"
|
|
|
|
#include "editor/C4Console.h"
|
|
|
|
#include "object/C4Object.h"
|
|
|
|
#include "object/C4GameObjects.h"
|
2016-04-03 19:06:32 +00:00
|
|
|
#include "script/C4Effect.h"
|
2009-05-08 13:28:41 +00:00
|
|
|
|
|
|
|
|
2017-05-03 18:28:00 +00:00
|
|
|
C4ObjectListDlg::C4ObjectListDlg() = default;
|
2009-05-08 13:28:41 +00:00
|
|
|
|
2017-05-03 18:28:00 +00:00
|
|
|
C4ObjectListDlg::~C4ObjectListDlg() = default;
|
2009-05-08 13:28:41 +00:00
|
|
|
|
|
|
|
void C4ObjectListDlg::Execute()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void C4ObjectListDlg::Open()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2016-02-18 05:11:35 +00:00
|
|
|
#ifdef WITH_QT_EDITOR
|
|
|
|
|
2016-04-03 19:06:32 +00:00
|
|
|
#include "editor/C4ConsoleQtObjectListViewer.h"
|
2016-02-18 05:11:35 +00:00
|
|
|
|
|
|
|
void C4ObjectListDlg::Update(C4EditCursorSelection &rSelection)
|
|
|
|
{
|
2016-03-06 18:06:29 +00:00
|
|
|
// Update done through console
|
|
|
|
::Console.OnObjectSelectionChanged(rSelection);
|
2016-02-18 05:11:35 +00:00
|
|
|
}
|
|
|
|
|
2016-02-21 20:56:07 +00:00
|
|
|
// Could do some crazy fine-grained updates. But updating is cheap enough...
|
2016-02-18 05:11:35 +00:00
|
|
|
void C4ObjectListDlg::OnObjectRemove(C4ObjectList * pList, C4ObjectLink * pLnk)
|
|
|
|
{
|
2016-10-15 15:14:50 +00:00
|
|
|
if (view_model) view_model->Invalidate();
|
2016-02-18 05:11:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void C4ObjectListDlg::OnObjectAdded(C4ObjectList * pList, C4ObjectLink * pLnk)
|
|
|
|
{
|
|
|
|
if (view_model) view_model->Invalidate();
|
|
|
|
}
|
|
|
|
|
|
|
|
void C4ObjectListDlg::OnObjectRename(C4ObjectList * pList, C4ObjectLink * pLnk)
|
|
|
|
{
|
|
|
|
if (view_model) view_model->Invalidate();
|
|
|
|
}
|
|
|
|
|
2016-02-21 20:56:07 +00:00
|
|
|
void C4ObjectListDlg::OnObjectContainerChanged(C4Object *obj, C4Object *old_container, C4Object *new_container)
|
|
|
|
{
|
|
|
|
if (view_model) view_model->Invalidate();
|
|
|
|
}
|
|
|
|
|
2016-02-18 05:11:35 +00:00
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
void C4ObjectListDlg::Update(C4EditCursorSelection &rSelection)
|
2009-05-08 13:28:41 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void C4ObjectListDlg::OnObjectRemove(C4ObjectList * pList, C4ObjectLink * pLnk)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void C4ObjectListDlg::OnObjectAdded(C4ObjectList * pList, C4ObjectLink * pLnk)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void C4ObjectListDlg::OnObjectRename(C4ObjectList * pList, C4ObjectLink * pLnk)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2016-02-21 20:56:07 +00:00
|
|
|
void C4ObjectListDlg::OnObjectContainerChanged(C4Object *obj, C4Object *old_container, C4Object *new_container)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-02-21 17:34:28 +00:00
|
|
|
#endif // WITH_QT_EDITOR
|
2016-02-18 05:11:35 +00:00
|
|
|
|
2009-05-08 13:28:41 +00:00
|
|
|
|
|
|
|
C4ObjectListChangeListener & ObjectListChangeListener = Console.ObjectListDlg;
|