2015-04-12 13:48:23 +10:00
|
|
|
#ifndef CSM_WOLRD_NESTEDCOLUMNADAPTER_H
|
|
|
|
#define CSM_WOLRD_NESTEDCOLUMNADAPTER_H
|
2015-04-09 19:29:03 +10:00
|
|
|
|
|
|
|
class QVariant;
|
|
|
|
|
|
|
|
namespace CSMWorld
|
|
|
|
{
|
2015-04-09 20:53:41 +10:00
|
|
|
struct NestedTableWrapperBase;
|
2015-04-09 19:29:03 +10:00
|
|
|
|
2015-04-12 13:48:23 +10:00
|
|
|
template <typename ESXRecordT>
|
|
|
|
struct Record;
|
|
|
|
|
2015-04-09 19:29:03 +10:00
|
|
|
template<typename ESXRecordT>
|
2015-04-12 13:48:23 +10:00
|
|
|
class NestedColumnAdapter
|
2015-04-09 19:29:03 +10:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2015-04-12 13:48:23 +10:00
|
|
|
NestedColumnAdapter() {}
|
2015-04-09 19:29:03 +10:00
|
|
|
|
2015-04-12 13:48:23 +10:00
|
|
|
virtual ~NestedColumnAdapter() {}
|
2015-04-09 19:29:03 +10:00
|
|
|
|
|
|
|
virtual void addNestedRow(Record<ESXRecordT>& record, int position) const = 0;
|
|
|
|
|
|
|
|
virtual void removeNestedRow(Record<ESXRecordT>& record, int rowToRemove) const = 0;
|
|
|
|
|
2015-04-11 11:26:29 +10:00
|
|
|
virtual void setNestedTable(Record<ESXRecordT>& record, const NestedTableWrapperBase& nestedTable) const = 0;
|
2015-04-09 19:29:03 +10:00
|
|
|
|
|
|
|
virtual NestedTableWrapperBase* nestedTable(const Record<ESXRecordT>& record) const = 0;
|
|
|
|
|
|
|
|
virtual QVariant getNestedData(const Record<ESXRecordT>& record, int subRowIndex, int subColIndex) const = 0;
|
|
|
|
|
|
|
|
virtual void setNestedData(Record<ESXRecordT>& record, const QVariant& value, int subRowIndex, int subColIndex) const = 0;
|
|
|
|
|
|
|
|
virtual int getNestedColumnsCount(const Record<ESXRecordT>& record) const = 0;
|
|
|
|
|
|
|
|
virtual int getNestedRowsCount(const Record<ESXRecordT>& record) const = 0;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2015-04-12 13:48:23 +10:00
|
|
|
#endif // CSM_WOLRD_NESTEDCOLUMNADAPTER_H
|