This repository has been archived on 2024-12-15. You can view files and clone it, but cannot push or open issues or pull requests.
ESGRAF48/source/SubTests/Plural/PluralModel.cpp

28 lines
485 B
C++

#include "PluralModel.h"
PluralModel::PluralModel(QObject *parent)
: CheckableTestModel(parent)
{
m_tests = { { "",
{ "Fisch /-e/", "Banane /-n/", "Bonbon /-s/", "Ei /-er/", "Eimer /-ø/",
"Korn UML+/-er/", "Nuss UML+/-e/", "Bär /-en/", "Apfel UML" } } };
}
size_t PluralModel::getPoints() const
{
size_t points = 0;
for (const auto &test : m_tests)
{
for (const auto &item : test.items())
{
if (item.isChecked())
{
points++;
}
}
}
return points;
}