fixed the interface of the adapter class

pull/16/head
Marc Zinnschlag 12 years ago
parent f7f56a1a1f
commit 0f29ab8cf9

@ -23,10 +23,11 @@ namespace CSMWorld
virtual ~RefIdAdapter();
virtual QVariant getData (const RefIdColumn *column, const RefIdData& data) const = 0;
virtual void setData (const RefIdColumn *column, RefIdData& data, const QVariant& value)
virtual QVariant getData (const RefIdColumn *column, const RefIdData& data, int idnex)
const = 0;
virtual void setData (const RefIdColumn *column, RefIdData& data, int index,
const QVariant& value) const = 0;
///< If the data type does not match an exception is thrown.
virtual std::string getId (const RecordBase& record) const = 0;

@ -83,7 +83,7 @@ QVariant CSMWorld::RefIdCollection::getData (int index, int column) const
const RefIdAdapter& adaptor = findAdaptor (localIndex.second);
return adaptor.getData (&mColumns.at (column), mData);
return adaptor.getData (&mColumns.at (column), mData, localIndex.first);
}
void CSMWorld::RefIdCollection::setData (int index, int column, const QVariant& data)
@ -92,7 +92,7 @@ void CSMWorld::RefIdCollection::setData (int index, int column, const QVariant&
const RefIdAdapter& adaptor = findAdaptor (localIndex.second);
adaptor.setData (&mColumns.at (column), mData, data);
adaptor.setData (&mColumns.at (column), mData, localIndex.first, data);
}
void CSMWorld::RefIdCollection::removeRows (int index, int count)

Loading…
Cancel
Save