2015-03-30 00:53:33 +00:00
|
|
|
#ifndef CSM_WOLRD_NESTEDCOLLECTION_H
|
|
|
|
#define CSM_WOLRD_NESTEDCOLLECTION_H
|
|
|
|
|
2015-04-02 09:19:15 +00:00
|
|
|
#include <vector>
|
|
|
|
|
2015-03-30 00:53:33 +00:00
|
|
|
#include "collectionbase.hpp"
|
|
|
|
|
|
|
|
class QVariant;
|
|
|
|
|
|
|
|
namespace CSMWorld
|
|
|
|
{
|
|
|
|
class NestedTableWrapperBase;
|
|
|
|
|
|
|
|
class NestedCollection : public CollectionBase
|
|
|
|
{
|
2015-04-02 09:19:15 +00:00
|
|
|
|
2015-03-30 00:53:33 +00:00
|
|
|
public:
|
2015-04-02 09:19:15 +00:00
|
|
|
|
|
|
|
NestedCollection();
|
|
|
|
virtual ~NestedCollection();
|
|
|
|
|
2015-03-30 00:53:33 +00:00
|
|
|
virtual void addNestedRow(int row, int col, int position) = 0;
|
|
|
|
|
|
|
|
virtual QVariant getNestedData(int row, int column, int subRow, int subColumn) const = 0;
|
|
|
|
|
|
|
|
virtual NestedTableWrapperBase* nestedTable(int row, int column) const = 0;
|
|
|
|
|
|
|
|
virtual void setNestedTable(int row, int column, const NestedTableWrapperBase& nestedTable) = 0;
|
|
|
|
|
|
|
|
virtual void setNestedData(int row, int column, const QVariant& data, int subRow, int subColumn) = 0;
|
|
|
|
|
|
|
|
virtual int getNestedRowsCount(int row, int column) const = 0;
|
|
|
|
|
|
|
|
virtual int getNestedColumnsCount(int row, int column) const = 0;
|
|
|
|
|
|
|
|
virtual void removeNestedRows(int row, int column, int subRow) = 0;
|
|
|
|
|
2015-04-02 09:19:15 +00:00
|
|
|
private:
|
2015-03-30 00:53:33 +00:00
|
|
|
|
2015-04-02 09:19:15 +00:00
|
|
|
std::vector<NestedCollection *> mChildren;
|
|
|
|
NestedCollection *mParent; // currently unused
|
2015-03-30 00:53:33 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|