Add a poolAt() convenience function to the model
This will allow retrieving pools from the UI.
This commit is contained in:
parent
9b47e26bcb
commit
5a4d2afa84
2 changed files with 6 additions and 1 deletions
|
|
@ -44,7 +44,6 @@ DanbooruPoolModel::~DanbooruPoolModel()
|
|||
void DanbooruPoolModel::addPool(DanbooruPool *pool)
|
||||
{
|
||||
beginInsertRows(QModelIndex(), m_items.size(), m_items.size());
|
||||
qDebug() << "POOL NAME" << pool->name();
|
||||
m_items.append(pool);
|
||||
endInsertRows();
|
||||
}
|
||||
|
|
@ -117,6 +116,11 @@ void DanbooruPoolModel::clear()
|
|||
reset();
|
||||
}
|
||||
|
||||
DanbooruPool* DanbooruPoolModel::poolAt(int index) const
|
||||
{
|
||||
return m_items.at(index);
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // namespace Danbooru
|
||||
Loading…
Add table
Add a link
Reference in a new issue