2012-12-03 21:03:02 +00:00
|
|
|
|
|
|
|
#include "tablesubview.hpp"
|
|
|
|
|
2012-12-11 12:22:43 +00:00
|
|
|
#include "../../model/doc/document.hpp"
|
|
|
|
|
2012-12-03 21:03:02 +00:00
|
|
|
#include "table.hpp"
|
|
|
|
|
2012-12-11 12:22:43 +00:00
|
|
|
CSVWorld::TableSubView::TableSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document,
|
2012-12-03 21:03:02 +00:00
|
|
|
bool createAndDelete)
|
|
|
|
: SubView (id)
|
|
|
|
{
|
2012-12-11 12:22:43 +00:00
|
|
|
setWidget (mTable = new Table (id, document.getData(), document.getUndoStack(), createAndDelete));
|
2012-12-13 12:35:08 +00:00
|
|
|
|
|
|
|
connect (mTable, SIGNAL (doubleClicked (const QModelIndex&)), this, SLOT (rowActivated (const QModelIndex&)));
|
2012-12-03 21:03:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void CSVWorld::TableSubView::setEditLock (bool locked)
|
|
|
|
{
|
|
|
|
mTable->setEditLock (locked);
|
2012-12-13 12:35:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void CSVWorld::TableSubView::rowActivated (const QModelIndex& index)
|
|
|
|
{
|
2013-04-09 12:28:31 +00:00
|
|
|
focusId (mTable->getUniversalId (index.row()));
|
2013-06-15 11:40:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void CSVWorld::TableSubView::updateEditorSetting(const QString &settingName, const QString &settingValue)
|
|
|
|
{
|
|
|
|
|
2013-07-11 02:13:59 +00:00
|
|
|
if ( (settingName == "Record Status Display") || settingName == "Referenceable ID Type Display" )
|
2013-06-15 11:40:18 +00:00
|
|
|
mTable->updateEditorSetting(settingName, settingValue);
|
|
|
|
}
|