|
|
|
@ -6,6 +6,8 @@
|
|
|
|
|
|
|
|
|
|
#include "../../model/tools/reportmodel.hpp"
|
|
|
|
|
|
|
|
|
|
#include "../../view/world/idtypedelegate.hpp"
|
|
|
|
|
|
|
|
|
|
CSVTools::ReportSubView::ReportSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document)
|
|
|
|
|
: CSVDoc::SubView (id), mModel (document.getReport (id))
|
|
|
|
|
{
|
|
|
|
@ -18,6 +20,11 @@ CSVTools::ReportSubView::ReportSubView (const CSMWorld::UniversalId& id, CSMDoc:
|
|
|
|
|
mTable->setSelectionBehavior (QAbstractItemView::SelectRows);
|
|
|
|
|
mTable->setSelectionMode (QAbstractItemView::ExtendedSelection);
|
|
|
|
|
|
|
|
|
|
mIdTypeDelegate = CSVWorld::IdTypeDelegateFactory().makeDelegate (
|
|
|
|
|
document.getUndoStack(), this);
|
|
|
|
|
|
|
|
|
|
mTable->setItemDelegateForColumn (0, mIdTypeDelegate);
|
|
|
|
|
|
|
|
|
|
connect (mTable, SIGNAL (doubleClicked (const QModelIndex&)), this, SLOT (show (const QModelIndex&)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -26,6 +33,11 @@ void CSVTools::ReportSubView::setEditLock (bool locked)
|
|
|
|
|
// ignored. We don't change document state anyway.
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CSVTools::ReportSubView::updateEditorSetting (const QString& key, const QString& value)
|
|
|
|
|
{
|
|
|
|
|
mIdTypeDelegate->updateEditorSetting (key, value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CSVTools::ReportSubView::show (const QModelIndex& index)
|
|
|
|
|
{
|
|
|
|
|
focusId (mModel->getUniversalId (index.row()));
|
|
|
|
|