|
|
|
@ -815,14 +815,14 @@ namespace CSMWorld
|
|
|
|
|
|
|
|
|
|
virtual QVariant get (const Record<ESXRecordT>& record) const
|
|
|
|
|
{
|
|
|
|
|
return QString::fromUtf8 (record.get().mCellId.c_str());
|
|
|
|
|
return QString::fromUtf8 (record.get().mCell.c_str());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual void set (Record<ESXRecordT>& record, const QVariant& data)
|
|
|
|
|
{
|
|
|
|
|
ESXRecordT record2 = record.get();
|
|
|
|
|
|
|
|
|
|
record2.mCellId = data.toString().toUtf8().constData();
|
|
|
|
|
record2.mCell = data.toString().toUtf8().constData();
|
|
|
|
|
|
|
|
|
|
record.setModified (record2);
|
|
|
|
|
}
|
|
|
|
@ -1425,6 +1425,233 @@ namespace CSMWorld
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
template<typename ESXRecordT>
|
|
|
|
|
struct ActorColumn : public Column<ESXRecordT>
|
|
|
|
|
{
|
|
|
|
|
ActorColumn() : Column<ESXRecordT> (Columns::ColumnId_Actor, ColumnBase::Display_String) {}
|
|
|
|
|
|
|
|
|
|
virtual QVariant get (const Record<ESXRecordT>& record) const
|
|
|
|
|
{
|
|
|
|
|
return QString::fromUtf8 (record.get().mActor.c_str());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual void set (Record<ESXRecordT>& record, const QVariant& data)
|
|
|
|
|
{
|
|
|
|
|
ESXRecordT record2 = record.get();
|
|
|
|
|
|
|
|
|
|
record2.mActor = data.toString().toUtf8().constData();
|
|
|
|
|
|
|
|
|
|
record.setModified (record2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual bool isEditable() const
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
template<typename ESXRecordT>
|
|
|
|
|
struct RaceColumn : public Column<ESXRecordT>
|
|
|
|
|
{
|
|
|
|
|
RaceColumn() : Column<ESXRecordT> (Columns::ColumnId_Race, ColumnBase::Display_String) {}
|
|
|
|
|
|
|
|
|
|
virtual QVariant get (const Record<ESXRecordT>& record) const
|
|
|
|
|
{
|
|
|
|
|
return QString::fromUtf8 (record.get().mRace.c_str());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual void set (Record<ESXRecordT>& record, const QVariant& data)
|
|
|
|
|
{
|
|
|
|
|
ESXRecordT record2 = record.get();
|
|
|
|
|
|
|
|
|
|
record2.mRace = data.toString().toUtf8().constData();
|
|
|
|
|
|
|
|
|
|
record.setModified (record2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual bool isEditable() const
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
template<typename ESXRecordT>
|
|
|
|
|
struct ClassColumn : public Column<ESXRecordT>
|
|
|
|
|
{
|
|
|
|
|
ClassColumn() : Column<ESXRecordT> (Columns::ColumnId_Class, ColumnBase::Display_String) {}
|
|
|
|
|
|
|
|
|
|
virtual QVariant get (const Record<ESXRecordT>& record) const
|
|
|
|
|
{
|
|
|
|
|
return QString::fromUtf8 (record.get().mClass.c_str());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual void set (Record<ESXRecordT>& record, const QVariant& data)
|
|
|
|
|
{
|
|
|
|
|
ESXRecordT record2 = record.get();
|
|
|
|
|
|
|
|
|
|
record2.mClass = data.toString().toUtf8().constData();
|
|
|
|
|
|
|
|
|
|
record.setModified (record2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual bool isEditable() const
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
template<typename ESXRecordT>
|
|
|
|
|
struct PcFactionColumn : public Column<ESXRecordT>
|
|
|
|
|
{
|
|
|
|
|
PcFactionColumn() : Column<ESXRecordT> (Columns::ColumnId_PcFaction, ColumnBase::Display_String) {}
|
|
|
|
|
|
|
|
|
|
virtual QVariant get (const Record<ESXRecordT>& record) const
|
|
|
|
|
{
|
|
|
|
|
return QString::fromUtf8 (record.get().mPcFaction.c_str());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual void set (Record<ESXRecordT>& record, const QVariant& data)
|
|
|
|
|
{
|
|
|
|
|
ESXRecordT record2 = record.get();
|
|
|
|
|
|
|
|
|
|
record2.mPcFaction = data.toString().toUtf8().constData();
|
|
|
|
|
|
|
|
|
|
record.setModified (record2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual bool isEditable() const
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
template<typename ESXRecordT>
|
|
|
|
|
struct ResponseColumn : public Column<ESXRecordT>
|
|
|
|
|
{
|
|
|
|
|
ResponseColumn() : Column<ESXRecordT> (Columns::ColumnId_Response, ColumnBase::Display_String) {}
|
|
|
|
|
|
|
|
|
|
virtual QVariant get (const Record<ESXRecordT>& record) const
|
|
|
|
|
{
|
|
|
|
|
return QString::fromUtf8 (record.get().mResponse.c_str());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual void set (Record<ESXRecordT>& record, const QVariant& data)
|
|
|
|
|
{
|
|
|
|
|
ESXRecordT record2 = record.get();
|
|
|
|
|
|
|
|
|
|
record2.mResponse = data.toString().toUtf8().constData();
|
|
|
|
|
|
|
|
|
|
record.setModified (record2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual bool isEditable() const
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
template<typename ESXRecordT>
|
|
|
|
|
struct DispositionColumn : public Column<ESXRecordT>
|
|
|
|
|
{
|
|
|
|
|
DispositionColumn()
|
|
|
|
|
: Column<ESXRecordT> (Columns::ColumnId_Disposition, ColumnBase::Display_Integer)
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
virtual QVariant get (const Record<ESXRecordT>& record) const
|
|
|
|
|
{
|
|
|
|
|
return record.get().mData.mDisposition;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual void set (Record<ESXRecordT>& record, const QVariant& data)
|
|
|
|
|
{
|
|
|
|
|
ESXRecordT record2 = record.get();
|
|
|
|
|
record2.mData.mDisposition = data.toInt();
|
|
|
|
|
record.setModified (record2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual bool isEditable() const
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
template<typename ESXRecordT>
|
|
|
|
|
struct RankColumn : public Column<ESXRecordT>
|
|
|
|
|
{
|
|
|
|
|
RankColumn()
|
|
|
|
|
: Column<ESXRecordT> (Columns::ColumnId_Rank, ColumnBase::Display_Integer)
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
virtual QVariant get (const Record<ESXRecordT>& record) const
|
|
|
|
|
{
|
|
|
|
|
return static_cast<int> (record.get().mData.mRank);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual void set (Record<ESXRecordT>& record, const QVariant& data)
|
|
|
|
|
{
|
|
|
|
|
ESXRecordT record2 = record.get();
|
|
|
|
|
record2.mData.mRank = static_cast<signed char> (data.toInt());
|
|
|
|
|
record.setModified (record2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual bool isEditable() const
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
template<typename ESXRecordT>
|
|
|
|
|
struct PcRankColumn : public Column<ESXRecordT>
|
|
|
|
|
{
|
|
|
|
|
PcRankColumn()
|
|
|
|
|
: Column<ESXRecordT> (Columns::ColumnId_PcRank, ColumnBase::Display_Integer)
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
virtual QVariant get (const Record<ESXRecordT>& record) const
|
|
|
|
|
{
|
|
|
|
|
return static_cast<int> (record.get().mData.mPCrank);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual void set (Record<ESXRecordT>& record, const QVariant& data)
|
|
|
|
|
{
|
|
|
|
|
ESXRecordT record2 = record.get();
|
|
|
|
|
record2.mData.mPCrank = static_cast<signed char> (data.toInt());
|
|
|
|
|
record.setModified (record2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual bool isEditable() const
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
template<typename ESXRecordT>
|
|
|
|
|
struct GenderColumn : public Column<ESXRecordT>
|
|
|
|
|
{
|
|
|
|
|
GenderColumn()
|
|
|
|
|
: Column<ESXRecordT> (Columns::ColumnId_Gender, ColumnBase::Display_Gender)
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
virtual QVariant get (const Record<ESXRecordT>& record) const
|
|
|
|
|
{
|
|
|
|
|
return static_cast<int> (record.get().mData.mGender);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual void set (Record<ESXRecordT>& record, const QVariant& data)
|
|
|
|
|
{
|
|
|
|
|
ESXRecordT record2 = record.get();
|
|
|
|
|
|
|
|
|
|
record2.mData.mGender = data.toInt();
|
|
|
|
|
|
|
|
|
|
record.setModified (record2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual bool isEditable() const
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|