2015-04-12 03:48:23 +00:00
|
|
|
#ifndef CSM_WOLRD_NESTEDCOLUMNADAPTER_H
|
|
|
|
#define CSM_WOLRD_NESTEDCOLUMNADAPTER_H
|
2015-04-09 09:29:03 +00:00
|
|
|
|
|
|
|
class QVariant;
|
|
|
|
|
|
|
|
namespace CSMWorld
|
|
|
|
{
|
2015-04-09 10:53:41 +00:00
|
|
|
struct NestedTableWrapperBase;
|
2015-04-09 09:29:03 +00:00
|
|
|
|
2015-04-12 03:48:23 +00:00
|
|
|
template <typename ESXRecordT>
|
|
|
|
struct Record;
|
|
|
|
|
2015-04-09 09:29:03 +00:00
|
|
|
template <typename ESXRecordT>
|
2015-04-12 03:48:23 +00:00
|
|
|
class NestedColumnAdapter
|
2015-04-09 09:29:03 +00:00
|
|
|
{
|
|
|
|
public:
|
2023-05-29 11:37:19 +00:00
|
|
|
NestedColumnAdapter() = default;
|
2015-04-09 09:29:03 +00:00
|
|
|
|
2023-05-29 11:37:19 +00:00
|
|
|
virtual ~NestedColumnAdapter() = default;
|
2015-04-09 09:29:03 +00:00
|
|
|
|
2015-04-18 22:58:52 +00:00
|
|
|
virtual void addRow(Record<ESXRecordT>& record, int position) const = 0;
|
2015-04-09 09:29:03 +00:00
|
|
|
|
2015-04-18 22:58:52 +00:00
|
|
|
virtual void removeRow(Record<ESXRecordT>& record, int rowToRemove) const = 0;
|
2015-04-09 09:29:03 +00:00
|
|
|
|
2015-04-18 22:58:52 +00:00
|
|
|
virtual void setTable(Record<ESXRecordT>& record, const NestedTableWrapperBase& nestedTable) const = 0;
|
2015-04-09 09:29:03 +00:00
|
|
|
|
2015-04-18 23:42:44 +00:00
|
|
|
virtual NestedTableWrapperBase* table(const Record<ESXRecordT>& record) const = 0;
|
2015-04-09 09:29:03 +00:00
|
|
|
|
2015-04-18 22:58:52 +00:00
|
|
|
virtual QVariant getData(const Record<ESXRecordT>& record, int subRowIndex, int subColIndex) const = 0;
|
2015-04-09 09:29:03 +00:00
|
|
|
|
2015-04-18 22:58:52 +00:00
|
|
|
virtual void setData(
|
|
|
|
Record<ESXRecordT>& record, const QVariant& value, int subRowIndex, int subColIndex) const = 0;
|
2015-04-09 09:29:03 +00:00
|
|
|
|
2015-04-18 22:58:52 +00:00
|
|
|
virtual int getColumnsCount(const Record<ESXRecordT>& record) const = 0;
|
2015-04-09 09:29:03 +00:00
|
|
|
|
2015-04-18 22:58:52 +00:00
|
|
|
virtual int getRowsCount(const Record<ESXRecordT>& record) const = 0;
|
2015-04-09 09:29:03 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2015-04-12 03:48:23 +00:00
|
|
|
#endif // CSM_WOLRD_NESTEDCOLUMNADAPTER_H
|