|
|
|
@ -87,6 +87,10 @@ CSMWorld::Data::Data()
|
|
|
|
|
mScripts.addColumn (new StringIdColumn<ESM::Script>);
|
|
|
|
|
mScripts.addColumn (new RecordStateColumn<ESM::Script>);
|
|
|
|
|
|
|
|
|
|
mRegions.addColumn (new StringIdColumn<ESM::Region>);
|
|
|
|
|
mRegions.addColumn (new RecordStateColumn<ESM::Region>);
|
|
|
|
|
mRegions.addColumn (new NameColumn<ESM::Region>);
|
|
|
|
|
|
|
|
|
|
addModel (new IdTable (&mGlobals), UniversalId::Type_Globals, UniversalId::Type_Global);
|
|
|
|
|
addModel (new IdTable (&mGmsts), UniversalId::Type_Gmsts, UniversalId::Type_Gmst);
|
|
|
|
|
addModel (new IdTable (&mSkills), UniversalId::Type_Skills, UniversalId::Type_Skill);
|
|
|
|
@ -95,6 +99,7 @@ CSMWorld::Data::Data()
|
|
|
|
|
addModel (new IdTable (&mRaces), UniversalId::Type_Races, UniversalId::Type_Race);
|
|
|
|
|
addModel (new IdTable (&mSounds), UniversalId::Type_Sounds, UniversalId::Type_Sound);
|
|
|
|
|
addModel (new IdTable (&mScripts), UniversalId::Type_Scripts, UniversalId::Type_Script);
|
|
|
|
|
addModel (new IdTable (&mRegions), UniversalId::Type_Regions, UniversalId::Type_Region);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CSMWorld::Data::~Data()
|
|
|
|
@ -183,6 +188,16 @@ CSMWorld::IdCollection<ESM::Script>& CSMWorld::Data::getScripts()
|
|
|
|
|
return mScripts;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const CSMWorld::IdCollection<ESM::Region>& CSMWorld::Data::getRegions() const
|
|
|
|
|
{
|
|
|
|
|
return mRegions;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CSMWorld::IdCollection<ESM::Region>& CSMWorld::Data::getRegions()
|
|
|
|
|
{
|
|
|
|
|
return mRegions;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QAbstractItemModel *CSMWorld::Data::getTableModel (const UniversalId& id)
|
|
|
|
|
{
|
|
|
|
|
std::map<UniversalId::Type, QAbstractItemModel *>::iterator iter = mModelIndex.find (id.getType());
|
|
|
|
@ -225,6 +240,7 @@ void CSMWorld::Data::loadFile (const boost::filesystem::path& path, bool base)
|
|
|
|
|
case ESM::REC_RACE: mRaces.load (reader, base); break;
|
|
|
|
|
case ESM::REC_SOUN: mSounds.load (reader, base); break;
|
|
|
|
|
case ESM::REC_SCPT: mScripts.load (reader, base); break;
|
|
|
|
|
case ESM::REC_REGN: mRegions.load (reader, base); break;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
|
|