display record state in table

pull/16/head
Marc Zinnschlag 12 years ago
parent ec1f957e54
commit bd5e364ac1

@ -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

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

Loading…
Cancel
Save