added missing properties
This commit is contained in:
1 parent
63ff80cac9
commit
ef2e1b4680
4 files changed
+189
-1
No files matched your search
@@ -122,4 +122,31 @@ void GraphicSet::saveToFile(const QString &fileName) const
|
||||
xml.writeEndDocument();
|
||||
}
|
||||
|
||||
void GraphicSet::resetPixUsed()
|
||||
{
|
||||
pixUsed.assign(static_cast<std::size_t>(data.height() / 49 * 10), 0);
|
||||
}
|
||||
|
||||
GraphicSet *GraphicSets::searchByName(const QString &name) const
|
||||
{
|
||||
for (const auto &item : m_items)
|
||||
if (item->name == name)
|
||||
return item.get();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
GraphicSet &GraphicSets::addNew(const QString &name)
|
||||
{
|
||||
auto newSet = std::make_unique<GraphicSet>();
|
||||
newSet->name = name;
|
||||
m_items.push_back(std::move(newSet));
|
||||
return *m_items.back();
|
||||
}
|
||||
|
||||
void GraphicSets::resetPixUsed()
|
||||
{
|
||||
for (const auto &item : m_items)
|
||||
item->resetPixUsed();
|
||||
}
|
||||
|
||||
} // namespace Cevo
|
||||
Reference in new issue
Block a user