implemented Akkusativ/Dativ PR

This commit is contained in:
mandlm 2018-06-17 19:40:10 +02:00
parent a951589787
commit 19430d4a3f
3 changed files with 102 additions and 0 deletions

View File

@ -0,0 +1,49 @@
#pragma once
#include "PRMap.h"
class AkkusativPR : public PRMap
{
public:
AkkusativPR()
{
// clang-format off
m_ages = {
{ 4, 0 },
{ 5, 0 },
{ 6, 0 },
{ 7, 0 },
{ 8, 0 },
{ 9, 0 }
};
m_PRs = {
{ 1, 0, 0, 1, 0 },
{ 1, 0, 0, 1, 0 },
{ 1, 0, 0, 1, 0 },
{ 1, 0, 0, 1, 0 },
{ 1, 0, 0, 1, 0 },
{ 1, 1, 0, 1, 0 },
{ 1, 1, 1, 1, 0 },
{ 1, 1, 1, 2, 0 },
{ 2, 1, 1, 2, 0 },
{ 4, 3, 1, 2, 0 },
{ 6, 3, 2, 2, 0 },
{ 7, 4, 2, 2, 0 },
{ 10, 4, 2, 2, 1 },
{ 12, 6, 3, 3, 1 },
{ 17, 8, 5, 4, 2 },
{ 26, 12, 7, 6, 4 },
{ 32, 19, 11, 9, 6 },
{ 38, 25, 18, 14, 9 },
{ 44, 34, 25, 17, 12 },
{ 56, 43, 31, 24, 17 },
{ 64, 50, 42, 32, 28 },
{ 76, 61, 49, 40, 36 },
{ 86, 75, 63, 54, 45 },
{ 95, 89, 76, 74, 69 },
{ 100, 100, 100, 100, 100 }
};
// clang-format on
}
};

View File

@ -0,0 +1,49 @@
#pragma once
#include "PRMap.h"
class DativPR : public PRMap
{
public:
DativPR()
{
// clang-format off
m_ages = {
{ 4, 0 },
{ 5, 0 },
{ 6, 0 },
{ 7, 0 },
{ 8, 0 },
{ 9, 0 }
};
m_PRs = {
{ 3, 1, 1, 0, 0 },
{ 4, 1, 1, 1, 0 },
{ 8, 3, 1, 1, 1 },
{ 11, 5, 1, 1, 1 },
{ 18, 9, 3, 1, 1 },
{ 23, 12, 4, 3, 2 },
{ 31, 15, 8, 3, 2 },
{ 38, 19, 11, 5, 3 },
{ 42, 24, 14, 6, 3 },
{ 46, 27, 16, 8, 5 },
{ 51, 32, 20, 9, 9 },
{ 54, 35, 24, 11, 9 },
{ 57, 38, 26, 13, 9 },
{ 60, 42, 31, 15, 11 },
{ 61, 45, 35, 16, 12 },
{ 65, 46, 37, 18, 13 },
{ 67, 49, 37, 19, 13 },
{ 69, 53, 38, 22, 13 },
{ 72, 53, 40, 23, 16 },
{ 74, 58, 43, 26, 17 },
{ 76, 60, 45, 33, 19 },
{ 78, 67, 52, 39, 26 },
{ 87, 75, 61, 51, 37 },
{ 92, 87, 76, 68, 60 },
{ 100, 100, 100, 100, 100 }
};
// clang-format on
}
};

View File

@ -3,6 +3,8 @@
#include "PluralPR.h"
#include "GenusPR.h"
#include "VerbEndPR.h"
#include "AkkusativPR.h"
#include "DativPR.h"
#include <QDebug>
@ -150,6 +152,7 @@ void ResultModel::setAkkusativResult(unsigned int points)
if (m_results[5].points() != points)
{
m_results[5].setPoints(points);
m_results[5].setPR(AkkusativPR().lookup(m_age, points));
emit dataChanged(index(0, 5), index(4, 5));
}
}
@ -159,6 +162,7 @@ void ResultModel::setDativResult(unsigned int points)
if (m_results[6].points() != points)
{
m_results[6].setPoints(points);
m_results[6].setPR(DativPR().lookup(m_age, points));
emit dataChanged(index(0, 6), index(4, 6));
}
}