turned the global class into a general purpose table subview class
parent
0a8b7602d3
commit
8e93bfa607
@ -1,15 +0,0 @@
|
||||
|
||||
#include "globals.hpp"
|
||||
|
||||
#include "table.hpp"
|
||||
|
||||
CSVWorld::Globals::Globals (const CSMWorld::UniversalId& id, CSMWorld::Data& data, QUndoStack& undoStack)
|
||||
: SubView (id)
|
||||
{
|
||||
setWidget (mTable = new Table (id, data, undoStack, true));
|
||||
}
|
||||
|
||||
void CSVWorld::Globals::setEditLock (bool locked)
|
||||
{
|
||||
mTable->setEditLock (locked);
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
#ifndef CSV_WORLD_GLOBALS_H
|
||||
#define CSV_WORLD_GLOBALS_H
|
||||
|
||||
#include "subview.hpp"
|
||||
|
||||
class QUndoStack;
|
||||
|
||||
namespace CSVWorld
|
||||
{
|
||||
class Table;
|
||||
|
||||
class Globals : public SubView
|
||||
{
|
||||
Table *mTable;
|
||||
|
||||
public:
|
||||
|
||||
Globals (const CSMWorld::UniversalId& id, CSMWorld::Data& data, QUndoStack& undoStack);
|
||||
|
||||
virtual void setEditLock (bool locked);
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,16 @@
|
||||
|
||||
#include "tablesubview.hpp"
|
||||
|
||||
#include "table.hpp"
|
||||
|
||||
CSVWorld::TableSubView::TableSubView (const CSMWorld::UniversalId& id, CSMWorld::Data& data, QUndoStack& undoStack,
|
||||
bool createAndDelete)
|
||||
: SubView (id)
|
||||
{
|
||||
setWidget (mTable = new Table (id, data, undoStack, createAndDelete));
|
||||
}
|
||||
|
||||
void CSVWorld::TableSubView::setEditLock (bool locked)
|
||||
{
|
||||
mTable->setEditLock (locked);
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
#ifndef CSV_WORLD_TABLESUBVIEW_H
|
||||
#define CSV_WORLD_TABLESUBVIEW_H
|
||||
|
||||
#include "subview.hpp"
|
||||
|
||||
class QUndoStack;
|
||||
|
||||
namespace CSVWorld
|
||||
{
|
||||
class Table;
|
||||
|
||||
class TableSubView : public SubView
|
||||
{
|
||||
Table *mTable;
|
||||
|
||||
public:
|
||||
|
||||
TableSubView (const CSMWorld::UniversalId& id, CSMWorld::Data& data, QUndoStack& undoStack,
|
||||
bool createAndDelete);
|
||||
|
||||
virtual void setEditLock (bool locked);
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue