2013-06-17 09:42:02 +00:00
|
|
|
|
|
|
|
#include "collectionbase.hpp"
|
|
|
|
|
2013-09-27 13:04:09 +00:00
|
|
|
#include <stdexcept>
|
2014-06-02 18:41:37 +00:00
|
|
|
#include <cassert>
|
2013-09-27 13:04:09 +00:00
|
|
|
|
|
|
|
#include "columnbase.hpp"
|
|
|
|
|
2013-06-17 09:42:02 +00:00
|
|
|
CSMWorld::CollectionBase::CollectionBase() {}
|
|
|
|
|
|
|
|
CSMWorld::CollectionBase::~CollectionBase() {}
|
2013-09-27 13:04:09 +00:00
|
|
|
|
|
|
|
int CSMWorld::CollectionBase::searchColumnIndex (Columns::ColumnId id) const
|
|
|
|
{
|
|
|
|
int columns = getColumns();
|
|
|
|
|
|
|
|
for (int i=0; i<columns; ++i)
|
|
|
|
if (getColumn (i).mColumnId==id)
|
|
|
|
return i;
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
int CSMWorld::CollectionBase::findColumnIndex (Columns::ColumnId id) const
|
|
|
|
{
|
|
|
|
int index = searchColumnIndex (id);
|
|
|
|
|
|
|
|
if (index==-1)
|
|
|
|
throw std::logic_error ("invalid column index");
|
|
|
|
|
|
|
|
return index;
|
2014-06-09 08:35:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void CSMWorld::CollectionBase::setNestedData(int row, int column, const QVariant& data, int subRow, int subColumn)
|
|
|
|
{
|
|
|
|
assert(false); //TODO remove and make pure abstract
|
|
|
|
}
|
|
|
|
|
|
|
|
int CSMWorld::CollectionBase::getNestedColumnsCount(int row, int column) const
|
|
|
|
{
|
|
|
|
assert(false); //TODO remove and make pure abstract
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int CSMWorld::CollectionBase::getNestedRowsCount(int row, int column) const
|
|
|
|
{
|
|
|
|
assert(false); //TODO, make pure abstract
|
|
|
|
return 0;
|
|
|
|
}
|
2014-06-24 10:21:40 +00:00
|
|
|
|
|
|
|
void CSMWorld::CollectionBase::removeNestedRows(int row, int column, int subRow)
|
|
|
|
{
|
|
|
|
assert(false); //todo, make pure abstract
|
|
|
|
}
|
2014-06-24 17:03:29 +00:00
|
|
|
|
|
|
|
void CSMWorld::CollectionBase::addNestedRow(int row, int col, int position)
|
|
|
|
{
|
|
|
|
assert(false);
|
|
|
|
}
|