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

50 lines
1.1 KiB
C++
Raw Normal View History

#ifndef CSV_WORLD_SUBVIEW_H
#define CSV_WORLD_SUBVIEW_H
#include "../../model/world/universalid.hpp"
#include <QDockWidget>
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
{
virtual SubView *makeSubView (const CSMWorld::UniversalId& id, CSMWorld::Data& data) = 0;
};
template<class SubViewT>
struct SubViewFactory : public SubViewFactoryBase
{
virtual SubView *makeSubView (const CSMWorld::UniversalId& id, CSMWorld::Data& data);
};
template<class SubViewT>
SubView *SubViewFactory<SubViewT>::makeSubView (const CSMWorld::UniversalId& id, CSMWorld::Data& data)
{
return new SubViewT (id, data);
}
}
#endif