1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-20 21:53:52 +00:00
openmw/apps/opencs/view/world/subview.hpp

54 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;
};
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