You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
744 B
C++
29 lines
744 B
C++
#include "columnimp.hpp"
|
|
|
|
CSMWorld::BodyPartRaceColumn::BodyPartRaceColumn(const MeshTypeColumn<ESM::BodyPart> *meshType)
|
|
: mMeshType(meshType)
|
|
{}
|
|
|
|
QVariant CSMWorld::BodyPartRaceColumn::get(const Record<ESM::BodyPart> &record) const
|
|
{
|
|
if (mMeshType != NULL && mMeshType->get(record) == ESM::BodyPart::MT_Skin)
|
|
{
|
|
return QString::fromUtf8(record.get().mRace.c_str());
|
|
}
|
|
return QVariant(QVariant::UserType);
|
|
}
|
|
|
|
void CSMWorld::BodyPartRaceColumn::set(Record<ESM::BodyPart> &record, const QVariant &data)
|
|
{
|
|
ESM::BodyPart record2 = record.get();
|
|
|
|
record2.mRace = data.toString().toUtf8().constData();
|
|
|
|
record.setModified(record2);
|
|
}
|
|
|
|
bool CSMWorld::BodyPartRaceColumn::isEditable() const
|
|
{
|
|
return true;
|
|
}
|