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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
1.2 KiB
C++
Raw Normal View History

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:
NestedColumnAdapter() = default;
2015-04-09 09:29:03 +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