refs #250, remove row method for listmodelbase

This commit is contained in:
Klaus Basan
2014-05-28 01:31:41 +02:00
parent 43f796bb0e
commit a4811c619c
2 changed files with 14 additions and 0 deletions

View File

@@ -142,6 +142,17 @@ namespace BlackGui
endInsertRows();
}
/*
* Remove object
*/
template <typename ObjectType, typename ContainerType>
void CListModelBase<ObjectType, ContainerType>::remove(const ObjectType &object)
{
beginRemoveRows(QModelIndex(), 0, 0);
this->m_container.remove(object);
endRemoveRows();
}
/*
* Clear
*/