1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 07:49:56 +00:00
openmw-tes3mp/apps/opencs/view/world/subview.hpp

56 lines
1.2 KiB
C++
Raw Normal View History

#ifndef CSV_WORLD_SUBVIEW_H
#define CSV_WORLD_SUBVIEW_H
#include "../../model/world/universalid.hpp"
#include <QDockWidget>
2012-11-29 15:05:28 +00:00
class QUndoStack;
namespace CSMWorld
{
class Data;
}
namespace CSVWorld
{
class SubView : public QDockWidget
{
Q_OBJECT
CSMWorld::UniversalId mUniversalId;
// not implemented
SubView (const SubView&);
SubView& operator= (SubView&);
public:
SubView (const CSMWorld::UniversalId& id);
CSMWorld::UniversalId getUniversalId() const;
2012-11-30 12:58:10 +00:00
virtual void setEditLock (bool locked) = 0;
};
struct SubViewFactoryBase
{
2012-11-29 15:05:28 +00:00
virtual SubView *makeSubView (const CSMWorld::UniversalId& id, CSMWorld::Data& data, QUndoStack& undoStack)
= 0;
};
template<class SubViewT>
struct SubViewFactory : public SubViewFactoryBase
{
2012-11-29 15:05:28 +00:00
virtual SubView *makeSubView (const CSMWorld::UniversalId& id, CSMWorld::Data& data, QUndoStack& undoStack);
};
template<class SubViewT>
2012-11-29 15:05:28 +00:00
SubView *SubViewFactory<SubViewT>::makeSubView (const CSMWorld::UniversalId& id, CSMWorld::Data& data,
QUndoStack& undoStack)
{
2012-11-29 15:05:28 +00:00
return new SubViewT (id, data, undoStack);
}
}
#endif