openmw-tes3coop/apps/opencs/view/world/tablesubview.cpp

30 lines
788 B
C++

#include "tablesubview.hpp"
#include "../../model/doc/document.hpp"
#include "table.hpp"
CSVWorld::TableSubView::TableSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document,
bool createAndDelete)
: SubView (id)
{
setWidget (mTable = new Table (id, document.getData(), document.getUndoStack(), createAndDelete));
connect (mTable, SIGNAL (editRequest (int)), this, SLOT (editRequest (int)));
}
void CSVWorld::TableSubView::setEditLock (bool locked)
{
mTable->setEditLock (locked);
}
void CSVWorld::TableSubView::editRequest (int row)
{
focusId (mTable->getUniversalId (row));
}
void CSVWorld::TableSubView::updateEditorSetting(const QString &settingName, const QString &settingValue)
{
mTable->updateEditorSetting(settingName, settingValue);
}