mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-10 06:39:49 +00:00
18 lines
489 B
C++
18 lines
489 B
C++
|
|
#include "idtableproxymodel.hpp"
|
|
|
|
#include "idtable.hpp"
|
|
|
|
CSMWorld::IdTableProxyModel::IdTableProxyModel (QObject *parent)
|
|
: QSortFilterProxyModel (parent)
|
|
{}
|
|
|
|
void CSMWorld::IdTableProxyModel::addRecord (const std::string& id)
|
|
{
|
|
dynamic_cast<IdTable&> (*sourceModel()).addRecord (id);
|
|
}
|
|
|
|
QModelIndex CSMWorld::IdTableProxyModel::getModelIndex (const std::string& id, int column) const
|
|
{
|
|
return mapFromSource (dynamic_cast<IdTable&> (*sourceModel()).getModelIndex (id, column));
|
|
} |