Allow creating new packs
This commit is contained in:
parent
16d0190f4e
commit
e5a6b2b6ef
6 changed files with 58 additions and 6 deletions
|
|
@ -74,3 +74,21 @@ ImagePackListModel::packAt(int row)
|
|||
QQmlEngine::setObjectOwnership(e, QQmlEngine::CppOwnership);
|
||||
return e;
|
||||
}
|
||||
|
||||
SingleImagePackModel *
|
||||
ImagePackListModel::newPack(bool inRoom)
|
||||
{
|
||||
ImagePackInfo info{};
|
||||
if (inRoom)
|
||||
info.source_room = room_id;
|
||||
return new SingleImagePackModel(info);
|
||||
}
|
||||
|
||||
bool
|
||||
ImagePackListModel::containsAccountPack() const
|
||||
{
|
||||
for (const auto &p : packs)
|
||||
if (p->roomid().isEmpty())
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue