1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 06:35:30 +00:00
OpenMW/apps/opencs/model/world/nestedcolumnadapter.hpp

41 lines
1.2 KiB
C++
Raw Normal View History

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;
2022-09-22 21:26:05 +03:00
template <typename ESXRecordT>
2015-04-12 13:48:23 +10:00
class NestedColumnAdapter
2015-04-09 19:29:03 +10:00
{
public:
NestedColumnAdapter() = default;
2015-04-09 19:29:03 +10:00
virtual ~NestedColumnAdapter() = default;
2015-04-09 19:29:03 +10:00
2015-04-19 08:58:52 +10:00
virtual void addRow(Record<ESXRecordT>& record, int position) const = 0;
2015-04-09 19:29:03 +10:00
2015-04-19 08:58:52 +10:00
virtual void removeRow(Record<ESXRecordT>& record, int rowToRemove) const = 0;
2015-04-09 19:29:03 +10:00
2015-04-19 08:58:52 +10:00
virtual void setTable(Record<ESXRecordT>& record, const NestedTableWrapperBase& nestedTable) const = 0;
2015-04-09 19:29:03 +10:00
2015-04-19 09:42:44 +10:00
virtual NestedTableWrapperBase* table(const Record<ESXRecordT>& record) const = 0;
2015-04-09 19:29:03 +10:00
2015-04-19 08:58:52 +10:00
virtual QVariant getData(const Record<ESXRecordT>& record, int subRowIndex, int subColIndex) const = 0;
2015-04-09 19:29:03 +10:00
2022-09-22 21:26:05 +03:00
virtual void setData(
Record<ESXRecordT>& record, const QVariant& value, int subRowIndex, int subColIndex) const = 0;
2015-04-09 19:29:03 +10:00
2015-04-19 08:58:52 +10:00
virtual int getColumnsCount(const Record<ESXRecordT>& record) const = 0;
2015-04-09 19:29:03 +10:00
2015-04-19 08:58:52 +10:00
virtual int getRowsCount(const Record<ESXRecordT>& record) const = 0;
2015-04-09 19:29:03 +10:00
};
}
2015-04-12 13:48:23 +10:00
#endif // CSM_WOLRD_NESTEDCOLUMNADAPTER_H