|
|
|
@ -198,6 +198,13 @@ CSMWorld::Data::Data (ToUTF8::FromType encoding)
|
|
|
|
|
mCells.addColumn (new FlagColumn<Cell> (Columns::ColumnId_InteriorSky, ESM::Cell::QuasiEx));
|
|
|
|
|
mCells.addColumn (new RegionColumn<Cell>);
|
|
|
|
|
|
|
|
|
|
mEnchantments.addColumn (new StringIdColumn<ESM::Enchantment>);
|
|
|
|
|
mEnchantments.addColumn (new RecordStateColumn<ESM::Enchantment>);
|
|
|
|
|
mEnchantments.addColumn (new FixedRecordTypeColumn<ESM::Enchantment> (UniversalId::Type_Enchantment));
|
|
|
|
|
|
|
|
|
|
mEnchantments.addColumn (new CostColumn<ESM::Enchantment>);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mRefs.addColumn (new StringIdColumn<CellRef> (true));
|
|
|
|
|
mRefs.addColumn (new RecordStateColumn<CellRef>);
|
|
|
|
|
mRefs.addColumn (new FixedRecordTypeColumn<CellRef> (UniversalId::Type_Reference));
|
|
|
|
@ -252,6 +259,7 @@ CSMWorld::Data::Data (ToUTF8::FromType encoding)
|
|
|
|
|
addModel (new IdTable (&mTopicInfos, IdTable::Feature_ReorderWithinTopic), UniversalId::Type_TopicInfo);
|
|
|
|
|
addModel (new IdTable (&mJournalInfos, IdTable::Feature_ReorderWithinTopic), UniversalId::Type_JournalInfo);
|
|
|
|
|
addModel (new IdTable (&mCells, IdTable::Feature_ViewId), UniversalId::Type_Cell);
|
|
|
|
|
addModel (new IdTable (&mEnchantments), UniversalId::Type_Enchantment);
|
|
|
|
|
addModel (new IdTable (&mReferenceables, IdTable::Feature_Preview),
|
|
|
|
|
UniversalId::Type_Referenceable);
|
|
|
|
|
addModel (new IdTable (&mRefs, IdTable::Feature_ViewCell | IdTable::Feature_Preview), UniversalId::Type_Reference);
|
|
|
|
@ -457,6 +465,16 @@ CSMWorld::IdCollection<CSMFilter::Filter>& CSMWorld::Data::getFilters()
|
|
|
|
|
return mFilters;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const CSMWorld::IdCollection<ESM::Enchantment>& CSMWorld::Data::getEnchantments() const
|
|
|
|
|
{
|
|
|
|
|
return mEnchantments;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CSMWorld::IdCollection<ESM::Enchantment>& CSMWorld::Data::getEnchantments()
|
|
|
|
|
{
|
|
|
|
|
return mEnchantments;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QAbstractItemModel *CSMWorld::Data::getTableModel (const CSMWorld::UniversalId& id)
|
|
|
|
|
{
|
|
|
|
|
std::map<UniversalId::Type, QAbstractItemModel *>::iterator iter = mModelIndex.find (id.getType());
|
|
|
|
@ -534,6 +552,7 @@ bool CSMWorld::Data::continueLoading (CSMDoc::Stage::Messages& messages)
|
|
|
|
|
case ESM::REC_REGN: mRegions.load (*mReader, mBase); break;
|
|
|
|
|
case ESM::REC_BSGN: mBirthsigns.load (*mReader, mBase); break;
|
|
|
|
|
case ESM::REC_SPEL: mSpells.load (*mReader, mBase); break;
|
|
|
|
|
case ESM::REC_ENCH: mEnchantments.load (*mReader, mBase); break;
|
|
|
|
|
|
|
|
|
|
case ESM::REC_CELL:
|
|
|
|
|
{
|
|
|
|
@ -668,6 +687,7 @@ bool CSMWorld::Data::hasId (const std::string& id) const
|
|
|
|
|
getTopics().searchId (id)!=-1 ||
|
|
|
|
|
getJournals().searchId (id)!=-1 ||
|
|
|
|
|
getCells().searchId (id)!=-1 ||
|
|
|
|
|
getEnchantments().searchId (id)!=-1 ||
|
|
|
|
|
getReferenceables().searchId (id)!=-1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -686,6 +706,7 @@ int CSMWorld::Data::count (RecordBase::State state) const
|
|
|
|
|
count (state, mBirthsigns) +
|
|
|
|
|
count (state, mSpells) +
|
|
|
|
|
count (state, mCells) +
|
|
|
|
|
count (state, mEnchantments) +
|
|
|
|
|
count (state, mReferenceables);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -726,6 +747,7 @@ std::vector<std::string> CSMWorld::Data::getIds (bool listDeleted) const
|
|
|
|
|
appendIds (ids, mTopics, listDeleted);
|
|
|
|
|
appendIds (ids, mJournals, listDeleted);
|
|
|
|
|
appendIds (ids, mCells, listDeleted);
|
|
|
|
|
appendIds (ids, mEnchantments, listDeleted);
|
|
|
|
|
appendIds (ids, mReferenceables, listDeleted);
|
|
|
|
|
|
|
|
|
|
std::sort (ids.begin(), ids.end());
|
|
|
|
|