2012-12-03 22:03:02 +01:00
|
|
|
|
|
|
|
#include "tablesubview.hpp"
|
|
|
|
|
2012-12-11 13:22:43 +01:00
|
|
|
#include "../../model/doc/document.hpp"
|
|
|
|
|
2012-12-03 22:03:02 +01:00
|
|
|
#include "table.hpp"
|
|
|
|
|
2012-12-11 13:22:43 +01:00
|
|
|
CSVWorld::TableSubView::TableSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document,
|
2012-12-03 22:03:02 +01:00
|
|
|
bool createAndDelete)
|
|
|
|
: SubView (id)
|
|
|
|
{
|
2012-12-11 13:22:43 +01:00
|
|
|
setWidget (mTable = new Table (id, document.getData(), document.getUndoStack(), createAndDelete));
|
2012-12-13 13:35:08 +01:00
|
|
|
|
2013-07-21 17:53:39 +02:00
|
|
|
connect (mTable, SIGNAL (editRequest (int)), this, SLOT (editRequest (int)));
|
2012-12-03 22:03:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void CSVWorld::TableSubView::setEditLock (bool locked)
|
|
|
|
{
|
|
|
|
mTable->setEditLock (locked);
|
2012-12-13 13:35:08 +01:00
|
|
|
}
|
|
|
|
|
2013-07-21 17:53:39 +02:00
|
|
|
void CSVWorld::TableSubView::editRequest (int row)
|
2012-12-13 13:35:08 +01:00
|
|
|
{
|
2013-07-21 17:53:39 +02:00
|
|
|
focusId (mTable->getUniversalId (row));
|
2013-06-15 06:40:18 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
void CSVWorld::TableSubView::updateEditorSetting(const QString &settingName, const QString &settingValue)
|
|
|
|
{
|
2013-07-21 17:53:39 +02:00
|
|
|
mTable->updateEditorSetting(settingName, settingValue);
|
2013-06-15 06:40:18 -05:00
|
|
|
}
|