1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 21:53:51 +00:00

display record state in table

This commit is contained in:
Marc Zinnschlag 2012-12-01 13:42:12 +01:00
parent ec1f957e54
commit bd5e364ac1
2 changed files with 16 additions and 0 deletions

View file

@ -44,6 +44,21 @@ namespace CSMWorld
} }
}; };
template<typename ESXRecordT>
struct RecordStateColumn : public Column<ESXRecordT>
{
RecordStateColumn() : Column<ESXRecordT> ("*") {}
virtual QVariant get (const Record<ESXRecordT>& record) const
{
return static_cast<int> (record.mState);
}
virtual bool isEditable() const
{
return false;
}
};
} }
#endif #endif

View file

@ -13,6 +13,7 @@
CSMWorld::Data::Data() CSMWorld::Data::Data()
{ {
mGlobals.addColumn (new StringIdColumn<ESM::Global>); mGlobals.addColumn (new StringIdColumn<ESM::Global>);
mGlobals.addColumn (new RecordStateColumn<ESM::Global>);
mGlobals.addColumn (new FloatValueColumn<ESM::Global>); mGlobals.addColumn (new FloatValueColumn<ESM::Global>);
mModels.insert (std::make_pair ( mModels.insert (std::make_pair (